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 fbxscopedloadingdirectory.h
13#ifndef _FBXSDK_CORE_SCOPED_LOADING_DIRECTORY_H_
14#define _FBXSDK_CORE_SCOPED_LOADING_DIRECTORY_H_
15
16#include <fbxsdk/fbxsdk_def.h>
17
18#ifndef FBXSDK_ENV_WINSTORE
19
20#include <fbxsdk/core/fbxloadingstrategy.h>
21#include <fbxsdk/core/fbxmodule.h>
22
23#include <fbxsdk/fbxsdk_nsbegin.h>
24
25class FbxPluginHandle;
26
27//! 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.
28class FBXSDK_DLL FbxScopedLoadingDirectory : public FbxLoadingStrategy
29{
30public:
31 /** Constructor, which also load plug-ins in the folder specified.
32 * \param pDirectoryPath The directory path.
33 * \param pPluginExtension The plug-in extension. */
34 FbxScopedLoadingDirectory(const char* pDirectoryPath, const char* pPluginExtension);
35
36 /** Destructor. Unload plug-ins. */
37 virtual ~FbxScopedLoadingDirectory();
38
39/*****************************************************************************************************************************
40** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
41*****************************************************************************************************************************/
42#ifndef DOXYGEN_SHOULD_SKIP_THIS
43private:
44 virtual bool SpecificLoad(FbxPluginData& pData);
45 virtual void SpecificUnload(FbxPluginData& pData);
46
47 FbxString mDirectoryPath;
48 FbxString mExtension;
49
50 FbxArray<FbxModule> mPluginHandles;
51#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
52};
53
54#include <fbxsdk/fbxsdk_nsend.h>
55
56#endif /* !FBXSDK_ENV_WINSTORE */
57
58#endif /* _FBXSDK_CORE_SCOPED_LOADING_DIRECTORY_H_ */
59