Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3901 in orxonox.OLD for orxonox/branches/levelLoader.tmp/src/util


Ignore:
Timestamp:
Apr 20, 2005, 12:16:32 AM (20 years ago)
Author:
bensch
Message:

orxonox/branches/levelLoader.tmp: temporaty

Location:
orxonox/branches/levelLoader.tmp/src/util/levelLoader
Files:
1 added
2 copied

Legend:

Unmodified
Added
Removed
  • orxonox/branches/levelLoader.tmp/src/util/levelLoader/factory.h

    r3898 r3901  
    66#ifndef _FACTORY_H
    77#define _FACTORY_H
     8
     9
     10/** creates a Subclass of Factory, that HOPEFULLY loads modules \todo check it for real */
     11#define CREATE_FACTORY(x) \
     12                class x ## Factory : public Factory { \
     13                 public:        \
     14                  x ## Factory (){setNext( NULL); setClassname( #x ); initialize();} \
     15                  ~x ## Factory () {}; \
     16                 private: \
     17                        BaseObject* fabricate( TiXmlElement* root) \
     18                        { \
     19                                if(!strcmp(root->Value(), getClassname())) return new  x ( root); \
     20                                else if( getNext() != NULL) return getNext()->fabricate( root); \
     21                                else return NULL; \
     22                        } \
     23                }; \
     24                x ## Factory global_ ## x ## Factory;
    825
    926#include "stdincl.h"
Note: See TracChangeset for help on using the changeset viewer.