kfbxreader.h
Go to the documentation of this file.00001
00004 #ifndef _FBXSDK_READER_H_
00005 #define _FBXSDK_READER_H_
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 #include <kaydaradef.h>
00043
00044 #ifndef KFBX_DLL
00045 #define KFBX_DLL K_DLLIMPORT
00046 #endif
00047
00048 #include <klib/kerror.h>
00049
00050 #include <kbaselib_forward.h>
00051 #ifndef MB_FBXSDK
00052 #include <kbaselib_nsuse.h>
00053 #endif
00054
00055 #include <kfcurve/kfcurve_forward.h>
00056 #ifndef MB_FBXSDK
00057 #include <kfcurve/kfcurve_nsuse.h>
00058 #endif
00059
00060 #include <fbxfilesdk_nsbegin.h>
00061
00062 class KFbxScene;
00063 class KFbxNode;
00064 class KFbxSdkManager;
00065 class KFbxImporter;
00066 class KFbxStreamOptions;
00067
00068 class KFBX_DLL KFbxReader
00069 {
00070
00071 public:
00072
00073 KFbxReader(KFbxSdkManager& pManager);
00074 virtual ~KFbxReader();
00075
00076 virtual void GetVersion(int& pMajor, int& pMinor, int& pRevision) const;
00077
00078 virtual bool FileOpen(char* pFileName) = 0;
00079 virtual bool FileClose() = 0;
00080 virtual bool IsFileOpen() = 0;
00081
00082 virtual KFbxStreamOptions* GetReadOptions(bool pParseFileAsNeeded = true) = 0;
00083 virtual bool Read(KFbxScene &pScene, KFbxStreamOptions* pStreamOptions) = 0;
00084
00086 typedef enum
00087 {
00088 eFILE_CORRUPTED,
00089 eFILE_VERSION_NOT_SUPPORTED_YET,
00090 eFILE_VERSION_NOT_SUPPORTED_ANYMORE,
00091 eFILE_NOT_OPENED,
00092 eFILE_NOT_CREATED,
00093 eWRONG_PASSWORD,
00094 eSTREAM_OPTIONS_NOT_SET,
00095 eUNIDENTIFIED_ERROR,
00096 eERROR_COUNT
00097 } EError;
00098
00099 KError& GetError();
00100 EError GetLastErrorID();
00101 char* GetLastErrorString();
00102
00103 void GetMessage(KString &pMessage);
00104 void ClearMessage();
00105
00106 typedef KFbxReader* (*CreateFuncType)(KFbxSdkManager& pManager,
00107 KFbxImporter& pImporter,
00108 int pID);
00109
00110 enum KInfoRequest {
00111 eInfoExtension,
00112 eInfoDescriptions,
00113 eReserved1 = 0xFBFB,
00114 };
00115
00116 typedef void* (*GetInfoFuncType)(KInfoRequest pRequest, int pReaderTypeId);
00117
00118 protected:
00119
00120 KFbxReader& operator=(KFbxReader const&) { return *this; }
00121 virtual bool CheckDuplicateNodeNames(KFbxNode* pRootNode, KString& pDuplicateNodeNameList);
00122
00123 KFbxSdkManager& mManager;
00124 KError mError;
00125
00126 KString mMessage;
00127 };
00128
00129 #include <fbxfilesdk_nsend.h>
00130
00131 #endif // #ifndef _FBXSDK_READER_H_
00132
00133