Changeset 1416 for code/branches/console/src/core/CommandEvaluation.cc
- Timestamp:
- May 25, 2008, 1:11:51 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/console/src/core/CommandEvaluation.cc
r1402 r1416 53 53 this->listOfPossibleIdentifiers_.clear(); 54 54 this->listOfPossibleFunctions_.clear(); 55 this->listOfPossibleArguments_.clear(); 55 56 56 57 this->functionclass_ = 0; … … 114 115 std::cout << "complete: function != 0" << std::endl; 115 116 if (this->commandTokens_.size() > 1) 116 return (this->function_->getName() + " " + this->commandTokens_.subSet(1, this->commandTokens_.size() - 1).join() + " " + CommandEvaluation::getCommonBegin(this->listOfPossibleArguments_)); 117 { 118 if ((this->commandTokens_.size() - 1) >= this->function_->getParamCount()) 119 return (this->function_->getName() + " " + this->commandTokens_.subSet(1, this->commandTokens_.size()).join()); 120 else 121 return (this->function_->getName() + " " + this->commandTokens_.subSet(1, this->commandTokens_.size()).join() + " " + CommandEvaluation::getCommonBegin(this->listOfPossibleArguments_)); 122 } 117 123 else 118 124 return (this->function_->getName() + " "); … … 125 131 std::cout << "complete: function != 0" << std::endl; 126 132 if (this->commandTokens_.size() > 1) 127 return (this->function_->getName() + " " + this->commandTokens_.subSet(1, this->commandTokens_.size() - 1).join());133 return (this->function_->getName() + " " + this->commandTokens_.subSet(1, this->commandTokens_.size()).join()); 128 134 else 129 135 return (this->function_->getName()); … … 144 150 std::cout << "complete: function und functionclass != 0" << std::endl; 145 151 if (this->commandTokens_.size() > 2) 146 return (this->functionclass_->getName() + " " + this->function_->getName() + " " + this->commandTokens_.subSet(2, this->commandTokens_.size()).join() + " " + CommandEvaluation::getCommonBegin(this->listOfPossibleArguments_)); 152 { 153 if ((this->commandTokens_.size() - 2) >= this->function_->getParamCount()) 154 return (this->functionclass_->getName() + " " + this->function_->getName() + " " + this->commandTokens_.subSet(2, this->commandTokens_.size()).join()); 155 else 156 return (this->functionclass_->getName() + " " + this->function_->getName() + " " + this->commandTokens_.subSet(2, this->commandTokens_.size()).join() + " " + CommandEvaluation::getCommonBegin(this->listOfPossibleArguments_)); 157 } 147 158 else 148 159 return (this->functionclass_->getName() + " " + this->function_->getName() + " ");
Note: See TracChangeset
for help on using the changeset viewer.