- Timestamp:
- Dec 29, 2007, 12:09:24 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/FICN/src/orxonox/core/ConfigValueContainer.cc
r715 r717 48 48 this->classname_ = classname; 49 49 this->varname_ = varname; 50 this->type_ = Int;50 this->type_ = VT_Int; 51 51 52 52 this->defvalueString_ = number2String(defvalue, "0"); // Try to convert the default-value to a string … … 70 70 this->classname_ = classname; 71 71 this->varname_ = varname; 72 this->type_ = uInt;72 this->type_ = VT_uInt; 73 73 74 74 this->defvalueString_ = number2String(defvalue, "0"); // Try to convert the default-value to a string … … 92 92 this->classname_ = classname; 93 93 this->varname_ = varname; 94 this->type_ = Char;94 this->type_ = VT_Char; 95 95 96 96 this->defvalueString_ = number2String((int)defvalue, "0"); // Try to convert the default-value to a string … … 114 114 this->classname_ = classname; 115 115 this->varname_ = varname; 116 this->type_ = uChar;116 this->type_ = VT_uChar; 117 117 118 118 this->defvalueString_ = number2String((unsigned int)defvalue, "0"); // Try to convert the default-value to a string … … 136 136 this->classname_ = classname; 137 137 this->varname_ = varname; 138 this->type_ = Float;138 this->type_ = VT_Float; 139 139 140 140 this->defvalueString_ = number2String(defvalue, "0.000000"); // Try to convert the default-value to a string … … 158 158 this->classname_ = classname; 159 159 this->varname_ = varname; 160 this->type_ = Double;160 this->type_ = VT_Double; 161 161 162 162 this->defvalueString_ = number2String(defvalue, "0.000000"); // Try to convert the default-value to a string … … 180 180 this->classname_ = classname; 181 181 this->varname_ = varname; 182 this->type_ = LongDouble;182 this->type_ = VT_LongDouble; 183 183 184 184 this->defvalueString_ = number2String(defvalue, "0.000000"); // Try to convert the default-value to a string … … 202 202 this->classname_ = classname; 203 203 this->varname_ = varname; 204 this->type_ = Bool;204 this->type_ = VT_Bool; 205 205 206 206 // Convert the default-value from bool to string … … 228 228 this->classname_ = classname; 229 229 this->varname_ = varname; 230 this->type_ = _String;230 this->type_ = VT_String; 231 231 232 232 this->defvalueString_ = "\"" + defvalue + "\""; // Convert the string to a "config-file-string" with quotes … … 249 249 this->classname_ = classname; 250 250 this->varname_ = varname; 251 this->type_ = ConstChar;251 this->type_ = VT_ConstChar; 252 252 253 253 this->defvalueString_ = "\"" + std::string(defvalue) + "\""; // Convert the string to a "config-file-string" with quotes … … 270 270 this->classname_ = classname; 271 271 this->varname_ = varname; 272 this->type_ = _Vector2;272 this->type_ = VT_Vector2; 273 273 274 274 // Try to convert the default-value from Vector2 to string … … 297 297 this->classname_ = classname; 298 298 this->varname_ = varname; 299 this->type_ = _Vector3;299 this->type_ = VT_Vector3; 300 300 301 301 // Try to convert the default-value from Vector3 to string … … 324 324 this->classname_ = classname; 325 325 this->varname_ = varname; 326 this->type_ = _ColourValue;326 this->type_ = VT_ColourValue; 327 327 328 328 // Try to convert the default-value from ColourValue to string … … 346 346 bool ConfigValueContainer::parseSting(const std::string& input) 347 347 { 348 if (this->type_ == ConfigValueContainer:: Int)348 if (this->type_ == ConfigValueContainer::VT_Int) 349 349 return this->parseSting(input, this->value_.value_int_); 350 else if (this->type_ == ConfigValueContainer:: uInt)350 else if (this->type_ == ConfigValueContainer::VT_uInt) 351 351 return this->parseSting(input, this->value_.value_uint_); 352 else if (this->type_ == ConfigValueContainer:: Char)352 else if (this->type_ == ConfigValueContainer::VT_Char) 353 353 return this->parseSting(input, this->value_.value_char_); 354 else if (this->type_ == ConfigValueContainer:: uChar)354 else if (this->type_ == ConfigValueContainer::VT_uChar) 355 355 return this->parseSting(input, this->value_.value_uchar_); 356 else if (this->type_ == ConfigValueContainer:: Float)356 else if (this->type_ == ConfigValueContainer::VT_Float) 357 357 return this->parseSting(input, this->value_.value_float_); 358 else if (this->type_ == ConfigValueContainer:: Double)358 else if (this->type_ == ConfigValueContainer::VT_Double) 359 359 return this->parseSting(input, this->value_.value_double_); 360 else if (this->type_ == ConfigValueContainer:: LongDouble)360 else if (this->type_ == ConfigValueContainer::VT_LongDouble) 361 361 return this->parseSting(input, this->value_.value_long_double_); 362 else if (this->type_ == ConfigValueContainer:: Bool)362 else if (this->type_ == ConfigValueContainer::VT_Bool) 363 363 return this->parseSting(input, this->value_.value_bool_); 364 else if (this->type_ == ConfigValueContainer:: _String)364 else if (this->type_ == ConfigValueContainer::VT_String) 365 365 return this->parseSting(input, this->value_string_); 366 else if (this->type_ == ConfigValueContainer:: ConstChar)366 else if (this->type_ == ConfigValueContainer::VT_ConstChar) 367 367 return this->parseSting(input, this->value_string_); 368 else if (this->type_ == ConfigValueContainer:: _Vector2)368 else if (this->type_ == ConfigValueContainer::VT_Vector2) 369 369 return this->parseSting(input, this->value_vector2_); 370 else if (this->type_ == ConfigValueContainer:: _Vector3)370 else if (this->type_ == ConfigValueContainer::VT_Vector3) 371 371 return this->parseSting(input, this->value_vector3_); 372 else if (this->type_ == ConfigValueContainer:: _ColourValue)372 else if (this->type_ == ConfigValueContainer::VT_ColourValue) 373 373 return this->parseSting(input, this->value_colourvalue_); 374 374 … … 377 377 378 378 /** 379 @brief Parses a given String into a value of the type int and assigns it to the right variable. If the conversion failed, the default-value gets assigned.379 @brief Parses a given std::string into a value of the type int and assigns it to the right variable. If the conversion failed, the default-value gets assigned. 380 380 @param input The string to convert 381 381 @param defvalue The default-value … … 388 388 389 389 /** 390 @brief Parses a given String into a value of the type unsigned int and assigns it to the right variable. If the conversion failed, the default-value gets assigned.390 @brief Parses a given std::string into a value of the type unsigned int and assigns it to the right variable. If the conversion failed, the default-value gets assigned. 391 391 @param input The string to convert 392 392 @param defvalue The default-value … … 399 399 400 400 /** 401 @brief Parses a given String into a value of the type char and assigns it to the right variable. If the conversion failed, the default-value gets assigned.401 @brief Parses a given std::string into a value of the type char and assigns it to the right variable. If the conversion failed, the default-value gets assigned. 402 402 @param input The string to convert 403 403 @param defvalue The default-value … … 411 411 412 412 /** 413 @brief Parses a given String into a value of the type unsigned char and assigns it to the right variable. If the conversion failed, the default-value gets assigned.413 @brief Parses a given std::string into a value of the type unsigned char and assigns it to the right variable. If the conversion failed, the default-value gets assigned. 414 414 @param input The string to convert 415 415 @param defvalue The default-value … … 423 423 424 424 /** 425 @brief Parses a given String into a value of the type float and assigns it to the right variable. If the conversion failed, the default-value gets assigned.425 @brief Parses a given std::string into a value of the type float and assigns it to the right variable. If the conversion failed, the default-value gets assigned. 426 426 @param input The string to convert 427 427 @param defvalue The default-value … … 434 434 435 435 /** 436 @brief Parses a given String into a value of the type double and assigns it to the right variable. If the conversion failed, the default-value gets assigned.436 @brief Parses a given std::string into a value of the type double and assigns it to the right variable. If the conversion failed, the default-value gets assigned. 437 437 @param input The string to convert 438 438 @param defvalue The default-value … … 445 445 446 446 /** 447 @brief Parses a given String into a value of the type long double and assigns it to the right variable. If the conversion failed, the default-value gets assigned.447 @brief Parses a given std::string into a value of the type long double and assigns it to the right variable. If the conversion failed, the default-value gets assigned. 448 448 @param input The string to convert 449 449 @param defvalue The default-value … … 456 456 457 457 /** 458 @brief Parses a given String into a value of the type bool and assigns it to the right variable. If the conversion failed, the default-value gets assigned.458 @brief Parses a given std::string into a value of the type bool and assigns it to the right variable. If the conversion failed, the default-value gets assigned. 459 459 @param input The string to convert 460 460 @param defvalue The default-value … … 484 484 485 485 /** 486 @brief Parses a given String into a value of the type String and assigns it to the right variable. If the conversion failed, the default-value gets assigned.486 @brief Parses a given std::string into a value of the type std::string and assigns it to the right variable. If the conversion failed, the default-value gets assigned. 487 487 @param input The string to convert 488 488 @param defvalue The default-value … … 509 509 510 510 /** 511 @brief Parses a given String into a value of the type const char* and assigns it to the right variable. If the conversion failed, the default-value gets assigned.511 @brief Parses a given std::string into a value of the type const char* and assigns it to the right variable. If the conversion failed, the default-value gets assigned. 512 512 @param input The string to convert 513 513 @param defvalue The default-value … … 534 534 535 535 /** 536 @brief Parses a given String into a value of the type _Vector2 and assigns it to the right variable. If the conversion failed, the default-value gets assigned.536 @brief Parses a given std::string into a value of the type _Vector2 and assigns it to the right variable. If the conversion failed, the default-value gets assigned. 537 537 @param input The string to convert 538 538 @param defvalue The default-value … … 568 568 569 569 /** 570 @brief Parses a given String into a value of the type Vector3 and assigns it to the right variable. If the conversion failed, the default-value gets assigned.570 @brief Parses a given std::string into a value of the type Vector3 and assigns it to the right variable. If the conversion failed, the default-value gets assigned. 571 571 @param input The string to convert 572 572 @param defvalue The default-value … … 607 607 608 608 /** 609 @brief Parses a given String into a value of the type ColourValue and assigns it to the right variable. If the conversion failed, the default-value gets assigned.609 @brief Parses a given std::string into a value of the type ColourValue and assigns it to the right variable. If the conversion failed, the default-value gets assigned. 610 610 @param input The string to convert 611 611 @param defvalue The default-value
Note: See TracChangeset
for help on using the changeset viewer.