Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 13, 2005, 10:40:25 PM (19 years ago)
Author:
chris
Message:

orxonox/branches/levelloader: Got the system to compile, the basic backbone now runs. What remains to be done is implementing all necessary functions to load all vital classes into a world

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/levelloader/src/defs/stdincl.h

    r3525 r3530  
    88#ifndef _STDINCL_H
    99#define _STDINCL_H
    10 
     10               
    1111#define null 0   //!< null
    1212
     
    2222#endif
    2323
     24#include <assert.h>
    2425#include <stdlib.h>
    2526#include <string.h>
     
    2728#include "glincl.h"
    2829
     30#include "error.h"
     31#include "debug.h"
    2932
    3033// MATH //
     
    4144#include "factory.h"
    4245
    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;
    4560
    4661#endif /* _STDINCL_H */
Note: See TracChangeset for help on using the changeset viewer.