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 
20 
21 #include <fbxsdk/fbxsdk_nsbegin.h>
22 
30 {
31 public:
32 
33 
35  enum EStatusCode {
36  eSuccess = 0,
44  eSceneCheckFail
45  };
46 
48  FbxStatus();
49  FbxStatus(EStatusCode pCode);
50  FbxStatus(const FbxStatus& rhs);
51 
52  ~FbxStatus();
53 
54  FbxStatus& operator=(const FbxStatus& rhs);
55  FbxStatus& operator+=(const FbxStatus& rhs);
56 
61  bool operator==(const FbxStatus& rhs) const { return (mCode == rhs.mCode); }
66  bool operator==(const EStatusCode pCode) const { return (mCode == pCode); }
71  bool operator!=(const FbxStatus& rhs) const { return (mCode != rhs.mCode); }
76  bool operator!=(const EStatusCode rhs) const { return (mCode != rhs); }
77 
82  operator bool() const { return mCode==eSuccess; }
83 
87  bool Error() const { return !this->operator bool(); }
88 
90  void Clear();
91 
93  EStatusCode GetCode() const { return mCode; }
94 
98  void SetCode(const EStatusCode rhs);
99 
106  void SetCode(const EStatusCode rhs, const char* pErrorMsg, ...);
107 
109  const char* GetErrorString() const;
110 
117  bool KeepErrorStringHistory(bool pState);
118 
126  void GetErrorStringHistory(FbxArray<FbxString*>& pHistory);
127 
128 /*****************************************************************************************************************************
129 ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
130 *****************************************************************************************************************************/
131 #ifndef DOXYGEN_SHOULD_SKIP_THIS
132 
133 private:
134  EStatusCode mCode;
135  FbxString mErrorString;
136  bool mKeepErrorStringHistory;
137 
138  FbxArray<FbxString*> mErrorStringHistory;
139 #endif /* !DOXYGEN_SHOULD_SKIP_THIS */
140 };
141 
142 #include <fbxsdk/fbxsdk_nsend.h>
143 
144 #endif /* _FBXSDK_CORE_BASE_STATUS_H_ */
Index value outside the valid range.
Definition: fbxstatus.h:40
FBX SDK environment definition.
bool operator==(const EStatusCode pCode) const
Equivalence operator.
Definition: fbxstatus.h:66
Utility class to manipulate strings.
Definition: fbxstring.h:66
An invalid parameter was provided.
Definition: fbxstatus.h:39
This class facilitates the testing/reporting of errors.
Definition: fbxstatus.h:29
bool operator!=(const FbxStatus &rhs) const
Non-Equivalence operator.
Definition: fbxstatus.h:71
Operation on FBX file password failed.
Definition: fbxstatus.h:41
bool operator==(const FbxStatus &rhs) const
Equivalence operator.
Definition: fbxstatus.h:61
Operation on the file access failed.
Definition: fbxstatus.h:43
EStatusCode
Available status codes.
Definition: fbxstatus.h:35
#define FBXSDK_DLL
Definition: fbxarch.h:176
bool Error() const
Determines whether there is an error.
Definition: fbxstatus.h:87
Operation failed.
Definition: fbxstatus.h:37
Operation failed due to insufficient memory.
Definition: fbxstatus.h:38
EStatusCode GetCode() const
Retrieve the type of error that occurred, as specified in the enumeration.
Definition: fbxstatus.h:93
bool operator!=(const EStatusCode rhs) const
Non-Equivalence operator.
Definition: fbxstatus.h:76
File version not supported (anymore or yet)
Definition: fbxstatus.h:42