|
Last change
on this file since 3940 was
3940,
checked in by chris, 21 years ago
|
|
orxonox/branches/ll2trunktemp: I tried… Not working…
|
|
File size:
1.0 KB
|
| Rev | Line | |
|---|
| [3193] | 1 | /*! |
|---|
| 2 | \file stdincl.h |
|---|
| 3 | \brief This file includes default headers that nearly every Class needs. |
|---|
| 4 | |
|---|
| 5 | no Class is defined here, but many headers to classes, and more general Headers like the openGL-header. |
|---|
| 6 | */ |
|---|
| [1855] | 7 | |
|---|
| [3224] | 8 | #ifndef _STDINCL_H |
|---|
| 9 | #define _STDINCL_H |
|---|
| [1855] | 10 | |
|---|
| [3365] | 11 | typedef unsigned char byte; |
|---|
| 12 | |
|---|
| [3863] | 13 | #include "confincl.h" |
|---|
| [3204] | 14 | |
|---|
| [2190] | 15 | #ifdef __WIN32__ |
|---|
| 16 | #include <windows.h> |
|---|
| [1855] | 17 | #endif |
|---|
| [2995] | 18 | |
|---|
| [3607] | 19 | #include <stddef.h> |
|---|
| [3495] | 20 | #include <stdlib.h> |
|---|
| 21 | #include <string.h> |
|---|
| 22 | |
|---|
| [3433] | 23 | #include "glincl.h" |
|---|
| [2995] | 24 | |
|---|
| [3433] | 25 | #include "error.h" |
|---|
| 26 | #include "debug.h" |
|---|
| 27 | |
|---|
| [3860] | 28 | #include "compiler.h" |
|---|
| [3940] | 29 | #include "xmlparser/tinyxml.h" |
|---|
| 30 | #include "factory.h" |
|---|
| [3800] | 31 | |
|---|
| [3940] | 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 | |
|---|
| [3224] | 47 | #endif /* _STDINCL_H */ |
|---|
Note: See
TracBrowser
for help on using the repository browser.