Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9775 in orxonox.OLD for branches/new_class_id


Ignore:
Timestamp:
Sep 20, 2006, 12:04:21 AM (18 years ago)
Author:
bensch
Message:

loadParam descriptions can be printed nicely, and also switched on and off globally

Location:
branches/new_class_id/src/lib/util/loading
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/new_class_id/src/lib/util/loading/load_param.cc

    r9771 r9775  
    5757void LoadParamBase::setDescriptionValues(const ClassID& classID, unsigned int paramCount, const MultiType* const defaultValues, bool retVal)
    5858{
    59   LoadParamClassDescription::setValuesOf(classID, paramName, paramCount, defaultValues, retVal);
     59  if(LoadParamClassDescription::createsDescriptions())
     60    LoadParamClassDescription::setValuesOf(classID, paramName, paramCount, defaultValues, retVal);
    6061}
    6162
  • branches/new_class_id/src/lib/util/loading/load_param_class_description.cc

    r9772 r9775  
    2020
    2121/**
    22  * A list, that holds all the classes that are loadable (classes not objects!!)
     22 * @brief A list, that holds all the classes that are loadable (classes not objects!!)
    2323 */
    2424LoadParamClassDescription::ClassDescriptionMap LoadParamClassDescription::_classList;
    2525
    2626/**
    27  * if the description of Parameters should be executed
     27 * @brief if the description of Parameters should be executed
    2828 */
    29 bool LoadParamClassDescription::_parametersDescription = false;
     29bool LoadParamClassDescription::_createParametersDescription = false;
    3030
    3131/**
     
    8787    LoadParamClassDescription::_classList[classID] = LoadParamClassDescription(classID.name());
    8888    classIt = LoadParamClassDescription::_classList.find(classID);
    89     printf("Inserted %s\n", classID.name().c_str());
    90     printAll("");
    9189  }
    9290  // At this position the class-iterator should point to a valid usefull position.
  • branches/new_class_id/src/lib/util/loading/load_param_class_description.h

    r9771 r9775  
    5050                          bool retVal = false);
    5151
     52
     53  static void createDescriptions(bool createThem) { _createParametersDescription = createThem; };
     54  static bool createsDescriptions() { return _createParametersDescription; };
     55
    5256  static void deleteAllDescriptions();
    5357
     
    6367private:
    6468
    65   static bool                                  _parametersDescription;  //!< if parameter-description should be enabled globally.
     69  static bool                                  _createParametersDescription;  //!< if parameter-description should be enabled globally.
    6670
    6771  static ClassDescriptionMap                   _classList;              //!< a list, that stores all the loadable classes. (after one instance has been loaded)
  • branches/new_class_id/src/lib/util/loading/load_param_description.cc

    r9774 r9775  
    6565      PRINT(0)(",");
    6666    PRINT(0)("%s", this->_types[i].c_str());
    67     // FIXME
    68     //     switch (this->types[i])
    69     //     {
    70     //       default:
    71     //         PRINTF(3)("none");
    72     //         break;
    73     //       case ParameterBool:
    74     //         PRINT(3)("bool");
    75     //         break;
    76     //       case ParameterChar:
    77     //         PRINT(3)("char");
    78     //         break;
    79     //       case ParameterString:
    80     //         PRINT(3)("string");
    81     //         break;
    82     //       case ParameterInt:
    83     //         PRINT(3)("int");
    84     //         break;
    85     //       case ParameterUInt:
    86     //         PRINT(3)("Uint");
    87     //         break;
    88     //       case ParameterFloat:
    89     //         PRINT(3)("float");
    90     //         break;
    91     //       case ParameterLong:
    92     //         PRINT(3)("long");
    93     //         break;
    94     //       case ParameterXML:
    95     //         PRINT(3)("XML");
    96     //         break;
    97     //     }
    9867  }
    9968  PRINT(0)("</%s>", this->_name.c_str());
Note: See TracChangeset for help on using the changeset viewer.