| 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 fbxplugincontainer.h |
| 13 | #ifndef _FBXSDK_CORE_PLUGIN_CONTAINER_H_ |
| 14 | #define _FBXSDK_CORE_PLUGIN_CONTAINER_H_ |
| 15 | |
| 16 | #include <fbxsdk/fbxsdk_def.h> |
| 17 | |
| 18 | #ifndef FBXSDK_ENV_WINSTORE |
| 19 | |
| 20 | #include <fbxsdk/core/fbxplugin.h> |
| 21 | #include <fbxsdk/core/fbxemitter.h> |
| 22 | |
| 23 | #include <fbxsdk/fbxsdk_nsbegin.h> |
| 24 | |
| 25 | /** Manages registration and ownership of FBX SDK plug-ins (FbxPlugin). |
| 26 | * The FBX SDK will provide a pointer to FbxPluginContainer as an argument |
| 27 | * to the FBXPluginRegistration() function exported from a plug-in's DLL. |
| 28 | * A plug-in must register itself explicitly with the FbxPluginContainer |
| 29 | * by calling FbxPluginContainer::Register() after it is constructed. |
| 30 | * For an example of this process see the code example in the FbxPlugin |
| 31 | * class documentation. |
| 32 | * \see FbxPlugin |
| 33 | */ |
| 34 | class FBXSDK_DLL FbxPluginContainer : public FbxEmitter |
| 35 | { |
| 36 | public: |
| 37 | //! Definition of a plug-in list. |
| 38 | typedef FbxIntrusiveList<FbxPlugin> PluginList; |
| 39 | |
| 40 | /** The registration function that must be called when the module containing the plug-in is loaded. |
| 41 | * \param pPlugin The plug-in to register. |
| 42 | */ |
| 43 | void Register(FbxPlugin& pPlugin); |
| 44 | |
| 45 | /** The unregistration function that must be called when the module containing the plug-in is unloaded. |
| 46 | * \param pPlugin The plug-in to unregister. |
| 47 | */ |
| 48 | void Unregister(FbxPlugin& pPlugin); |
| 49 | |
| 50 | /** Const accessor to the list of plug-ins owned by the container. |
| 51 | * \return A list of plug-in registered to this container. |
| 52 | */ |
| 53 | const PluginList& GetPlugins() const; |
| 54 | |
| 55 | /** Accessor to the list of plug-ins owned by the container. |
| 56 | * \return A list of plug-in registered to this container. |
| 57 | */ |
| 58 | PluginList& GetPlugins(); |
| 59 | |
| 60 | /***************************************************************************************************************************** |
| 61 | ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! ** |
| 62 | *****************************************************************************************************************************/ |
| 63 | #ifndef DOXYGEN_SHOULD_SKIP_THIS |
| 64 | protected: |
| 65 | virtual ~FbxPluginContainer(); |
| 66 | PluginList mPlugins; |
| 67 | #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/ |
| 68 | }; |
| 69 | |
| 70 | #include <fbxsdk/fbxsdk_nsend.h> |
| 71 | |
| 72 | #endif /* !FBXSDK_ENV_WINSTORE */ |
| 73 | |
| 74 | #endif /* _FBXSDK_CORE_PLUGIN_CONTAINER_H_ */ |
| 75 | |