Changeset 7407 in orxonox.OLD for trunk/src/lib/shell/shell_completion_plugin.cc
- Timestamp:
- Apr 27, 2006, 8:42:16 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/shell/shell_completion_plugin.cc
r7388 r7407 27 27 namespace OrxShell 28 28 { 29 void CompletorStringArray::addToCompleteList(std::vector<std::string>& completionList, const std::string& completionBegin) 29 CompletorDefault::CompletorDefault(const MultiType* value) 30 :_value(value) 31 { } 32 33 void CompletorDefault::addToCompleteList(std::vector<std::string>& completionList, const std::string& completionBegin) const 34 { 35 PRINT(0)("%s", MultiType::MultiTypeToString(this->_value->getType()).c_str()); 36 } 37 38 CompletorPlugin* CompletorDefault::clone() const 39 { 40 return new CompletorDefault(this->_value); 41 } 42 43 44 45 46 47 void CompletorStringArray::addToCompleteList(std::vector<std::string>& completionList, const std::string& completionBegin) const 30 48 { 31 49 unsigned int inputLen = completionBegin.size(); … … 35 53 } 36 54 55 CompletorPlugin* CompletorStringArray::clone() const 56 { 57 return new CompletorStringArray(this->_stringArray, this->_size); 58 } 37 59 38 60 … … 42 64 } 43 65 44 void CompletorList::addToCompleteList(std::vector<std::string>& completionList, const std::string& completionBegin) 66 void CompletorList::addToCompleteList(std::vector<std::string>& completionList, const std::string& completionBegin) const 45 67 { 46 68 unsigned int inputLen = completionBegin.size(); … … 51 73 } 52 74 75 CompletorPlugin* CompletorList::clone() const 76 { 77 return new CompletorList(this->_list); 78 } 53 79 54 80 … … 60 86 61 87 62 void CompletorFileSystem::addToCompleteList(std::vector<std::string>& completionList, const std::string& completionBegin) 88 void CompletorFileSystem::addToCompleteList(std::vector<std::string>& completionList, const std::string& completionBegin) const 63 89 { 64 90 if (completionBegin.empty()) // if we do not yet have the beginning of the line, start with the chosen startDir. … … 68 94 } 69 95 } 96 CompletorPlugin* CompletorFileSystem::clone() const 97 { 98 return new CompletorFileSystem(this->_fileExtension, this->_startDir, this->_subDir); 99 } 100 70 101 71 102 }
Note: See TracChangeset
for help on using the changeset viewer.