| 1 | /**************************************************************************************** |
| 2 | |
| 3 | Copyright (C) 2015 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 | |
| 12 | //! \file fbxiobase.h |
| 13 | #ifndef _FBXSDK_FILEIO_IO_BASE_H_ |
| 14 | #define _FBXSDK_FILEIO_IO_BASE_H_ |
| 15 | |
| 16 | #include <fbxsdk/fbxsdk_def.h> |
| 17 | |
| 18 | #include <fbxsdk/core/fbxobject.h> |
| 19 | #include <fbxsdk/core/base/fbxstatus.h> |
| 20 | |
| 21 | #include <fbxsdk/fbxsdk_nsbegin.h> |
| 22 | |
| 23 | #define FBXSDK_IO_END_NODE_STR "_End" |
| 24 | |
| 25 | /** \brief Base class for FBX file importer and exporter. |
| 26 | * \nosubgrouping |
| 27 | */ |
| 28 | class FBXSDK_DLL FbxIOBase : public FbxObject |
| 29 | { |
| 30 | FBXSDK_OBJECT_DECLARE(FbxIOBase, FbxObject); |
| 31 | |
| 32 | public: |
| 33 | /** Initializes the object. |
| 34 | * \param pFileName The name of the file to access. |
| 35 | * \param pFileFormat Unused in this class implementation. |
| 36 | * \param pIOSettings Unused in this class implementation. |
| 37 | * \return \c True if successful, returns \c False otherwise. |
| 38 | * \remarks To identify the error, inspect \e mStatus. |
| 39 | */ |
| 40 | virtual bool Initialize(const char *pFileName, int pFileFormat=-1, FbxIOSettings* pIOSettings=NULL); |
| 41 | |
| 42 | /** Returns the file name. |
| 43 | * \return The file name or an empty string if no filename has been set. |
| 44 | */ |
| 45 | virtual FbxString GetFileName(); |
| 46 | |
| 47 | //! Get the status object containing the success or failure state. |
| 48 | FbxStatus& GetStatus() { return mStatus; } |
| 49 | |
| 50 | /***************************************************************************************************************************** |
| 51 | ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! ** |
| 52 | *****************************************************************************************************************************/ |
| 53 | #ifndef DOXYGEN_SHOULD_SKIP_THIS |
| 54 | protected: |
| 55 | virtual void Construct(const FbxObject* pFrom); |
| 56 | |
| 57 | int DetectReaderFileFormat(const char *pFileName); |
| 58 | int DetectWriterFileFormat(const char *pFileName); |
| 59 | |
| 60 | FbxStatus mStatus; |
| 61 | FbxString mFilename; |
| 62 | #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/ |
| 63 | }; |
| 64 | |
| 65 | #include <fbxsdk/fbxsdk_nsend.h> |
| 66 | |
| 67 | #endif /* _FBXSDK_FILEIO_IO_BASE_H_ */ |
| 68 | |