Changeset 4003 in orxonox.OLD for orxonox/branches/ll2trunktemp/src/defs/stdincl.h
- Timestamp:
- Apr 28, 2005, 2:25:08 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/ll2trunktemp/src/defs/stdincl.h
r3940 r4003 30 30 #include "factory.h" 31 31 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 47 32 #endif /* _STDINCL_H */
Note: See TracChangeset
for help on using the changeset viewer.