Changeset 7231 for code/branches/consolecommands3/src/libraries/core
- Timestamp:
- Aug 27, 2010, 7:39:37 PM (14 years ago)
- Location:
- code/branches/consolecommands3/src/libraries/core/command
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/consolecommands3/src/libraries/core/command/CommandEvaluation.cc
r7230 r7231 112 112 if (this->bEvaluatedParams_) 113 113 { 114 COUT(0) << "call evaluated" << std::endl;115 114 COUT(6) << "CE_execute (evaluation): " << this->execCommand_->getName() << " with " << this->numberOfEvaluatedParams_ << " params: " << this->param_[0] << ' ' << this->param_[1] << ' ' << this->param_[2] << ' ' << this->param_[3] << ' ' << this->param_[4] << std::endl; 116 115 switch (this->numberOfEvaluatedParams_) … … 127 126 else 128 127 { 129 COUT(0) << "call parsed" << std::endl;130 128 COUT(5) << "CE_execute: " << this->string_ << "\n"; 131 129 return this->execCommand_->getExecutor()->parse(this->tokens_.subSet(this->execArgumentsOffset_), error, " "); … … 138 136 int CommandEvaluation::evaluateParams(bool bPrintError) 139 137 { 140 COUT(0) << "evaluate params" << std::endl;141 138 this->bTriedToEvaluatedParams_ = true; 142 139 … … 187 184 { 188 185 std::string output = this->string_.substr(0, this->string_.find_last_of(' ') + 1); 189 // for (unsigned int i = 0; i < this->getNumberOfArguments() - 1; ++i)190 // output += this->getToken(i) + ' ';191 186 192 187 output += CommandEvaluation::getCommonBegin(this->possibleArguments_); … … 235 230 ArgumentCompleter* ac = this->hintCommand_->getArgumentCompleter(argumentID - 1); 236 231 237 COUT(0) << "hint: args: " << this->getNumberOfArguments() << ", aID: " << argumentID << ", offset: " << this->hintArgumentsOffset_ << ", ac: " << ac << std::endl;238 232 if (ac) 239 233 { … … 241 235 242 236 for (size_t i = 0; i < argumentID; ++i) 243 {244 237 param[i] = this->getToken(this->getNumberOfArguments() - i - 1); 245 COUT(0) << i << ": " << (this->getNumberOfArguments() - i - 1) << " -> " << this->getToken(this->getNumberOfArguments() - i - 1) << " / " << param[i] << std::endl; 246 } 247 248 COUT(0) << "hint: 1: " << param[0] << ", 2: " << param[1] << ", 3: " << param[2] << ", 4: " << param[3] << ", 5: " << param[4] << std::endl; 238 249 239 this->possibleArguments_ = (*ac)(param[0], param[1], param[2], param[3], param[4]); 250 240 -
code/branches/consolecommands3/src/libraries/core/command/CommandExecutor.cc
r7230 r7231 65 65 if (!CommandExecutor::getInstance().getCached(command, evaluation)) 66 66 { 67 COUT(0) << "evaluate" << std::endl;68 67 evaluation = CommandExecutor::evaluate(command); 69 68 evaluation.evaluateParams(); 70 69 CommandExecutor::getInstance().cache(command, evaluation); 71 }72 else73 {74 COUT(0) << "cached" << std::endl;75 70 } 76 71
Note: See TracChangeset
for help on using the changeset viewer.