Last change
on this file since 10635 was
7193,
checked in by bensch, 19 years ago
|
orxonox/trunk: new style for resources (prework/movement)
|
File size:
757 bytes
|
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 | |
---|
11 | #include <string> |
---|
12 | |
---|
13 | #define DYNAMIC_LINKAGE_FACTORY(CLASS_NAME, CLASS_ID) \ |
---|
14 | void* DynamicCreator(const TiXmlElement* root) { return new CLASS_NAME(root); }; |
---|
15 | |
---|
16 | // FORWARD DECLARATION |
---|
17 | |
---|
18 | //! A class for ... |
---|
19 | class DynamicLoader : public Factory |
---|
20 | { |
---|
21 | |
---|
22 | public: |
---|
23 | DynamicLoader(const std::string& libName); |
---|
24 | virtual ~DynamicLoader(); |
---|
25 | |
---|
26 | bool loadDynamicLib(const std::string& libName); |
---|
27 | virtual BaseObject* fabricateObject(const TiXmlElement* root = NULL) const; |
---|
28 | |
---|
29 | static bool loadDyLib(const std::string& libName); |
---|
30 | |
---|
31 | |
---|
32 | private: |
---|
33 | void* handle; |
---|
34 | }; |
---|
35 | |
---|
36 | #endif /* _DYNAMIC_LOADER_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.