Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4252 in orxonox.OLD


Ignore:
Timestamp:
May 21, 2005, 11:39:23 PM (19 years ago)
Author:
bensch
Message:

orxonox/branches/levelLoader: macro-war

Location:
orxonox/branches/levelLoader/src/util/loading
Files:
3 edited

Legend:

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

    r4250 r4252  
    3333    this should be used at the beginning of all the Classes that should be loadable (in the cc-file)
    3434*/
    35 #define CREATE_FACTORY(x) tFactory<x>* global_ ## x ## Factory = new tFactory<x>(#x)
     35#define CREATE_FACTORY(CLASS_NAME) tFactory<CLASS_NAME>* global_##CLASS_NAME##Factory = new tFactory<CLASS_NAME>(#CLASS_NAME); \
     36        CREATE_LOAD_DOC(CLASS_NAME)
    3637
    3738
  • orxonox/branches/levelLoader/src/util/loading/load_param.cc

    r4251 r4252  
    2626   \brief if the description of Parameters should be executed
    2727*/
    28 bool LoadClassDescription::ParametersDescription = false;
     28bool LoadClassDescription::parametersDescription = false;
  • orxonox/branches/levelLoader/src/util/loading/load_param.h

    r4251 r4252  
    6868    { \
    6969      const char* loadString = grabParameter(root, paramName); \
    70       if (loadString != NULL) \
     70      if (loadString != NULL && root != NULL) \
    7171        (*pt2Object.*function)(type1##_FUNC(loadString)); \
    7272      else \
     
    8181    { \
    8282      const char* loadString = grabParameter(root, paramName); \
    83       if (loadString != NULL) \
     83      if (loadString != NULL && root != NULL) \
    8484        { \
    8585          SubString subLoads(loadString); \
     
    101101    { \
    102102      const char* loadString = grabParameter(root, paramName); \
    103       if (loadString != NULL) \
     103      if (loadString != NULL && root != NULL) \
    104104        { \
    105105          SubString subLoads(loadString); \
     
    121121    { \
    122122      const char* loadString = grabParameter(root, paramName); \
    123       if (loadString != NULL) \
     123      if (loadString != NULL && root != NULL) \
    124124        { \
    125125          SubString subLoads(loadString); \
     
    141141    { \
    142142      const char* loadString = grabParameter(root, paramName); \
    143       if (loadString != NULL) \
     143      if (loadString != NULL && root != NULL) \
    144144        { \
    145145          SubString subLoads(loadString); \
     
    155155
    156156
     157
     158#define CREATE_LOAD_DOC(CLASS_NAME) \
     159
     160/*  void documentLoadClass(void) \
     161    { \
     162      if(LoadClassDescription::parametersDescription) \
     163        { \
     164          CLASS_NAME docuClass; \
     165          docuClass.load(NULL); \
     166        } \
     167    } \
     168  documentLoadClass();
     169*/
    157170
    158171class LoadParamDescription
     
    170183
    171184
    172   static bool ParametersDescription;
     185  static bool parametersDescription;
    173186 
    174187 private:
Note: See TracChangeset for help on using the changeset viewer.