Changeset 3940 in orxonox.OLD for orxonox/branches/ll2trunktemp/src/defs/stdincl.h
- Timestamp:
- Apr 23, 2005, 11:37:25 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/ll2trunktemp/src/defs/stdincl.h
r3863 r3940 27 27 28 28 #include "compiler.h" 29 #include "xmlparser/tinyxml.h" 30 #include "factory.h" 29 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 30 47 #endif /* _STDINCL_H */
Note: See TracChangeset
for help on using the changeset viewer.