Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/new_class_id/src/lib/util/loading/dynamic_loader.h @ 9684

Last change on this file since 9684 was 9684, checked in by bensch, 18 years ago

orxonox/branches/new_class_id: slowly but surely reimplementing to the new groove… way to go

File size: 800 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 ...
19class DynamicLoader : public Factory
20{
21  NewObjectListDeclaration(DynamicLoader);
22
23public:
24  DynamicLoader(const std::string& libName);
25  virtual ~DynamicLoader();
26
27  bool loadDynamicLib(const std::string& libName);
28  virtual BaseObject* fabricateObject(const TiXmlElement* root = NULL) const;
29
30  static bool loadDyLib(const std::string& libName);
31
32
33private:
34  void*      handle;
35};
36
37#endif /* _DYNAMIC_LOADER_H */
Note: See TracBrowser for help on using the repository browser.