FBX C++ API Reference
fbxstatus.h
Go to the documentation of this file.
1 /****************************************************************************************
2 
3  Copyright (C) 2016 Autodesk, Inc.
4  All rights reserved.
5 
6  Use of this software is subject to the terms of the Autodesk license agreement
7  provided at the time of installation or download, or which otherwise accompanies
8  this software in either electronic or hard copy form.
9 
10 ****************************************************************************************/
11 
13 #ifndef _FBXSDK_CORE_BASE_STATUS_H_
14 #define _FBXSDK_CORE_BASE_STATUS_H_
15 
16 #include <fbxsdk/fbxsdk_def.h>
17 
19 
20 #include <fbxsdk/fbxsdk_nsbegin.h>
21 
27 {
28 public:
29 
30 
32  enum EStatusCode {
33  eSuccess = 0,
41  eSceneCheckFail
42  };
43 
45  FbxStatus();
46 
47  FbxStatus(EStatusCode pCode);
48  FbxStatus(const FbxStatus& rhs);
49 
50  FbxStatus& operator=(const FbxStatus& rhs);
51 
56  bool operator==(const FbxStatus& rhs) const { return (mCode == rhs.mCode); }
61  bool operator==(const EStatusCode pCode) const { return (mCode == pCode); }
66  bool operator!=(const FbxStatus& rhs) const { return (mCode != rhs.mCode); }
71  bool operator!=(const EStatusCode rhs) const { return (mCode != rhs); }
72 
77  operator bool() const { return mCode==eSuccess; }
78 
82  bool Error() const { return !this->operator bool(); }
83 
85  void Clear();
86 
88  EStatusCode GetCode() const { return mCode; }
89 
93  void SetCode(const EStatusCode rhs);
94 
101  void SetCode(const EStatusCode rhs, const char* pErrorMsg, ...);
102 
104  const char* GetErrorString() const;
105 
106 /*****************************************************************************************************************************
107 ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
108 *****************************************************************************************************************************/
109 #ifndef DOXYGEN_SHOULD_SKIP_THIS
110 
111 private:
112  EStatusCode mCode;
113  FbxString mErrorString;
114 
115 #endif /* !DOXYGEN_SHOULD_SKIP_THIS */
116 };
117 
118 #include <fbxsdk/fbxsdk_nsend.h>
119 
120 #endif /* _FBXSDK_CORE_BASE_STATUS_H_ */
Index value outside the valid range.
Definition: fbxstatus.h:37
FBX SDK environment definition.
Utility class to manipulate strings.
Definition: fbxstring.h:66
An invalid parameter was provided.
Definition: fbxstatus.h:36
This class facilitates the testing/reporting of errors.
Definition: fbxstatus.h:26
bool operator==(const EStatusCode pCode) const
Equivalence operator.
Definition: fbxstatus.h:61
Operation on FBX file password failed.
Definition: fbxstatus.h:38
bool Error() const
Determines whether there is an error.
Definition: fbxstatus.h:82
EStatusCode GetCode() const
Retrieve the type of error that occurred, as specified in the enumeration.
Definition: fbxstatus.h:88
Operation on the file access failed.
Definition: fbxstatus.h:40
EStatusCode
Available status codes.
Definition: fbxstatus.h:32
#define FBXSDK_DLL
Definition: fbxarch.h:173
bool operator==(const FbxStatus &rhs) const
Equivalence operator.
Definition: fbxstatus.h:56
Operation failed.
Definition: fbxstatus.h:34
bool operator!=(const EStatusCode rhs) const
Non-Equivalence operator.
Definition: fbxstatus.h:71
Operation failed due to insufficient memory.
Definition: fbxstatus.h:35
bool operator!=(const FbxStatus &rhs) const
Non-Equivalence operator.
Definition: fbxstatus.h:66
File version not supported (anymore or yet)
Definition: fbxstatus.h:39