Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5644 in orxonox.OLD for trunk/src/util/loading


Ignore:
Timestamp:
Nov 19, 2005, 5:08:53 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: better loadparam start and end-cycle.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/util/loading/load_param.h

    r5556 r5644  
    7575 * called element, and that you must say true at the Fith parameter, or it will fail
    7676 * also you will have to close the Cycle again with LOAD_PARAM_END_CYCLE
    77  */
    78 #define LOAD_PARAM_START_CYCLE   const TiXmlElement* element; \
    79                                  element = root->FirstChildElement(); \
    80                                  while( element != NULL) \
    81 {
    82 /**
    83    * closes a LoadParam Loop
    84    * @see LOAD_PARAM_START_CYCLE
    85  */
    86 #define LOAD_PARAM_END_CYCLE        element = element->NextSiblingElement(); \
    87 }
     77 * @param ROOT The root XLM-element to search element under.
     78 * @param ELEMENT the element to search
     79 */
     80#define LOAD_PARAM_START_CYCLE(ROOT, ELEMENT) \
     81  const TiXmlElement* ELEMENT; \
     82  ELEMENT= ROOT->FirstChildElement(); \
     83  while( ELEMENT != NULL) \
     84  {
     85/**
     86 * closes a LoadParam Loop
     87 * @see LOAD_PARAM_START_CYCLE
     88 * @param ELEMENT the Element to step through.
     89 */
     90#define LOAD_PARAM_END_CYCLE(ELEMENT) \
     91  ELEMENT = ELEMENT->NextSiblingElement(); \
     92  }
    8893
    8994
Note: See TracChangeset for help on using the changeset viewer.