Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 19, 2006, 11:52:01 PM (18 years ago)
Author:
bensch
Message:

nice description again for the load_params

File:
1 edited

Legend:

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

    r9768 r9772  
    2323 */
    2424LoadParamDescription::LoadParamDescription(const std::string& paramName)
    25   : _name(paramName)
     25    : _name(paramName), _parameterCount(0)
    2626{ }
    2727
     
    3030 */
    3131LoadParamDescription::~LoadParamDescription()
    32 {
    33 }
     32{}
    3433
    3534/**
     
    4140}
    4241
     42void LoadParamDescription::setValues(unsigned int paramCount,
     43                                     const MultiType* const defaultValues,
     44                                     bool retVal)
     45{
     46  this->_parameterCount = paramCount;
     47  for (unsigned int i = 0; i < paramCount; ++i)
     48  {
     49    this->_defaultValues.push_back(defaultValues[i].getString());
     50    this->_types.push_back(MultiType::MultiTypeToString(defaultValues[i].getType()));
     51  }
     52
     53}
     54
     55
    4356/**
    4457 *  prints out this parameter, its input method and the description (if availiable)
     
    4659void LoadParamDescription::print() const
    4760{
    48   PRINT(3)(" <%s>", this->_name.c_str());
     61  PRINT(0)(" <%s>", this->_name.c_str());
    4962  for (unsigned int i = 0; i < this->_parameterCount; i++)
    5063  {
     
    5366    // FIXME
    5467    //     switch (this->types[i])
    55 //     {
    56 //       default:
    57 //         PRINTF(3)("none");
    58 //         break;
    59 //       case ParameterBool:
    60 //         PRINT(3)("bool");
    61 //         break;
    62 //       case ParameterChar:
    63 //         PRINT(3)("char");
    64 //         break;
    65 //       case ParameterString:
    66 //         PRINT(3)("string");
    67 //         break;
    68 //       case ParameterInt:
    69 //         PRINT(3)("int");
    70 //         break;
    71 //       case ParameterUInt:
    72 //         PRINT(3)("Uint");
    73 //         break;
    74 //       case ParameterFloat:
    75 //         PRINT(3)("float");
    76 //         break;
    77 //       case ParameterLong:
    78 //         PRINT(3)("long");
    79 //         break;
    80 //       case ParameterXML:
    81 //         PRINT(3)("XML");
    82 //         break;
    83 //     }
     68    //     {
     69    //       default:
     70    //         PRINTF(3)("none");
     71    //         break;
     72    //       case ParameterBool:
     73    //         PRINT(3)("bool");
     74    //         break;
     75    //       case ParameterChar:
     76    //         PRINT(3)("char");
     77    //         break;
     78    //       case ParameterString:
     79    //         PRINT(3)("string");
     80    //         break;
     81    //       case ParameterInt:
     82    //         PRINT(3)("int");
     83    //         break;
     84    //       case ParameterUInt:
     85    //         PRINT(3)("Uint");
     86    //         break;
     87    //       case ParameterFloat:
     88    //         PRINT(3)("float");
     89    //         break;
     90    //       case ParameterLong:
     91    //         PRINT(3)("long");
     92    //         break;
     93    //       case ParameterXML:
     94    //         PRINT(3)("XML");
     95    //         break;
     96    //     }
    8497  }
    85   PRINT(3)("</%s>", this->_name.c_str());
     98  PRINT(0)("</%s>", this->_name.c_str());
    8699  if (!this->_description.empty())
    87100    PRINT(3)(" -- %s", this->_description.c_str());
     
    89102  if (this->_parameterCount > 0)
    90103  {
    91     PRINT(3)(" (Default: ");
     104    PRINT(0)(" (Default: ");
    92105    for (unsigned int i = 0; i < this->_parameterCount; i++)
    93106    {
    94107      if (i > 0)
    95         PRINT(3)(", ");
     108        PRINT(0)(", ");
    96109      if (this->_types[i] == "string")
    97110      { // leave brackets !!
    98         PRINT(3)("\"%s\"", this->_defaultValues[i].c_str());
     111        PRINT(0)("\"%s\"", this->_defaultValues[i].c_str());
    99112      }
    100113      else
    101114      {
    102         PRINT(3)("%s", this->_defaultValues[i].c_str());
     115        PRINT(0)("%s", this->_defaultValues[i].c_str());
    103116      }
    104117    }
    105     PRINT(3)(")");
     118    PRINT(0)(")");
    106119  }
    107   PRINT(3)("\n");
     120  PRINT(0)("\n");
    108121}
    109122
Note: See TracChangeset for help on using the changeset viewer.