Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 23, 2005, 11:37:25 AM (19 years ago)
Author:
chris
Message:

orxonox/branches/ll2trunktemp: I tried… Not working…

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/ll2trunktemp/src/defs/stdincl.h

    r3863 r3940  
    2727
    2828#include "compiler.h"
     29#include "xmlparser/tinyxml.h"
     30#include "factory.h"
    2931
     32#define CREATE_FACTORY(x) \
     33                class x ## Factory : public Factory { \
     34                 public:        \
     35                  x ## Factory (){setNext( NULL); setClassname( #x ); initialize();} \
     36                  ~x ## Factory () {}; \
     37                 private: \
     38                        BaseObject* fabricate( TiXmlElement* root) \
     39                        { \
     40                                if(!strcmp(root->Value(), getClassname())) return new  x ( root); \
     41                                else if( getNext() != NULL) return getNext()->fabricate( root); \
     42                                else return NULL; \
     43                        } \
     44                }; \
     45                x ## Factory global_ ## x ## Factory;
     46               
    3047#endif /* _STDINCL_H */
Note: See TracChangeset for help on using the changeset viewer.