Changeset 1033 for code/branches/core2/src/orxonox
- Timestamp:
- Apr 12, 2008, 4:28:06 PM (17 years ago)
- Location:
- code/branches/core2/src/orxonox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core2/src/orxonox/core/ConfigValueIncludes.h
r1031 r1033 83 83 else \ 84 84 { \ 85 COUT(2) << "Warning: Couldn't reset variable " << #varname << ", corresponding container doesn't exist." << std::endl; \ 85 COUT(2) << "Warning: Couldn't reset config-value '" << #varname << "', corresponding container doesn't exist." << std::endl; \ 86 } 87 88 /** 89 @brief Modifies a config-value by using a modifier and some arguments. 90 @param varname The name of the config-value 91 @param modifier The name of the modifier: set, tset, add, remove, reset, update 92 */ 93 #define ModifyConfigValue(varname, modifier, ...) \ 94 orxonox::ConfigValueContainer* container##varname##modify##modifier = this->getIdentifier()->getConfigValueContainer(#varname); \ 95 if (container##varname##modify##modifier) \ 96 { \ 97 container##varname##modify##modifier->modifier(__VA_ARGS__); \ 98 container##varname##modify##modifier->getValue(&varname); \ 99 } \ 100 else \ 101 { \ 102 COUT(2) << "Warning: Couln't modify config-value '" << #varname << "', corresponding container doesn't exist." << std::endl; \ 86 103 } 87 104 -
code/branches/core2/src/orxonox/objects/test3.cc
r1030 r1033 87 87 for (unsigned int i = 0; i < this->vector_vector3_.size(); i++) 88 88 std::cout << "vector<vector3>: " << i << ": " << this->vector_vector3_[i] << std::endl; 89 90 ModifyConfigValue(value_int_, tset, "100"); 91 std::cout << std::endl; 92 std::cout << "int: " << this->value_int_ << std::endl; 93 94 ModifyConfigValue(value_int_, update); 95 std::cout << std::endl; 96 std::cout << "int: " << this->value_int_ << std::endl; 89 97 } 90 98
Note: See TracChangeset
for help on using the changeset viewer.