This reference page is linked to from the following overview topics: Components of a Custom Display Host, Exporting Callbacks, CustomVector3ToScalar Example, Regular Custom ICENode, Code, Legacy Plug-in Callbacks, Migrating Legacy Plug-ins, Mixing the C++ API with the Softimage Object Model.
#include <xsi_status.h>
Encapsulates status data types for error handling purpose. The class also exposes methods to query and set the error code.
The error codes use the same values as the standard HRESULT error codes on Windows.
Public Types |
|
enum | Code
{ Undefined = 0xFFFFFFFF, OK = 0, False = 1, Fail = 0x80004005L, InvalidArgument = 0x80070057L, OutOfMemory = 0x8007000EL, AccessDenied = 0x80070005L, Unexpected = 0x8000FFFFL, NotImpl = 0x80004001L, MemberNotFound = 0x80020003L, Abort = 0x80004004L, BadVarType = 0x80020008L } |
Error code enumerator. More... |
|
Public Member Functions |
|
CStatus (Code in_code=OK) | |
Code | GetCode () const |
bool | Succeeded () const |
void | PutCode (Code in_code) |
CString | GetDescription () const |
CStatus & | operator= (Code in_code) |
bool | operator== (const CStatus &rhs) const |
bool | operator== (Code rhs) const |
bool | operator!= (const CStatus &rhs) const |
bool | operator!= (Code rhs) const |
void | AssertSucceeded (const CString &in_strText=CString()) const |
enum Code |
Error code enumerator.
Constructs a status object from a given error code.
in_code | Error code |
Code GetCode | ( | ) | const |
bool Succeeded | ( | ) | const |
Returns true if the status is either OK or False
void PutCode | ( | Code | in_code | ) |
CString GetDescription | ( | ) | const |
Gets the status code description.
Reimplemented in CScriptErrorDescriptor.
bool operator== | ( | const CStatus & | rhs | ) | const |
The equality operator that takes another CStatus object.
rhs | status object |
bool operator== | ( | Code | rhs | ) | const |
bool operator!= | ( | const CStatus & | rhs | ) | const |
bool operator!= | ( | Code | rhs | ) | const |
Assert the current status code is OK or False.
in_strText | Optional message logs if the function doesn't assert. |