fbxscopedloadingdirectory.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /****************************************************************************************
  2. Copyright (C) 2015 Autodesk, Inc.
  3. All rights reserved.
  4. Use of this software is subject to the terms of the Autodesk license agreement
  5. provided at the time of installation or download, or which otherwise accompanies
  6. this software in either electronic or hard copy form.
  7. ****************************************************************************************/
  8. //! \file fbxscopedloadingdirectory.h
  9. #ifndef _FBXSDK_CORE_SCOPED_LOADING_DIRECTORY_H_
  10. #define _FBXSDK_CORE_SCOPED_LOADING_DIRECTORY_H_
  11. #include <fbxsdk/fbxsdk_def.h>
  12. #ifndef FBXSDK_ENV_WINSTORE
  13. #include <fbxsdk/core/fbxloadingstrategy.h>
  14. #include <fbxsdk/core/fbxmodule.h>
  15. #include <fbxsdk/fbxsdk_nsbegin.h>
  16. class FbxPluginHandle;
  17. //! A plug-in loading strategy that loads all DLLs with a specific extension from a specific directory. When this class is destroyed all of the plug-ins are unloaded.
  18. class FBXSDK_DLL FbxScopedLoadingDirectory : public FbxLoadingStrategy
  19. {
  20. public:
  21. /** Constructor, which also load plug-ins in the folder specified.
  22. * \param pDirectoryPath The directory path.
  23. * \param pPluginExtension The plug-in extension. */
  24. FbxScopedLoadingDirectory(const char* pDirectoryPath, const char* pPluginExtension);
  25. /** Destructor. Unload plug-ins. */
  26. virtual ~FbxScopedLoadingDirectory();
  27. /*****************************************************************************************************************************
  28. ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
  29. *****************************************************************************************************************************/
  30. #ifndef DOXYGEN_SHOULD_SKIP_THIS
  31. private:
  32. virtual bool SpecificLoad(FbxPluginData& pData);
  33. virtual void SpecificUnload(FbxPluginData& pData);
  34. FbxString mDirectoryPath;
  35. FbxString mExtension;
  36. FbxArray<FbxModule> mPluginHandles;
  37. #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
  38. };
  39. #include <fbxsdk/fbxsdk_nsend.h>
  40. #endif /* !FBXSDK_ENV_WINSTORE */
  41. #endif /* _FBXSDK_CORE_SCOPED_LOADING_DIRECTORY_H_ */