InterOp:Connect/Classes/SPAIResult

From DocR18

Jump to: navigation, search

The SPAIResult class provides members to determine the status of an operation.

Include File

This class is declared in SPAIResult.h.

Members

SPAIResult( SPAIErrorType iType = SPAX_E_UNDETERMINED)

Default constructor that sets the default value of status to SPAX_E_UNDETERMINED.

SPAXBoolean IsFailure() const

This method returns true if the result is a failure; otherwise, false.

SPAXBoolean IsDeterminedFailure() const

This method returns true if the result is a failure or undetermined; otherwise, false.

SPAXBoolean IsSuccess() const

This method returns true if the result is SPAX_S_OK or SPAX_S_PARTIAL; otherwise, false.

SPAXBoolean IsCompleteSuccess() const

This method returns true if the result is SPAX_S_OK; otherwise, false.

SPAXBoolean IsPartialSuccess() const

This method returns true if the result is SPAX_S_PARTIAL; otherwise, false.

SPAXBoolean IsUndetermined( void) const

This method returns true if the result is SPAX_E_UNDETERMINED; otherwise, false.

unsigned int GetCriticity() const

This method returns the critical value of an error. The following table lists the returned string and corresponding value:

Error String Error Value Description
SPAX_ERROR_CRITICAL 0x01000000 Critical error
SPAX_ERROR_FATAL 0x02000000 Fatal error
SPAX_ERROR_WARNING 0x03000000 Error warning
SPAX_ERROR_INFORMATION 0x04000000 Error information
SPAX_S_PARTIAL 0x00000001 Operation partially successful
SPAX_S_NO_ENTITIES 0x00000002 Entities not found
SPAX_S_NO_TRANSLATABLE_ENTITIES 0x00000003 Translatable entities not found
SPAX_E_FAIL 0x00000001 Operation failed
SPAX_E_ERROR 0x00000002 Error in operation
SPAX_E_ABORT 0x00000003 Operation was aborted
SPAX_E_NOT_SUPPORTED 0x00000004 Functionality is not supported
SPAX_E_NOT_IMPLEMENTED 0x00000005 Method not implemented
SPAX_E_UNDETERMINED 0x00000006 Result of operation was undetermined
SPAX_E_UNEXPECTED 0x00000007 Unexpected error occurred
SPAX_E_NOT_INITIALIZED 0x00000008 Object was not initialized
SPAX_E_INVALID_COMPONENT 0x00000009 Component is invalid
SPAX_E_INVALID_OBJECT 0x0000000A Object is invalid
SPAX_E_INVALID_ARGUMENT 0x0000000B Parameter passed to a method as argument is invalid
SPAX_E_LICENCE_NOT_AVAILABLE 0x0000000C Invalid license
SPAX_E_FILE_NOT_FOUND 0x0000000D Referred file not found
SPAX_E_NO_FILE_OPENED 0x0000000E Referred file could not be opened
SPAX_E_NO_FILE_SAVED 0x0000000F Referred file could not be saved
SPAX_E_FILE_ENCRYPTED 0x00000010 Referred file is encrypted
SPAX_E_BOX_TOO_BIG 0x00000011 Entity box too big
SPAX_E_BOX_TOO_SMALL 0x00000012 Entity box too small
SPAX_E_INVALID_WRITE_LENGTH_UNIT 0x00000013 Invalid write unit has been used
SPAX_E_FILE_UNSUPPORTED_VERSION 0x00000014 File version not supported
SPAX_E_INVALID_FILE 0x00000015 File is invalid or corrupted
unsigned int GetDomain() const

This method returns the error domain.

unsigned int GetNumber() const

This method returns the error number.

SPAXBoolean operator==( SPAIErrorType iType)

Operator to compare result values.

SPAXBoolean operator! =( SPAIErrorType iType)

Operator to compare result values.

SPAIResult operator&=( SPAIResult iPartialResult)

Operator to compute a global result from a set of successive results.

SPAIResult operator! =( SPAIResult iPartialResult)

Operator to compute a global result from a set of concurrent results. You should use this operator when a partial result needs to be reported.

const char* GetMessage()

This method returns description of the result.

int GetReturnCode()

This method returns an error code for the result.

static int GetReturnCode(bool iSuccess)

This method returns 0 if iSuccess is true; otherwise, 1 if iSuccess is false.

static const char* GetOKKOString(bool iBool)

This method returns a pointer to an "OK" or "KO" string, dependent on whether the value of iBool is true or false.

Personal tools
new releases