Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7167 in orxonox.OLD for trunk/src/util/loading/dynamic_loader.h


Ignore:
Timestamp:
Feb 19, 2006, 3:18:08 PM (18 years ago)
Author:
bensch
Message:

trunk: dynamic library loading test

File:
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/src/util/loading/dynamic_loader.h

    r7164 r7167  
    11/*!
    2  * @file proto_class.h
    3  * @brief Definition of ...
     2 * @file dynamic_loader.h
     3 * @brief Definition of The Dynamic Loader Factory.
    44*/
    55
    6 #ifndef _PROTO_CLASS_H
    7 #define _PROTO_CLASS_H
     6#ifndef _DYNAMIC_LOADER_H
     7#define _DYNAMIC_LOADER_H
    88
    9 #include "base_object.h"
     9#include "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); };
    1015
    1116// FORWARD DECLARATION
    1217
     18//! A class for ...
     19class DynamicLoader : public Factory
     20{
     21
     22public:
     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);
    1330
    1431
    15 //! A class for ...
    16 class ProtoClass : public BaseObject {
    17 
    18  public:
    19   ProtoClass();
    20   virtual ~ProtoClass();
    21 
    22 
    23  private:
    24 
     32private:
     33  void*      handle;
    2534};
    2635
    27 #endif /* _PROTO_CLASS_H */
     36#endif /* _DYNAMIC_LOADER_H */
Note: See TracChangeset for help on using the changeset viewer.