- Timestamp:
- Sep 19, 2006, 11:52:01 PM (18 years ago)
- Location:
- branches/new_class_id/src/lib/util/loading
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/new_class_id/src/lib/util/loading/load_param_class_description.cc
r9771 r9772 55 55 ParamDescriptionMap::iterator it = LoadParamClassDescription::getParamDescription(classID, paramName); 56 56 57 (*it).second.setDescription(descriptionText); 57 58 } 58 59 … … 65 66 { 66 67 ParamDescriptionMap::iterator it = LoadParamClassDescription::getParamDescription(classID, paramName); 67 68 (*it).second.setValues(paramCount, defaultValues, retVal); 68 69 } 69 70 … … 126 127 ++param) 127 128 { 128 ///(*param).second.print();129 (*param).second.print(); 129 130 } 130 131 PRINT(0)("</%s>\n\n", (*classIt).second._className.c_str()); -
branches/new_class_id/src/lib/util/loading/load_param_description.cc
r9768 r9772 23 23 */ 24 24 LoadParamDescription::LoadParamDescription(const std::string& paramName) 25 : _name(paramName)25 : _name(paramName), _parameterCount(0) 26 26 { } 27 27 … … 30 30 */ 31 31 LoadParamDescription::~LoadParamDescription() 32 { 33 } 32 {} 34 33 35 34 /** … … 41 40 } 42 41 42 void 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 43 56 /** 44 57 * prints out this parameter, its input method and the description (if availiable) … … 46 59 void LoadParamDescription::print() const 47 60 { 48 PRINT( 3)(" <%s>", this->_name.c_str());61 PRINT(0)(" <%s>", this->_name.c_str()); 49 62 for (unsigned int i = 0; i < this->_parameterCount; i++) 50 63 { … … 53 66 // FIXME 54 67 // 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 // } 84 97 } 85 PRINT( 3)("</%s>", this->_name.c_str());98 PRINT(0)("</%s>", this->_name.c_str()); 86 99 if (!this->_description.empty()) 87 100 PRINT(3)(" -- %s", this->_description.c_str()); … … 89 102 if (this->_parameterCount > 0) 90 103 { 91 PRINT( 3)(" (Default: ");104 PRINT(0)(" (Default: "); 92 105 for (unsigned int i = 0; i < this->_parameterCount; i++) 93 106 { 94 107 if (i > 0) 95 PRINT( 3)(", ");108 PRINT(0)(", "); 96 109 if (this->_types[i] == "string") 97 110 { // leave brackets !! 98 PRINT(3)("\"%s\"", this->_defaultValues[i].c_str());111 PRINT(0)("\"%s\"", this->_defaultValues[i].c_str()); 99 112 } 100 113 else 101 114 { 102 PRINT(3)("%s", this->_defaultValues[i].c_str());115 PRINT(0)("%s", this->_defaultValues[i].c_str()); 103 116 } 104 117 } 105 PRINT( 3)(")");118 PRINT(0)(")"); 106 119 } 107 PRINT( 3)("\n");120 PRINT(0)("\n"); 108 121 } 109 122 -
branches/new_class_id/src/lib/util/loading/load_param_description.h
r9771 r9772 43 43 44 44 void setDescription(const std::string& descriptionText); 45 void setValues(unsigned int paramCount, 46 const MultiType* const defaultValues, 47 bool retVal = false); 45 48 /** @returns the descriptionString */ 46 49 const std::string& description() { return this->_description; };
Note: See TracChangeset
for help on using the changeset viewer.