- Main Page
- Classes
- Files
- Directories
- Examples

- File List
- File Members

# fbxiopluginregistry.h

Go to the documentation of this file.

    00001 /****************************************************************************************
    00002
    00003    Copyright (C) 2012 Autodesk, Inc.
    00004    All rights reserved.
    00005
    00006    Use of this software is subject to the terms of the Autodesk license agreement
    00007    provided at the time of installation or download, or which otherwise accompanies
    00008    this software in either electronic or hard copy form.
    00009
    00010 ****************************************************************************************/
    00011
    00013 #ifndef _FBXSDK_FILEIO_IO_PLUGIN_REGISTRY_H_
    00014 #define _FBXSDK_FILEIO_IO_PLUGIN_REGISTRY_H_
    00015
    00016 #include <fbxsdk/fbxsdk_def.h>
    00017
    00018 #include <fbxsdk/fileio/fbxreader.h>
    00019 #include <fbxsdk/fileio/fbxwriter.h>
    00020
    00021 #include <fbxsdk/fbxsdk_nsbegin.h>
    00022
    00023 class FbxManager;
    00024 class FbxIOPluginRegistry;
    00025 class FbxExporter;
    00026 class FbxImporter;
    00027 class FbxIOSettings;
    00028
    00043 class FBXSDK_DLL FbxIOPluginRegistry
    00044 {
    00045 public:
    00046
    00049     FbxIOPluginRegistry();
    00050
    00053     virtual ~FbxIOPluginRegistry();
    00054
    00060     void RegisterReader(char const* pPluginPath,
    00061                         int& pFirstPluginID,
    00062                         int& pRegisteredCount);
    00063
    00071     void RegisterReader(FbxReader::CreateFuncType pCreateF,
    00072                         FbxReader::GetInfoFuncType pInfoF,
    00073                         int& pFirstPluginID,
    00074                         int& pRegisteredCount,
    00075                         FbxReader::IOSettingsFillerFuncType pIOSettingsFillerF = NULL
    00076                        );
    00077
    00078
    00084     void RegisterWriter(char const* pPluginPath,
    00085                         int& pFirstPluginID,
    00086                         int& pRegisteredCount);
    00087
    00095     void RegisterWriter(FbxWriter::CreateFuncType pCreateF,
    00096                         FbxWriter::GetInfoFuncType pInfoF,
    00097                         int& pFirstPluginID,
    00098                         int& pRegisteredCount,
    00099                         FbxWriter::IOSettingsFillerFuncType pIOSettingsFillerF = NULL);
    00100
    00106     FbxReader* CreateReader(FbxManager& pManager,
    00107                              FbxImporter& pImporter,
    00108                              int pPluginID) const;
    00109
    00115     FbxWriter* CreateWriter(FbxManager& pManager,
    00116                              FbxExporter& pExporter,
    00117                              int pPluginID) const;
    00118
    00123     int FindReaderIDByExtension(char const* pExt) const;
    00124
    00129     int FindWriterIDByExtension(char const* pExt) const;
    00130
    00135     int FindReaderIDByDescription(char const* pDesc) const;
    00136
    00141     int FindWriterIDByDescription(char const* pDesc) const;
    00142
    00147     bool ReaderIsFBX(int pFileFormat) const;
    00148
    00153     bool WriterIsFBX(int pFileFormat) const;
    00154
    00159     bool ReaderIsGenuine(int pFileFormat) const;
    00160
    00165     bool WriterIsGenuine(int pFileFormat) const;
    00166
    00170     int GetReaderFormatCount() const;
    00171
    00178     int GetWriterFormatCount() const;
    00179
    00184     char const* GetReaderFormatDescription(int pFileFormat) const;
    00185
    00190     char const* GetWriterFormatDescription(int pFileFormat) const;
    00191
    00196     char const* GetReaderFormatExtension(int pFileFormat) const;
    00197
    00202     char const* GetWriterFormatExtension(int pFileFormat) const;
    00203
    00208     char const* const* GetWritableVersions(int pFileFormat) const;
    00209
    00220     bool DetectReaderFileFormat(const char* pFileName, int& pFileFormat) const;
    00221
    00232     bool DetectWriterFileFormat(const char* pFileName, int& pFileFormat) const;
    00233
    00237     int GetNativeReaderFormat();
    00238
    00242     int GetNativeWriterFormat();
    00243
    00247     void FillIOSettingsForReadersRegistered(FbxIOSettings & pIOS);
    00248
    00252     void FillIOSettingsForWritersRegistered(FbxIOSettings & pIOS);
    00253
    00254
    00256 //
    00257 //  WARNING!
    00258 //
    00259 //  Anything beyond these lines may not be documented accurately and is
    00260 //  subject to change without notice.
    00261 //
    00263
    00264 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00265
    00266 private:
    00267     void RegisterInternalIOPlugins();
    00268
    00269     struct ReaderPluginEntry
    00270     {
    00271         ReaderPluginEntry(char const* pExtension, char const* pDescription, FbxReader::CreateFuncType pCreatorFunction, int pBaseID,
    00272             FbxReader::IOSettingsFillerFuncType pIOSettingsFillerFunction=NULL);
    00273
    00274         char const*                             mExtension;
    00275         char const*                             mDescription;
    00276         FbxReader::CreateFuncType               mCreatorFunction;
    00277         FbxReader::IOSettingsFillerFuncType mIOSettingsFillerFunction;
    00278         int                                     mBaseID;
    00279         bool                                    mIsFBX;
    00280         bool                                    mIsInternalPlugin;
    00281     };
    00282
    00283     struct WriterPluginEntry
    00284     {
    00285         WriterPluginEntry(char const* pExtension, char const* pDescription, char const* const* pVersions, FbxWriter::CreateFuncType pCreatorFunction, int pBaseID,
    00286             FbxWriter::IOSettingsFillerFuncType pIOSettingsFillerFunction=NULL);
    00287
    00288         char const*                             mExtension;
    00289         char const*                             mDescription;
    00290         char const* const*                      mVersions;
    00291         FbxWriter::CreateFuncType               mCreatorFunction;
    00292         FbxWriter::IOSettingsFillerFuncType mIOSettingsFillerFunction;
    00293         int                                     mBaseID;
    00294         bool                                    mIsFBX;
    00295         bool                                    mIsInternalPlugin;
    00296     };
    00297
    00298     FbxArray<ReaderPluginEntry*>    mReaders;
    00299     FbxArray<WriterPluginEntry*>    mWriters;
    00300     int                                 mNativeReaderFormat;
    00301     int                                 mNativeWriterFormat;
    00302     bool                                mInternalPluginMode;
    00303
    00304 #endif //DOXYGEN
    00305 };
    00306
    00307 #include <fbxsdk/fbxsdk_nsend.h>
    00308
    00309 #endif /* _FBXSDK_FILEIO_IO_PLUGIN_REGISTRY_H_ */