00001
00004 #ifndef FBXFILESDK_KFBXIO_KFBXIO_H
00005 #define FBXFILESDK_KFBXIO_KFBXIO_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
00043 #include <fbxfilesdk/components/kbaselib/kaydaradef_h.h>
00044 #include <fbxfilesdk/components/kbaselib/kaydara.h>
00045
00046 #include <fbxfilesdk/components/kbaselib/klib/kerror.h>
00047 #include <fbxfilesdk/components/kbaselib/klib/kstring.h>
00048
00049 #include <fbxfilesdk/components/kbaselib/kbaselib_forward.h>
00050
00051 #include <fbxfilesdk/kfbxplugins/kfbxobject.h>
00052
00053 #ifdef KARCH_DEV_MACOSX_CFM
00054 #include <CFURL.h>
00055 #include <Files.h>
00056 #endif
00057
00058 #include <fbxfilesdk/fbxfilesdk_nsbegin.h>
00059
00060 class KFbxSdkManager;
00061 class KFbxStreamOptions;
00062
00063 #define KFBXIO_END_NODE_STR ("_End")
00064
00068 class KFBX_DLL KFbxIO : public KFbxObject
00069
00070 {
00071 KFBXOBJECT_DECLARE(KFbxIO,KFbxObject);
00072
00073 public:
00074
00081 static void GetCurrentVersion(int& pMajor, int& pMinor, int& pRevision);
00082
00088 virtual bool Initialize(const char *pFileName);
00089
00090 #ifdef KARCH_DEV_MACOSX_CFM
00091 virtual bool Initialize(const FSSpec &pMacFileSpec);
00092 virtual bool Initialize(const FSRef &pMacFileRef);
00093 virtual bool Initialize(const CFURLRef &pMacURL);
00094 #endif
00095
00099 virtual KString GetFileName();
00100
00105
00109 KError& GetError();
00110
00125 typedef enum
00126 {
00127 eFILE_CORRUPTED,
00128 eFILE_VERSION_NOT_SUPPORTED_YET,
00129 eFILE_VERSION_NOT_SUPPORTED_ANYMORE,
00130 eFILE_NOT_OPENED,
00131 eFILE_NOT_CREATED,
00132 eOUT_OF_DISK_SPACE,
00133 eUNINITIALIZED_FILENAME,
00134 eUNIDENTIFIED_ERROR,
00135 eINDEX_OUT_OF_RANGE,
00136 ePASSWORD_ERROR,
00137 eSTREAM_OPTIONS_NOT_SET,
00138 eEMBEDDED_OUT_OF_SPACE,
00139 eERROR_COUNT
00140 } EError;
00141
00145 EError GetLastErrorID() const;
00146
00150 const char* GetLastErrorString() const;
00151
00155 void GetMessage(KString& pMessage) const;
00156
00158
00160
00161
00162
00163
00164
00165
00167
00168 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00169
00170 protected:
00171
00172 KFbxIO(KFbxSdkManager& pManager,char const* pName);
00173 virtual ~KFbxIO();
00174
00175 KError mError;
00176 KString mFilename;
00177 KFbxSdkManager* mManager;
00178 KFbxStreamOptions* mStreamOptions;
00179 KString mMessage;
00180
00181 #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS
00182
00183 };
00184
00185 #include <fbxfilesdk/fbxfilesdk_nsend.h>
00186
00187 #endif // FBXFILESDK_KFBXIO_KFBXIO_H
00188