Changeset 794 for code/branches/core/src/orxonox
- Timestamp:
- Feb 10, 2008, 1:05:27 AM (17 years ago)
- Location:
- code/branches/core/src/orxonox/core
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core/src/orxonox/core/ConfigValueContainer.cc
r792 r794 231 231 int temp; 232 232 bool success = ConvertValue(&temp, input, defvalue); 233 ((MultiTypePrimitive)this->value_).setValue(temp);233 this->value_.setValue(temp); 234 234 return success; 235 235 } … … 245 245 unsigned int temp; 246 246 bool success = ConvertValue(&temp, input, defvalue); 247 ((MultiTypePrimitive)this->value_).setValue(temp);247 this->value_.setValue(temp); 248 248 return success; 249 249 } … … 260 260 int temp; 261 261 bool success = ConvertValue(&temp, input, (int)defvalue); 262 ((MultiTypePrimitive)this->value_).setValue((char)temp);262 this->value_.setValue((char)temp); 263 263 return success; 264 264 } … … 275 275 unsigned int temp; 276 276 bool success = ConvertValue(&temp, input, (unsigned int)defvalue); 277 ((MultiTypePrimitive)this->value_).setValue((unsigned char)temp);277 this->value_.setValue((unsigned char)temp); 278 278 return success; 279 279 } … … 289 289 short temp; 290 290 bool success = ConvertValue(&temp, input, defvalue); 291 ((MultiTypePrimitive)this->value_).setValue(temp);291 this->value_.setValue(temp); 292 292 return success; 293 293 } … … 303 303 unsigned short temp; 304 304 bool success = ConvertValue(&temp, input, defvalue); 305 ((MultiTypePrimitive)this->value_).setValue(temp);305 this->value_.setValue(temp); 306 306 return success; 307 307 } … … 317 317 long temp; 318 318 bool success = ConvertValue(&temp, input, defvalue); 319 ((MultiTypePrimitive)this->value_).setValue(temp);319 this->value_.setValue(temp); 320 320 return success; 321 321 } … … 331 331 unsigned long temp; 332 332 bool success = ConvertValue(&temp, input, defvalue); 333 ((MultiTypePrimitive)this->value_).setValue(temp);333 this->value_.setValue(temp); 334 334 return success; 335 335 } … … 345 345 float temp; 346 346 bool success = ConvertValue(&temp, input, defvalue); 347 ((MultiTypePrimitive)this->value_).setValue(temp);347 this->value_.setValue(temp); 348 348 return success; 349 349 } … … 359 359 double temp; 360 360 bool success = ConvertValue(&temp, input, defvalue); 361 ((MultiTypePrimitive)this->value_).setValue(temp);361 this->value_.setValue(temp); 362 362 return success; 363 363 } … … 373 373 long double temp; 374 374 bool success = ConvertValue(&temp, input, defvalue); 375 ((MultiTypePrimitive)this->value_).setValue(temp);375 this->value_.setValue(temp); 376 376 return success; 377 377 } … … 390 390 || input.find("yes") < input.size() 391 391 || input.find("Yes") < input.size()) 392 ((MultiTypePrimitive)this->value_).setValue(true);392 this->value_.setValue(true); 393 393 else if (input.find("false") < input.size() 394 394 || input.find("False") < input.size() 395 395 || input.find("no") < input.size() 396 396 || input.find("No") < input.size()) 397 ((MultiTypePrimitive)this->value_).setValue(false);397 this->value_.setValue(false); 398 398 else 399 399 { … … 401 401 bool temp; 402 402 bool success = ConvertValue(&temp, input, defvalue); 403 ((MultiTypePrimitive)this->value_).setValue(temp);403 this->value_.setValue(temp); 404 404 return success; 405 405 } -
code/branches/core/src/orxonox/core/ConfigValueContainer.h
r792 r794 79 79 inline ConfigValueContainer& getValue(T& value) { this->value_.getValue(value); return *this; } 80 80 */ 81 inline ConfigValueContainer& getValue(int* value) { ((MultiTypePrimitive)this->value_).getValue(value); return *this; }82 inline ConfigValueContainer& getValue(unsigned int* value) { ((MultiTypePrimitive)this->value_).getValue(value); return *this; }83 inline ConfigValueContainer& getValue(char* value) { ((MultiTypePrimitive)this->value_).getValue(value); return *this; }84 inline ConfigValueContainer& getValue(unsigned char* value) { ((MultiTypePrimitive)this->value_).getValue(value); return *this; }85 inline ConfigValueContainer& getValue(short* value) { ((MultiTypePrimitive)this->value_).getValue(value); return *this; }86 inline ConfigValueContainer& getValue(unsigned short* value) { ((MultiTypePrimitive)this->value_).getValue(value); return *this; }87 inline ConfigValueContainer& getValue(long* value) { ((MultiTypePrimitive)this->value_).getValue(value); return *this; }88 inline ConfigValueContainer& getValue(unsigned long* value) { ((MultiTypePrimitive)this->value_).getValue(value); return *this; }89 inline ConfigValueContainer& getValue(float* value) { ((MultiTypePrimitive)this->value_).getValue(value); return *this; }90 inline ConfigValueContainer& getValue(double* value) { ((MultiTypePrimitive)this->value_).getValue(value); return *this; }91 inline ConfigValueContainer& getValue(long double* value) { ((MultiTypePrimitive)this->value_).getValue(value); return *this; }92 inline ConfigValueContainer& getValue(bool* value) { ((MultiTypePrimitive)this->value_).getValue(value); return *this; }93 inline ConfigValueContainer& getValue(std::string* value) { ((MultiTypeString)this->value_).getValue(value); return *this; }81 inline ConfigValueContainer& getValue(int* value) { this->value_.getValue(value); return *this; } 82 inline ConfigValueContainer& getValue(unsigned int* value) { this->value_.getValue(value); return *this; } 83 inline ConfigValueContainer& getValue(char* value) { this->value_.getValue(value); return *this; } 84 inline ConfigValueContainer& getValue(unsigned char* value) { this->value_.getValue(value); return *this; } 85 inline ConfigValueContainer& getValue(short* value) { this->value_.getValue(value); return *this; } 86 inline ConfigValueContainer& getValue(unsigned short* value) { this->value_.getValue(value); return *this; } 87 inline ConfigValueContainer& getValue(long* value) { this->value_.getValue(value); return *this; } 88 inline ConfigValueContainer& getValue(unsigned long* value) { this->value_.getValue(value); return *this; } 89 inline ConfigValueContainer& getValue(float* value) { this->value_.getValue(value); return *this; } 90 inline ConfigValueContainer& getValue(double* value) { this->value_.getValue(value); return *this; } 91 inline ConfigValueContainer& getValue(long double* value) { this->value_.getValue(value); return *this; } 92 inline ConfigValueContainer& getValue(bool* value) { this->value_.getValue(value); return *this; } 93 inline ConfigValueContainer& getValue(std::string* value) { this->value_.getValue(value); return *this; } 94 94 inline ConfigValueContainer& getValue(Vector2* value) { this->value_.getValue(value); return *this; } 95 95 inline ConfigValueContainer& getValue(Vector3* value) { this->value_.getValue(value); return *this; }
Note: See TracChangeset
for help on using the changeset viewer.