Line | |
---|
1 | /*! |
---|
2 | * @file dynamic_loader.h |
---|
3 | * @brief Definition of The Dynamic Loader Factory. |
---|
4 | */ |
---|
5 | |
---|
6 | #ifndef _DYNAMIC_LOADER_H |
---|
7 | #define _DYNAMIC_LOADER_H |
---|
8 | |
---|
9 | #include "util/loading/factory.h" |
---|
10 | #include <ltdl.h> |
---|
11 | |
---|
12 | #include <string> |
---|
13 | |
---|
14 | // FORWARD DECLARATION |
---|
15 | |
---|
16 | //! A class for ... |
---|
17 | class DynamicLoader : public BaseObject |
---|
18 | { |
---|
19 | |
---|
20 | public: |
---|
21 | DynamicLoader(const std::string& libName); |
---|
22 | virtual ~DynamicLoader(); |
---|
23 | |
---|
24 | bool loadDynamicLib(const std::string& libName); |
---|
25 | |
---|
26 | static bool loadDyLib(const std::string& libName); |
---|
27 | |
---|
28 | static void addSearchDir(const std::string& searchDir); |
---|
29 | static bool addSearchDirRelative(const std::string& relSearchDir); |
---|
30 | static bool addSearchDirInLibDir(const std::string& relSearchDir); |
---|
31 | static const char* getSearchDir(); |
---|
32 | |
---|
33 | static void unload(); |
---|
34 | private: |
---|
35 | // will be done automatically when using the this Engine. |
---|
36 | static bool initialize(); |
---|
37 | |
---|
38 | private: |
---|
39 | lt_dlhandle handle; |
---|
40 | }; |
---|
41 | |
---|
42 | #endif /* _DYNAMIC_LOADER_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.