- Timestamp:
- Aug 27, 2010, 2:41:03 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/consolecommands3/src/libraries/core/command/Executor.cc
r7212 r7228 36 36 #include "util/StringUtils.h" 37 37 #include "util/SubString.h" 38 #include "CommandExecutor.h" 38 39 39 40 namespace orxonox … … 49 50 } 50 51 51 MultiType Executor::parse(const std::string& params, bool* success, const std::string& delimiter) const52 { 53 if ( success)54 * success = true;52 MultiType Executor::parse(const std::string& params, int* error, const std::string& delimiter, bool bPrintError) const 53 { 54 if (error) 55 *error = CommandExecutor::Success; 55 56 56 57 unsigned int paramCount = this->functor_->getParamCount(); … … 76 77 else 77 78 { 78 COUT(2) << "Warning: Can't call executor " << this->name_ << " through parser: Not enough parameters or default values given (input: " << temp << ")." << std::endl; 79 if (success) 80 *success = false; 79 if (bPrintError) 80 COUT(2) << "Warning: Can't call executor " << this->name_ << " through parser: Not enough parameters or default values given (input: " << temp << ")." << std::endl; 81 if (error) 82 *error = CommandExecutor::Incomplete; 81 83 return MT_Type::Null; 82 84 } … … 90 92 if (this->defaultValue_[i].null()) 91 93 { 92 COUT(2) << "Warning: Can't call executor " << this->name_ << " through parser: Not enough parameters or default values given (input:" << params << ")." << std::endl; 93 if (success) 94 *success = false; 94 if (bPrintError) 95 COUT(2) << "Warning: Can't call executor " << this->name_ << " through parser: Not enough parameters or default values given (input: " << params << ")." << std::endl; 96 if (error) 97 *error = CommandExecutor::Incomplete; 95 98 return MT_Type::Null; 96 99 }
Note: See TracChangeset
for help on using the changeset viewer.