- Main Page
- Classes
- Files
- Directories

- File List
- File Members

# fbxstatus.h

Go to the documentation of this file.

    00001 /****************************************************************************************
    00002
    00003    Copyright (C) 2013 Autodesk, Inc.
    00004    All rights reserved.
    00005
    00006    Use of this software is subject to the terms of the Autodesk license agreement
    00007    provided at the time of installation or download, or which otherwise accompanies
    00008    this software in either electronic or hard copy form.
    00009
    00010 ****************************************************************************************/
    00011
    00013 #ifndef _FBXSDK_CORE_BASE_STATUS_H_
    00014 #define _FBXSDK_CORE_BASE_STATUS_H_
    00015
    00016 #include <fbxsdk/fbxsdk_def.h>
    00017
    00018 #include <fbxsdk/core/base/fbxstring.h>
    00019
    00020 #include <fbxsdk/fbxsdk_nsbegin.h>
    00021
    00026 class FBXSDK_DLL FbxStatus
    00027 {
    00028 public:
    00029
    00030
    00032     enum EStatusCode {
    00033         eSuccess = 0,
    00034         eFailure,
    00035         eInsufficientMemory,
    00036         eInvalidParameter,
    00037         eIndexOutOfRange,
    00038         ePasswordError,
    00039         eInvalidFileVersion,
    00040         eInvalidFile
    00041     };
    00042
    00044     FbxStatus();
    00045
    00046     FbxStatus(EStatusCode pCode);
    00047     FbxStatus(const FbxStatus& rhs);
    00048
    00049     FbxStatus&      operator=(const FbxStatus& rhs);
    00050
    00055     bool            operator==(const FbxStatus& rhs)    const   { return (mCode == rhs.mCode); }
    00060     bool            operator==(const EStatusCode pCode) const   { return (mCode == pCode); }
    00065     bool            operator!=(const FbxStatus& rhs)    const   { return (mCode != rhs.mCode); }
    00070     bool            operator!=(const EStatusCode rhs)   const   { return (mCode != rhs); }
    00071
    00076     operator        bool() const    { return mCode==eSuccess; }
    00077
    00081     bool            Error() const   { return !this->operator bool(); }
    00082
    00084     void            Clear();
    00085
    00087     EStatusCode     GetCode() const { return mCode; }
    00088
    00092     void            SetCode(const EStatusCode rhs);
    00093
    00100     void            SetCode(const EStatusCode rhs, const char* pErrorMsg, ...);
    00101
    00103     const char*     GetErrorString() const;
    00104
    00105 /*****************************************************************************************************************************
    00106 ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
    00107 *****************************************************************************************************************************/
    00108 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00109
    00110 private:
    00111     EStatusCode     mCode;
    00112     FbxString       mErrorString;
    00113
    00114 #endif /* !DOXYGEN_SHOULD_SKIP_THIS */
    00115 };
    00116
    00117 #include <fbxsdk/fbxsdk_nsend.h>
    00118
    00119 #endif /* _FBXSDK_CORE_BASE_STATUS_H_ */