Changeset 1402 for code/branches/console/src/core/ConsoleCommand.cc
- Timestamp:
- May 24, 2008, 2:51:31 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/console/src/core/ConsoleCommand.cc
r1390 r1402 43 43 ConsoleCommand& ConsoleCommand::setArgumentCompletionList(unsigned int param, const std::list<std::pair<std::string, std::string> >& (*function) (void)) 44 44 { 45 if (param >= 0 && param< 5)45 if (param < 5) 46 46 this->autocompletionFunction_[param] = function; 47 47 else … … 54 54 const std::list<std::pair<std::string, std::string> >& ConsoleCommand::getArgumentCompletionList(unsigned int param) const 55 55 { 56 if (param >= 0 && param< 5)56 if (param < 5) 57 57 return (*this->autocompletionFunction_[param])(); 58 58 else … … 62 62 std::list<std::pair<std::string, std::string> >::const_iterator ConsoleCommand::getArgumentCompletionListBegin(unsigned int param) const 63 63 { 64 if (param >= 0 && param < 5) 64 std::cout << "3_1: param: " << param << "\n"; 65 if (param < 5) 66 { 67 std::cout << "3_2: >" << this->autocompletionFunction_[param] << "<\n"; 65 68 return (*this->autocompletionFunction_[param])().begin(); 69 } 66 70 else 71 { 72 std::cout << "3_3\n"; 67 73 return autocompletion::fallback().begin(); 74 } 68 75 } 69 76 70 77 std::list<std::pair<std::string, std::string> >::const_iterator ConsoleCommand::getArgumentCompletionListEnd(unsigned int param) const 71 78 { 72 if (param >= 0 && param < 5) 79 std::cout << "4_1: param: " << param << "\n"; 80 if (param < 5) 81 { 82 std::cout << "4_2: >" << this->autocompletionFunction_[param] << "<\n"; 73 83 return (*this->autocompletionFunction_[param])().end(); 84 } 74 85 else 86 { 87 std::cout << "4_3\n"; 75 88 return autocompletion::fallback().end(); 89 } 76 90 } 77 91 }
Note: See TracChangeset
for help on using the changeset viewer.