Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/branches/ll2trunktemp/src/defs/stdincl.h @ 3940

Last change on this file since 3940 was 3940, checked in by chris, 19 years ago

orxonox/branches/ll2trunktemp: I tried… Not working…

File size: 1.0 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
11typedef unsigned char byte;
12
13#include "confincl.h"
14
15#ifdef __WIN32__
16#include <windows.h>
17#endif
18
19#include <stddef.h>
20#include <stdlib.h>
21#include <string.h>
22
23#include "glincl.h"
24
25#include "error.h"
26#include "debug.h"
27
28#include "compiler.h"
29#include "xmlparser/tinyxml.h"
30#include "factory.h"
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#endif /* _STDINCL_H */
Note: See TracBrowser for help on using the repository browser.