Changeset 5330 in orxonox.OLD for trunk/src/lib
- Timestamp:
- Oct 8, 2005, 11:13:06 PM (19 years ago)
- Location:
- trunk/src/lib/shell
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/shell/shell_completion.cc
r5329 r5330 120 120 classID = ClassList::StringToID(inputSplits.getString(0)); 121 121 objectList = ClassList::getList(classID); 122 if (classID == CL_NULL) 123 return false; 124 else 125 { 126 if (objectList != NULL && objectList->getSize() == 1) 127 completeType |= SHELLC_FUNCTION; 122 if (classID != CL_NULL) 128 123 completeType |= SHELLC_OBJECT; 129 } 124 //if (objectList != NULL && objectList->getSize() == 1) 125 completeType |= SHELLC_FUNCTION; 130 126 } 131 127 else if ((inputSplits.getCount() == 2 && emptyComplete == true) || … … 144 140 this->objectComplete(completeString, classID); 145 141 if (completeType & SHELLC_FUNCTION) 146 this->functionComplete(completeString, classID);142 this->functionComplete(completeString, inputSplits.getString(0)); 147 143 if (completeType & SHELLC_ALIAS) 148 144 this->aliasComplete(completeString); … … 202 198 * @param classID the class' ID to complete the function of 203 199 */ 204 bool ShellCompletion::functionComplete(const char* functionBegin, long classID)200 bool ShellCompletion::functionComplete(const char* functionBegin, const char* className) 205 201 { 206 202 if (unlikely(functionBegin == NULL)) 207 203 return false; 208 204 tList<const char> fktList; 209 ShellCommandClass::getCommandListOfClass( ClassList::IDToString(classID), &fktList);205 ShellCommandClass::getCommandListOfClass(className, &fktList); 210 206 //printf("%s\n", boList->firstElement()->getName()); 211 207 if (!this->addToCompleteList(&fktList, functionBegin, SHELLC_FUNCTION)) -
trunk/src/lib/shell/shell_completion.h
r5245 r5330 42 42 bool objectComplete(const char* objectBegin, long classID); 43 43 // bool objectMatch(const char* objectBegin, long classID, unsigned int* length); 44 bool functionComplete(const char* functionBegin, long classID);44 bool functionComplete(const char* functionBegin, const char* className); 45 45 // bool functionMatch(const char* functionBegin, long classID, unsigned int* length); 46 46 bool aliasComplete(const char* aliasBegin);
Note: See TracChangeset
for help on using the changeset viewer.