Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3530 in orxonox.OLD for orxonox/branches/levelloader/src/defs


Ignore:
Timestamp:
Mar 13, 2005, 10:40:25 PM (20 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

Location:
orxonox/branches/levelloader/src/defs
Files:
3 edited

Legend:

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

    r3499 r3530  
    2222#define _DEBUG_H
    2323
     24#if HAVE_CONFIG_H
     25#include <config.h>
     26#endif
     27
     28#include <stdio.h>
     29
    2430#define NO              0
    2531#define ERR             1
     
    2834#define DEBUGING        4
    2935
    30 #if HAVE_CONFIG_H
    31 #include <config.h>
    32 #endif
    33 
    34 #include <stdio.h>
    35 
    3636///////////////////////////////////////////////////
    3737/// PRINTF: prints with filename and linenumber ///
    3838///////////////////////////////////////////////////
    39 
    4039#ifdef DEBUG
    4140extern int verbose;
    4241#define PRINTF(x) \
    4342           PRINTF ## x
    44 
     43           
    4544#if DEBUG >= ERR
    4645#define PRINTF1 \
     
    9291#define PRINT(x) \
    9392  PRINT ## x
    94 
     93 
    9594#if DEBUG >= ERR
    9695#define PRINT1  \
  • orxonox/branches/levelloader/src/defs/error.h

    r3499 r3530  
    2323
    2424
    25 #ifndef _ERROR_H
    26 #define _ERROR_H
     25#ifndef _ORX_ERROR_H
     26#define _ORX_ERROR_H
    2727
    2828// these are the two undefined error nr. Don't use them ...
     
    5454*/
    5555
    56 typedef struct
     56typedef struct ErrorMessage
    5757{
    5858  int code;
  • 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.