Last change
on this file since 4225 was
3746,
checked in by chris, 20 years ago
|
orxonox/branches/levelloader: Merged trunk into branch… still not working though…
|
File size:
1.2 KB
|
Line | |
---|
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 | */ |
---|
7 | |
---|
8 | #ifndef _STDINCL_H |
---|
9 | #define _STDINCL_H |
---|
10 | |
---|
11 | typedef unsigned char byte; |
---|
12 | |
---|
13 | // this includes the information from configure/makefiles |
---|
14 | #if HAVE_CONFIG_H |
---|
15 | #include <config.h> |
---|
16 | #endif |
---|
17 | |
---|
18 | #ifdef __WIN32__ |
---|
19 | #include <windows.h> |
---|
20 | #endif |
---|
21 | |
---|
22 | #include <assert.h> |
---|
23 | #include <stddef.h> |
---|
24 | #include <stdlib.h> |
---|
25 | #include <string.h> |
---|
26 | |
---|
27 | #include "glincl.h" |
---|
28 | |
---|
29 | |
---|
30 | // MATH // |
---|
31 | #include "vector.h" |
---|
32 | |
---|
33 | #include "tinyxml.h" |
---|
34 | |
---|
35 | #include "list.h" |
---|
36 | #include "list_template.h" |
---|
37 | #include "message_structures.h" |
---|
38 | #include "data_tank.h" |
---|
39 | #include "base_object.h" |
---|
40 | #include "factory.h" |
---|
41 | #include "debug.h" |
---|
42 | |
---|
43 | #define CREATE_FACTORY(x) \ |
---|
44 | class x ## Factory : public Factory { \ |
---|
45 | public: \ |
---|
46 | x ## Factory (){setNext( NULL); setClassname( #x ); initialize();} \ |
---|
47 | ~x ## Factory () {}; \ |
---|
48 | private: \ |
---|
49 | BaseObject* fabricate( TiXmlElement* root) \ |
---|
50 | { \ |
---|
51 | if(!strcmp(root->Value(), getClassname())) return new x ( root); \ |
---|
52 | else if( getNext() != NULL) return getNext()->fabricate( root); \ |
---|
53 | else return NULL; \ |
---|
54 | } \ |
---|
55 | }; \ |
---|
56 | x ## Factory global_ ## x ## Factory; |
---|
57 | |
---|
58 | #endif /* _STDINCL_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.