Changeset 3257 for code/branches/core4/src/core
- Timestamp:
- Jun 30, 2009, 3:14:45 PM (15 years ago)
- Location:
- code/branches/core4/src/core
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core4/src/core/CommandEvaluation.cc
r3250 r3257 39 39 { 40 40 this->initialize(""); 41 this->state_ = C S_Uninitialized;41 this->state_ = CommandState::Uninitialized; 42 42 } 43 43 … … 64 64 65 65 this->errorMessage_ = ""; 66 this->state_ = C S_Empty;66 this->state_ = CommandState::Empty; 67 67 } 68 68 … … 104 104 switch (this->state_) 105 105 { 106 case C S_Uninitialized:107 break; 108 case C S_Empty:109 break; 110 case C S_ShortcutOrIdentifier:106 case CommandState::Uninitialized: 107 break; 108 case CommandState::Empty: 109 break; 110 case CommandState::ShortcutOrIdentifier: 111 111 if (this->function_) 112 112 { … … 119 119 return (this->command_ = this->functionclass_->getName() + " "); 120 120 break; 121 case C S_Function:121 case CommandState::Function: 122 122 if (this->function_) 123 123 { … … 128 128 } 129 129 break; 130 case C S_ParamPreparation:131 case C S_Params:130 case CommandState::ParamPreparation: 131 case CommandState::Params: 132 132 { 133 133 if (this->argument_ == "" && this->possibleArgument_ == "") … … 149 149 break; 150 150 } 151 case C S_Finished:152 break; 153 case C S_Error:151 case CommandState::Finished: 152 break; 153 case CommandState::Error: 154 154 break; 155 155 } … … 163 163 switch (this->state_) 164 164 { 165 case C S_Uninitialized:166 break; 167 case C S_Empty:168 case C S_ShortcutOrIdentifier:165 case CommandState::Uninitialized: 166 break; 167 case CommandState::Empty: 168 case CommandState::ShortcutOrIdentifier: 169 169 if (this->listOfPossibleFunctions_.size() == 0) 170 170 return CommandEvaluation::dump(this->listOfPossibleIdentifiers_); … … 174 174 return (CommandEvaluation::dump(this->listOfPossibleFunctions_) + "\n" + CommandEvaluation::dump(this->listOfPossibleIdentifiers_)); 175 175 break; 176 case C S_Function:176 case CommandState::Function: 177 177 return CommandEvaluation::dump(this->listOfPossibleFunctions_); 178 178 break; 179 case C S_ParamPreparation:180 case C S_Params:179 case CommandState::ParamPreparation: 180 case CommandState::Params: 181 181 if (this->listOfPossibleArguments_.size() > 0) 182 182 return CommandEvaluation::dump(this->listOfPossibleArguments_); 183 183 else 184 184 return CommandEvaluation::dump(this->function_); 185 case C S_Finished:185 case CommandState::Finished: 186 186 if (this->function_) 187 187 return CommandEvaluation::dump(this->function_); 188 188 break; 189 case C S_Error:189 case CommandState::Error: 190 190 return this->errorMessage_; 191 191 break; … … 200 200 201 201 for (unsigned int i = 0; i < MAX_FUNCTOR_ARGUMENTS; i++) 202 this->param_[i] = MT_ null;202 this->param_[i] = MT_Type::Null; 203 203 204 204 if (!this->isValid()) … … 230 230 return this->param_[index]; 231 231 232 return MT_ null;232 return MT_Type::Null; 233 233 } 234 234 … … 238 238 return this->function_->hasReturnvalue(); 239 239 240 return MT_ null;240 return MT_Type::Null; 241 241 } 242 242 -
code/branches/core4/src/core/CommandEvaluation.h
r1747 r3257 41 41 namespace orxonox 42 42 { 43 enumCommandState43 namespace CommandState 44 44 { 45 CS_Uninitialized, 46 CS_Empty, 47 CS_ShortcutOrIdentifier, 48 CS_Function, 49 CS_ParamPreparation, 50 CS_Params, 51 CS_Finished, 52 CS_Error 53 }; 45 enum Value 46 { 47 Uninitialized, 48 Empty, 49 ShortcutOrIdentifier, 50 Function, 51 ParamPreparation, 52 Params, 53 Finished, 54 Error 55 }; 56 } 54 57 55 58 class _CoreExport CommandEvaluation … … 112 115 113 116 std::string errorMessage_; 114 CommandState state_;117 CommandState::Value state_; 115 118 116 119 bool bEvaluatedParams_; -
code/branches/core4/src/core/CommandExecutor.cc
r3250 r3257 141 141 void CommandExecutor::parseIfNeeded(const std::string& command) 142 142 { 143 if (CommandExecutor::getEvaluation().state_ == C S_Uninitialized)143 if (CommandExecutor::getEvaluation().state_ == CommandState::Uninitialized) 144 144 { 145 145 CommandExecutor::parse(command); … … 169 169 switch (CommandExecutor::getEvaluation().state_) 170 170 { 171 case C S_Uninitialized:171 case CommandState::Uninitialized: 172 172 { 173 173 // Impossible 174 174 break; 175 175 } 176 case C S_Empty:176 case CommandState::Empty: 177 177 { 178 178 if (CommandExecutor::argumentsGiven() == 0) … … 184 184 else 185 185 { 186 CommandExecutor::getEvaluation().state_ = C S_ShortcutOrIdentifier;186 CommandExecutor::getEvaluation().state_ = CommandState::ShortcutOrIdentifier; 187 187 // Move on to next case 188 188 } 189 189 } 190 case C S_ShortcutOrIdentifier:190 case CommandState::ShortcutOrIdentifier: 191 191 { 192 192 if (CommandExecutor::argumentsGiven() > 1) … … 199 199 { 200 200 // It's a shortcut 201 CommandExecutor::getEvaluation().state_ = C S_ParamPreparation;201 CommandExecutor::getEvaluation().state_ = CommandState::ParamPreparation; 202 202 CommandExecutor::getEvaluation().functionclass_ = 0; 203 203 // Move on to next case … … 206 206 { 207 207 // It's a functionname 208 CommandExecutor::getEvaluation().state_ = C S_Function;208 CommandExecutor::getEvaluation().state_ = CommandState::Function; 209 209 CommandExecutor::getEvaluation().function_ = 0; 210 210 // Move on to next case … … 213 213 { 214 214 // The first argument is bad 215 CommandExecutor::getEvaluation().state_ = C S_Error;215 CommandExecutor::getEvaluation().state_ = CommandState::Error; 216 216 AddLanguageEntry("commandexecutorunknownfirstargument", "is not a shortcut nor a classname"); 217 217 CommandExecutor::getEvaluation().errorMessage_ = "Error: " + CommandExecutor::getArgument(0) + " " + GetLocalisation("commandexecutorunknownfirstargument") + "."; … … 238 238 CommandExecutor::getEvaluation().bCommandChanged_ = true; 239 239 } 240 CommandExecutor::getEvaluation().state_ = C S_ParamPreparation;240 CommandExecutor::getEvaluation().state_ = CommandState::ParamPreparation; 241 241 CommandExecutor::getEvaluation().functionclass_ = 0; 242 242 CommandExecutor::getEvaluation().command_ = CommandExecutor::getEvaluation().function_->getName(); … … 258 258 CommandExecutor::getEvaluation().bCommandChanged_ = true; 259 259 } 260 CommandExecutor::getEvaluation().state_ = C S_Function;260 CommandExecutor::getEvaluation().state_ = CommandState::Function; 261 261 CommandExecutor::getEvaluation().function_ = 0; 262 262 CommandExecutor::getEvaluation().command_ = CommandExecutor::getEvaluation().functionclass_->getName() + " "; … … 266 266 { 267 267 // No possibilities 268 CommandExecutor::getEvaluation().state_ = C S_Error;268 CommandExecutor::getEvaluation().state_ = CommandState::Error; 269 269 AddLanguageEntry("commandexecutorunknownfirstargumentstart", "There is no command or classname starting with"); 270 270 CommandExecutor::getEvaluation().errorMessage_ = "Error: " + GetLocalisation("commandexecutorunknownfirstargumentstart") + " " + CommandExecutor::getArgument(0) + "."; … … 285 285 } 286 286 } 287 case C S_Function:287 case CommandState::Function: 288 288 { 289 289 if (CommandExecutor::getEvaluation().functionclass_) … … 298 298 { 299 299 // It's a function 300 CommandExecutor::getEvaluation().state_ = C S_ParamPreparation;300 CommandExecutor::getEvaluation().state_ = CommandState::ParamPreparation; 301 301 // Move on to next case 302 302 } … … 304 304 { 305 305 // The second argument is bad 306 CommandExecutor::getEvaluation().state_ = C S_Error;306 CommandExecutor::getEvaluation().state_ = CommandState::Error; 307 307 AddLanguageEntry("commandexecutorunknownsecondargument", "is not a function of"); 308 308 CommandExecutor::getEvaluation().errorMessage_ = "Error: " + CommandExecutor::getArgument(1) + " " + GetLocalisation("commandexecutorunknownsecondargument") + " " + CommandExecutor::getEvaluation().functionclass_->getName() + "."; … … 326 326 CommandExecutor::getEvaluation().bCommandChanged_ = true; 327 327 } 328 CommandExecutor::getEvaluation().state_ = C S_ParamPreparation;328 CommandExecutor::getEvaluation().state_ = CommandState::ParamPreparation; 329 329 CommandExecutor::getEvaluation().command_ = CommandExecutor::getEvaluation().functionclass_->getName() + " " + CommandExecutor::getEvaluation().function_->getName(); 330 330 if (CommandExecutor::getEvaluation().function_->getParamCount() > 0) … … 338 338 { 339 339 // No possibilities 340 CommandExecutor::getEvaluation().state_ = C S_Error;340 CommandExecutor::getEvaluation().state_ = CommandState::Error; 341 341 AddLanguageEntry("commandexecutorunknownsecondargumentstart", "has no function starting with"); 342 342 CommandExecutor::getEvaluation().errorMessage_ = "Error: " + CommandExecutor::getEvaluation().functionclass_->getName() + " " + GetLocalisation("commandexecutorunknownsecondargumentstart") + " " + CommandExecutor::getArgument(1) + "."; … … 355 355 else 356 356 { 357 // There is no classname - move on to C S_ParamPreparation358 } 359 } 360 case C S_ParamPreparation:357 // There is no classname - move on to CommandState::ParamPreparation 358 } 359 } 360 case CommandState::ParamPreparation: 361 361 { 362 362 if (CommandExecutor::getEvaluation().function_->getParamCount() == 0 || CommandExecutor::enoughArgumentsGiven(CommandExecutor::getEvaluation().function_)) 363 363 { 364 CommandExecutor::getEvaluation().state_ = C S_Finished;364 CommandExecutor::getEvaluation().state_ = CommandState::Finished; 365 365 return; 366 366 } … … 372 372 373 373 CommandExecutor::createListOfPossibleArguments(CommandExecutor::getLastArgument(), CommandExecutor::getEvaluation().function_, argumentNumber); 374 CommandExecutor::getEvaluation().state_ = C S_Params;374 CommandExecutor::getEvaluation().state_ = CommandState::Params; 375 375 376 376 if (CommandExecutor::getEvaluation().bCommandChanged_) … … 381 381 } 382 382 } 383 case C S_Params:383 case CommandState::Params: 384 384 { 385 385 if (CommandExecutor::getEvaluation().listOfPossibleArguments_.size() == 1) … … 388 388 CommandExecutor::getEvaluation().argument_ = (*CommandExecutor::getEvaluation().listOfPossibleArguments_.begin()).getString(); 389 389 CommandExecutor::getEvaluation().possibleArgument_ = (*CommandExecutor::getEvaluation().listOfPossibleArguments_.begin()).getString(); 390 CommandExecutor::getEvaluation().state_ = C S_ParamPreparation;390 CommandExecutor::getEvaluation().state_ = CommandState::ParamPreparation; 391 391 return; 392 392 } … … 394 394 { 395 395 // The user tries something new - we let him do 396 CommandExecutor::getEvaluation().state_ = C S_ParamPreparation;396 CommandExecutor::getEvaluation().state_ = CommandState::ParamPreparation; 397 397 CommandExecutor::getEvaluation().argument_ = CommandExecutor::getLastArgument(); 398 398 return; … … 409 409 CommandExecutor::getEvaluation().argument_ = CommandExecutor::getCommonBegin(CommandExecutor::getEvaluation().listOfPossibleArguments_); 410 410 CommandExecutor::getEvaluation().possibleArgument_ = CommandExecutor::getPossibleArgument(CommandExecutor::getLastArgument(), CommandExecutor::getEvaluation().function_, argumentNumber); 411 CommandExecutor::getEvaluation().state_ = C S_ParamPreparation;411 CommandExecutor::getEvaluation().state_ = CommandState::ParamPreparation; 412 412 return; 413 413 } 414 414 } 415 case C S_Finished:415 case CommandState::Finished: 416 416 { 417 417 // Nothing more to do 418 418 break; 419 419 } 420 case C S_Error:420 case CommandState::Error: 421 421 { 422 422 // Bad, very bad -
code/branches/core4/src/core/CommandLine.cc
r3255 r3257 54 54 if (bParsingFile && this->bCommandLineOnly_) 55 55 ThrowException(Argument, "Command line argument '" + getName() + "' is not allowed in files."); 56 if (value_.getType() == MT_ bool)56 if (value_.getType() == MT_Type::Bool) 57 57 { 58 58 // simulate command line switch … … 295 295 infoStr << " "; 296 296 infoStr << "--" << it->second->getName() << " "; 297 if (it->second->getValue().getType() != MT_ bool)297 if (it->second->getValue().getType() != MT_Type::Bool) 298 298 infoStr << "ARG "; 299 299 else -
code/branches/core4/src/core/CommandLine.h
r3255 r3257 213 213 OrxAssert(!_getInstance().existsArgument(name), 214 214 "Cannot add a command line argument with name '" + name + "' twice."); 215 OrxAssert(MultiType(defaultValue).getType() != MT_ bool || MultiType(defaultValue).getBool() != true,215 OrxAssert(MultiType(defaultValue).getType() != MT_Type::Bool || MultiType(defaultValue).getBool() != true, 216 216 "Boolean command line arguments with positive default values are not supported." << std::endl 217 217 << "Please use SetCommandLineSwitch and adjust your argument: " << name); -
code/branches/core4/src/core/ConfigValueContainer.cc
r3196 r3257 78 78 for (unsigned int i = 0; i < this->valueVector_.size(); i++) 79 79 { 80 ConfigFileManager::getInstance().getValue(this->type_, this->sectionname_, this->varname_, i, this->valueVector_[i], this->value_.isType(MT_ string));80 ConfigFileManager::getInstance().getValue(this->type_, this->sectionname_, this->varname_, i, this->valueVector_[i], this->value_.isType(MT_Type::String)); 81 81 this->defvalueStringVector_.push_back(this->valueVector_[i]); 82 82 } … … 109 109 if (this->tset(input)) 110 110 { 111 ConfigFileManager::getInstance().setValue(this->type_, this->sectionname_, this->varname_, input, this->value_.isType(MT_ string));111 ConfigFileManager::getInstance().setValue(this->type_, this->sectionname_, this->varname_, input, this->value_.isType(MT_Type::String)); 112 112 return true; 113 113 } … … 128 128 if (this->tset(index, input)) 129 129 { 130 ConfigFileManager::getInstance().setValue(this->type_, this->sectionname_, this->varname_, index, input, this->value_.isType(MT_ string));130 ConfigFileManager::getInstance().setValue(this->type_, this->sectionname_, this->varname_, index, input, this->value_.isType(MT_Type::String)); 131 131 return true; 132 132 } … … 228 228 this->valueVector_.erase(this->valueVector_.begin() + index); 229 229 for (unsigned int i = index; i < this->valueVector_.size(); i++) 230 ConfigFileManager::getInstance().setValue(this->type_, this->sectionname_, this->varname_, i, this->valueVector_[i], this->value_.isType(MT_ string));230 ConfigFileManager::getInstance().setValue(this->type_, this->sectionname_, this->varname_, i, this->valueVector_[i], this->value_.isType(MT_Type::String)); 231 231 ConfigFileManager::getInstance().deleteVectorEntries(this->type_, this->sectionname_, this->varname_, this->valueVector_.size()); 232 232 … … 264 264 { 265 265 if (!this->bIsVector_) 266 this->value_ = ConfigFileManager::getInstance().getValue(this->type_, this->sectionname_, this->varname_, this->defvalueString_, this->value_.isType(MT_ string));266 this->value_ = ConfigFileManager::getInstance().getValue(this->type_, this->sectionname_, this->varname_, this->defvalueString_, this->value_.isType(MT_Type::String)); 267 267 else 268 268 { … … 273 273 if (i < this->defvalueStringVector_.size()) 274 274 { 275 this->value_ = ConfigFileManager::getInstance().getValue(this->type_, this->sectionname_, this->varname_, i, this->defvalueStringVector_[i], this->value_.isType(MT_ string));275 this->value_ = ConfigFileManager::getInstance().getValue(this->type_, this->sectionname_, this->varname_, i, this->defvalueStringVector_[i], this->value_.isType(MT_Type::String)); 276 276 } 277 277 else 278 278 { 279 this->value_ = ConfigFileManager::getInstance().getValue(this->type_, this->sectionname_, this->varname_, i, MultiType(), this->value_.isType(MT_ string));279 this->value_ = ConfigFileManager::getInstance().getValue(this->type_, this->sectionname_, this->varname_, i, MultiType(), this->value_.isType(MT_Type::String)); 280 280 } 281 281 -
code/branches/core4/src/core/ConsoleCommand.h
r3196 r3257 71 71 namespace AccessLevel 72 72 { 73 enum Level73 enum Value 74 74 { 75 75 None, … … 106 106 { this->Executor::setDefaultValue(index, param); return (*this); } 107 107 108 inline ConsoleCommand& accessLevel(AccessLevel:: Levellevel)108 inline ConsoleCommand& accessLevel(AccessLevel::Value level) 109 109 { this->accessLevel_ = level; return (*this); } 110 inline AccessLevel:: LevelgetAccessLevel() const110 inline AccessLevel::Value getAccessLevel() const 111 111 { return this->accessLevel_; } 112 112 … … 130 130 } 131 131 132 inline ConsoleCommand& keybindMode(KeybindMode:: Enummode)132 inline ConsoleCommand& keybindMode(KeybindMode::Value mode) 133 133 { this->keybindMode_ = mode; return *this; } 134 inline KeybindMode:: EnumgetKeybindMode() const134 inline KeybindMode::Value getKeybindMode() const 135 135 { return this->keybindMode_; } 136 136 … … 141 141 142 142 private: 143 AccessLevel:: LevelaccessLevel_;143 AccessLevel::Value accessLevel_; 144 144 ArgumentCompleter* argumentCompleter_[5]; 145 145 ArgumentCompletionList argumentList_; 146 146 147 KeybindMode:: EnumkeybindMode_;147 KeybindMode::Value keybindMode_; 148 148 int inputConfiguredParam_; 149 149 }; -
code/branches/core4/src/core/CorePrereqs.h
r3243 r3257 74 74 namespace KeybindMode 75 75 { 76 enum Enum76 enum Value 77 77 { 78 78 OnPress, -
code/branches/core4/src/core/Executor.h
r3250 r3257 175 175 inline bool hasReturnvalue() const 176 176 { return this->functor_->hasReturnvalue(); } 177 inline FunctionType getType() const177 inline FunctionType::Value getType() const 178 178 { return this->functor_->getType(); } 179 179 inline const MultiType& getReturnvalue() const … … 201 201 return this->defaultValue_[index]; 202 202 203 return MT_ null;203 return MT_Type::Null; 204 204 } 205 205 -
code/branches/core4/src/core/Functor.h
r3250 r3257 41 41 const unsigned int MAX_FUNCTOR_ARGUMENTS = 5; 42 42 43 enumFunctionType43 namespace FunctionType 44 44 { 45 FT_MEMBER, 46 FT_CONSTMEMBER, 47 FT_STATIC 48 }; 45 enum Value 46 { 47 Member, 48 ConstMember, 49 Static 50 }; 51 } 49 52 50 53 … … 98 101 virtual ~Functor() {} 99 102 100 virtual void operator()(const MultiType& param1 = MT_ null, const MultiType& param2 = MT_null, const MultiType& param3 = MT_null, const MultiType& param4 = MT_null, const MultiType& param5 = MT_null) = 0;103 virtual void operator()(const MultiType& param1 = MT_Type::Null, const MultiType& param2 = MT_Type::Null, const MultiType& param3 = MT_Type::Null, const MultiType& param4 = MT_Type::Null, const MultiType& param5 = MT_Type::Null) = 0; 101 104 102 105 inline unsigned int getParamCount() const { return this->numParams_; } 103 106 inline bool hasReturnvalue() const { return this->hasReturnValue_; } 104 inline FunctionType getType() const { return this->type_; }107 inline FunctionType::Value getType() const { return this->type_; } 105 108 inline const MultiType& getReturnvalue() const { return this->returnedValue_; } 106 109 … … 113 116 unsigned int numParams_; 114 117 bool hasReturnValue_; 115 FunctionType type_;118 FunctionType::Value type_; 116 119 MultiType returnedValue_; 117 120 … … 124 127 public: 125 128 virtual ~FunctorStatic() {} 126 virtual void operator()(const MultiType& param1 = MT_ null, const MultiType& param2 = MT_null, const MultiType& param3 = MT_null, const MultiType& param4 = MT_null, const MultiType& param5 = MT_null) = 0;129 virtual void operator()(const MultiType& param1 = MT_Type::Null, const MultiType& param2 = MT_Type::Null, const MultiType& param3 = MT_Type::Null, const MultiType& param4 = MT_Type::Null, const MultiType& param5 = MT_Type::Null) = 0; 127 130 }; 128 131 … … 139 142 virtual ~FunctorMember() {} 140 143 141 virtual void operator()(T* object, const MultiType& param1 = MT_ null, const MultiType& param2 = MT_null, const MultiType& param3 = MT_null, const MultiType& param4 = MT_null, const MultiType& param5 = MT_null) = 0;142 virtual void operator()(const T* object, const MultiType& param1 = MT_ null, const MultiType& param2 = MT_null, const MultiType& param3 = MT_null, const MultiType& param4 = MT_null, const MultiType& param5 = MT_null) = 0;143 144 virtual void operator()(const MultiType& param1 = MT_ null, const MultiType& param2 = MT_null, const MultiType& param3 = MT_null, const MultiType& param4 = MT_null, const MultiType& param5 = MT_null)144 virtual void operator()(T* object, const MultiType& param1 = MT_Type::Null, const MultiType& param2 = MT_Type::Null, const MultiType& param3 = MT_Type::Null, const MultiType& param4 = MT_Type::Null, const MultiType& param5 = MT_Type::Null) = 0; 145 virtual void operator()(const T* object, const MultiType& param1 = MT_Type::Null, const MultiType& param2 = MT_Type::Null, const MultiType& param3 = MT_Type::Null, const MultiType& param4 = MT_Type::Null, const MultiType& param5 = MT_Type::Null) = 0; 146 147 virtual void operator()(const MultiType& param1 = MT_Type::Null, const MultiType& param2 = MT_Type::Null, const MultiType& param3 = MT_Type::Null, const MultiType& param4 = MT_Type::Null, const MultiType& param5 = MT_Type::Null) 145 148 { 146 149 if (this->bConstObject_) … … 322 325 this->numParams_ = numparams; \ 323 326 this->hasReturnValue_ = returnvalue; \ 324 this->type_ = F T_STATIC; \327 this->type_ = FunctionType::Static; \ 325 328 this->functionPointer_ = functionPointer; \ 326 329 \ … … 329 332 } \ 330 333 \ 331 void operator()(const MultiType& param1 = MT_ null, const MultiType& param2 = MT_null, const MultiType& param3 = MT_null, const MultiType& param4 = MT_null, const MultiType& param5 = MT_null) \334 void operator()(const MultiType& param1 = MT_Type::Null, const MultiType& param2 = MT_Type::Null, const MultiType& param3 = MT_Type::Null, const MultiType& param4 = MT_Type::Null, const MultiType& param5 = MT_Type::Null) \ 332 335 { \ 333 336 FUNCTOR_STORE_RETURNVALUE(returnvalue, (*this->functionPointer_)(FUNCTOR_FUNCTION_CALL(numparams))); \ … … 363 366 this->numParams_ = numparams; \ 364 367 this->hasReturnValue_ = returnvalue; \ 365 this->type_ = F T_MEMBER; \368 this->type_ = FunctionType::Member; \ 366 369 this->functionPointer_ = functionPointer; \ 367 370 } \ 368 371 \ 369 void operator()(T* object, const MultiType& param1 = MT_ null, const MultiType& param2 = MT_null, const MultiType& param3 = MT_null, const MultiType& param4 = MT_null, const MultiType& param5 = MT_null) \372 void operator()(T* object, const MultiType& param1 = MT_Type::Null, const MultiType& param2 = MT_Type::Null, const MultiType& param3 = MT_Type::Null, const MultiType& param4 = MT_Type::Null, const MultiType& param5 = MT_Type::Null) \ 370 373 { \ 371 374 FUNCTOR_STORE_RETURNVALUE(returnvalue, (*object.*this->functionPointer_)(FUNCTOR_FUNCTION_CALL(numparams))); \ 372 375 } \ 373 376 \ 374 void operator()(const T* object, const MultiType& param1 = MT_ null, const MultiType& param2 = MT_null, const MultiType& param3 = MT_null, const MultiType& param4 = MT_null, const MultiType& param5 = MT_null) \377 void operator()(const T* object, const MultiType& param1 = MT_Type::Null, const MultiType& param2 = MT_Type::Null, const MultiType& param3 = MT_Type::Null, const MultiType& param4 = MT_Type::Null, const MultiType& param5 = MT_Type::Null) \ 375 378 { \ 376 379 COUT(1) << "An error occurred in Functor.h:" << std::endl; \ … … 396 399 this->numParams_ = numparams; \ 397 400 this->hasReturnValue_ = returnvalue; \ 398 this->type_ = F T_CONSTMEMBER; \401 this->type_ = FunctionType::ConstMember; \ 399 402 this->functionPointer_ = functionPointer; \ 400 403 } \ 401 404 \ 402 void operator()(T* object, const MultiType& param1 = MT_ null, const MultiType& param2 = MT_null, const MultiType& param3 = MT_null, const MultiType& param4 = MT_null, const MultiType& param5 = MT_null) \405 void operator()(T* object, const MultiType& param1 = MT_Type::Null, const MultiType& param2 = MT_Type::Null, const MultiType& param3 = MT_Type::Null, const MultiType& param4 = MT_Type::Null, const MultiType& param5 = MT_Type::Null) \ 403 406 { \ 404 407 FUNCTOR_STORE_RETURNVALUE(returnvalue, (*object.*this->functionPointer_)(FUNCTOR_FUNCTION_CALL(numparams))); \ 405 408 } \ 406 409 \ 407 void operator()(const T* object, const MultiType& param1 = MT_ null, const MultiType& param2 = MT_null, const MultiType& param3 = MT_null, const MultiType& param4 = MT_null, const MultiType& param5 = MT_null) \410 void operator()(const T* object, const MultiType& param1 = MT_Type::Null, const MultiType& param2 = MT_Type::Null, const MultiType& param3 = MT_Type::Null, const MultiType& param4 = MT_Type::Null, const MultiType& param5 = MT_Type::Null) \ 408 411 { \ 409 412 FUNCTOR_STORE_RETURNVALUE(returnvalue, (*object.*this->functionPointer_)(FUNCTOR_FUNCTION_CALL(numparams))); \ -
code/branches/core4/src/core/input/Button.cc
r3250 r3257 127 127 '\\', false, '"', false, '(', ')', false, '\0'); 128 128 129 KeybindMode:: Enummode = KeybindMode::None;129 KeybindMode::Value mode = KeybindMode::None; 130 130 float paramModifier = 1.0f; 131 131 std::string commandStr = ""; -
code/branches/core4/src/core/input/Button.h
r2662 r3257 54 54 void parse(); 55 55 void readConfigValue(ConfigFileType configFile); 56 bool execute(KeybindMode:: Enummode, float abs = 1.0f, float rel = 1.0f);56 bool execute(KeybindMode::Value mode, float abs = 1.0f, float rel = 1.0f); 57 57 58 58 //! Container to allow for better configValue support … … 79 79 }; 80 80 81 inline bool Button::execute(KeybindMode:: Enummode, float abs, float rel)81 inline bool Button::execute(KeybindMode::Value mode, float abs, float rel) 82 82 { 83 83 // execute all the parsed commands in the string
Note: See TracChangeset
for help on using the changeset viewer.