Changeset 957 for code/branches/core2/src/orxonox/core/Executor.cc
- Timestamp:
- Mar 30, 2008, 5:38:03 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core2/src/orxonox/core/Executor.cc
r947 r957 64 64 } 65 65 66 voidExecutor::setDescription(const std::string& description)66 Executor& Executor::setDescription(const std::string& description) 67 67 { 68 68 if (!this->bAddedDescription_) … … 72 72 this->bAddedDescription_ = true; 73 73 } 74 return (*this); 74 75 } 75 76 … … 79 80 } 80 81 81 voidExecutor::setDescriptionParam(int param, const std::string& description)82 Executor& Executor::setDescriptionParam(int param, const std::string& description) 82 83 { 83 84 if (param >= 0 && param < MAX_FUNCTOR_ARGUMENTS) … … 87 88 std::string paramnumber; 88 89 if (!Convert::ToString(¶mnumber, param)) 89 return ;90 return (*this); 90 91 91 92 this->descriptionParam_[param] = std::string("ExecutorDescription::" + this->name_ + "::param" + paramnumber); … … 94 95 } 95 96 } 97 return (*this); 96 98 } 97 99 … … 104 106 } 105 107 106 voidExecutor::setDescriptionReturnvalue(const std::string& description)108 Executor& Executor::setDescriptionReturnvalue(const std::string& description) 107 109 { 108 110 if (!this->bAddedDescriptionReturnvalue_) … … 112 114 this->bAddedDescriptionReturnvalue_ = true; 113 115 } 116 return (*this); 114 117 } 115 118 … … 119 122 } 120 123 121 void Executor::setDefaultValues(const MultiTypeMath& param1) 122 { 123 this->defaultValue_[0] = param1; 124 this->bAddedDefaultValue_[0] = true; 125 } 126 127 void Executor::setDefaultValues(const MultiTypeMath& param1, const MultiTypeMath& param2) 128 { 129 this->defaultValue_[0] = param1; 130 this->bAddedDefaultValue_[0] = true; 131 this->defaultValue_[1] = param2; 132 this->bAddedDefaultValue_[1] = true; 133 } 134 135 void Executor::setDefaultValues(const MultiTypeMath& param1, const MultiTypeMath& param2, const MultiTypeMath& param3) 124 Executor& Executor::setDefaultValues(const MultiTypeMath& param1) 125 { 126 this->defaultValue_[0] = param1; 127 this->bAddedDefaultValue_[0] = true; 128 129 return (*this); 130 } 131 132 Executor& Executor::setDefaultValues(const MultiTypeMath& param1, const MultiTypeMath& param2) 133 { 134 this->defaultValue_[0] = param1; 135 this->bAddedDefaultValue_[0] = true; 136 this->defaultValue_[1] = param2; 137 this->bAddedDefaultValue_[1] = true; 138 139 return (*this); 140 } 141 142 Executor& Executor::setDefaultValues(const MultiTypeMath& param1, const MultiTypeMath& param2, const MultiTypeMath& param3) 136 143 { 137 144 this->defaultValue_[0] = param1; … … 141 148 this->defaultValue_[2] = param3; 142 149 this->bAddedDefaultValue_[2] = true; 143 } 144 145 void Executor::setDefaultValues(const MultiTypeMath& param1, const MultiTypeMath& param2, const MultiTypeMath& param3, const MultiTypeMath& param4) 150 151 return (*this); 152 } 153 154 Executor& Executor::setDefaultValues(const MultiTypeMath& param1, const MultiTypeMath& param2, const MultiTypeMath& param3, const MultiTypeMath& param4) 146 155 { 147 156 this->defaultValue_[0] = param1; … … 153 162 this->defaultValue_[3] = param4; 154 163 this->bAddedDefaultValue_[3] = true; 155 } 156 157 void Executor::setDefaultValues(const MultiTypeMath& param1, const MultiTypeMath& param2, const MultiTypeMath& param3, const MultiTypeMath& param4, const MultiTypeMath& param5) 164 165 return (*this); 166 } 167 168 Executor& Executor::setDefaultValues(const MultiTypeMath& param1, const MultiTypeMath& param2, const MultiTypeMath& param3, const MultiTypeMath& param4, const MultiTypeMath& param5) 158 169 { 159 170 this->defaultValue_[0] = param1; … … 167 178 this->defaultValue_[4] = param5; 168 179 this->bAddedDefaultValue_[4] = true; 169 } 170 171 void Executor::setDefaultValue(unsigned int index, const MultiTypeMath& param) 180 181 return (*this); 182 } 183 184 Executor& Executor::setDefaultValue(unsigned int index, const MultiTypeMath& param) 172 185 { 173 186 if (index >= 0 && index < MAX_FUNCTOR_ARGUMENTS) … … 176 189 this->bAddedDefaultValue_[index] = true; 177 190 } 191 return (*this); 178 192 } 179 193
Note: See TracChangeset
for help on using the changeset viewer.