Changeset 3530 in orxonox.OLD for orxonox/branches/levelloader/src/defs/stdincl.h
- Timestamp:
- Mar 13, 2005, 10:40:25 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/levelloader/src/defs/stdincl.h
r3525 r3530 8 8 #ifndef _STDINCL_H 9 9 #define _STDINCL_H 10 10 11 11 #define null 0 //!< null 12 12 … … 22 22 #endif 23 23 24 #include <assert.h> 24 25 #include <stdlib.h> 25 26 #include <string.h> … … 27 28 #include "glincl.h" 28 29 30 #include "error.h" 31 #include "debug.h" 29 32 30 33 // MATH // … … 41 44 #include "factory.h" 42 45 43 #include "error.h" 44 #include "debug.h" 46 #define CREATE_FACTORY(x) \ 47 class x ## Factory : public Factory { \ 48 public: \ 49 x ## Factory (){setNext( NULL); setClassname( #x ); initialize();} \ 50 ~x ## Factory () {}; \ 51 private: \ 52 BaseObject* fabricate( TiXmlElement* root) \ 53 { \ 54 if(!strcmp(root->Value(), getClassname())) return new x ( root); \ 55 else if( getNext() != NULL) return getNext()->fabricate( root); \ 56 else return NULL; \ 57 } \ 58 }; \ 59 x ## Factory global_ ## x ## Factory; 45 60 46 61 #endif /* _STDINCL_H */
Note: See TracChangeset
for help on using the changeset viewer.