Changeset 7393 in orxonox.OLD for trunk/src/lib/shell
- Timestamp:
- Apr 27, 2006, 1:05:17 PM (19 years ago)
- Location:
- trunk/src/lib/shell
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/shell/shell_completion.cc
r7389 r7393 112 112 this->objectComplete(completeString, classID); 113 113 if (completeType & FunctionCompletion) 114 this-> functionComplete(completeString, inputSplits.getString(0));114 this->commandComplete(completeString, inputSplits.getString(0)); 115 115 if (completeType & AliasCompletion) 116 116 this->aliasComplete(completeString); … … 144 144 145 145 /** 146 * @brief completes a Function147 * @param functionBegin the beginning of the function String146 * @brief completes a Command 147 * @param commandBegin the beginning of the function String 148 148 * @param classID the class' ID to complete the function of 149 149 */ 150 bool ShellCompletion:: functionComplete(const std::string& functionBegin, const std::string& className)150 bool ShellCompletion::commandComplete(const std::string& commandBegin, const std::string& className) 151 151 { 152 152 std::list<std::string> fktList; 153 153 ShellCommandClass::getCommandListOfClass(className, fktList); 154 154 //printf("%s\n", boList->firstElement()->getName()); 155 if (!this->addToCompleteList(fktList, functionBegin, FunctionCompletion))155 if (!this->addToCompleteList(fktList, commandBegin, FunctionCompletion)) 156 156 return false; 157 157 return true; -
trunk/src/lib/shell/shell_completion.h
r7388 r7393 48 48 bool objectComplete(const std::string& objectBegin, long classID); 49 49 // bool objectMatch(const char* objectBegin, long classID, unsigned int* length); 50 bool functionComplete(const std::string& functionBegin, const std::string& className);50 bool commandComplete(const std::string& commandBegin, const std::string& className); 51 51 // bool functionMatch(const char* functionBegin, long classID, unsigned int* length); 52 52 bool aliasComplete(const std::string& aliasBegin); 53 53 54 // Generally Completes. 54 55 bool generalComplete(std::string& input, 55 56 const std::string& begin, const std::string& displayAs = "%s", … … 60 61 bool addToCompleteList(const std::list<BaseObject*>& inputList, const std::string& completionBegin, ShellCompletion::CompletionType type); 61 62 62 void clearCompletionList();63 63 64 64 // Helpers. 65 void clearCompletionList(); 65 66 static const std::string& ShellCompletion::typeToString(ShellCompletion::CompletionType type); 66 67 -
trunk/src/lib/shell/shell_input.h
r7374 r7393 45 45 void removeCharacters(unsigned int characterCount = 1); 46 46 void setRepeatDelay(float repeatDelay, float repeatRate); 47 47 48 bool executeCommand(); 48 49
Note: See TracChangeset
for help on using the changeset viewer.