Changeset 5189 in orxonox.OLD for trunk/src/lib/shell
- Timestamp:
- Sep 17, 2005, 2:09:14 AM (19 years ago)
- Location:
- trunk/src/lib/shell
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/shell/shell_command.cc
r5188 r5189 59 59 delete iterator; 60 60 delete this->commandList; 61 } 62 63 tList<const char>* ShellCommandClass::getCommandListOfClass(const char* className) 64 { 65 tList<const char>* retList; 66 tIterator<ShellCommandClass>* iterator = ShellCommandClass::commandClassList->getIterator(); 67 ShellCommandClass* elem = iterator->firstElement(); 68 while(elem != NULL) 69 { 70 if (!strcmp (elem->getName(), className)) 71 { 72 tIterator<ShellCommandBase>* itFkt = elem->commandList->getIterator(); 73 ShellCommandBase* command = itFkt->firstElement(); 74 while (command != NULL) 75 { 76 retList->add(command->getName()); 77 command = itFkt->nextElement(); 78 } 79 delete itFkt; 80 } 81 82 elem = iterator->nextElement(); 83 } 84 delete iterator; 85 return retList; 61 86 } 62 87 -
trunk/src/lib/shell/shell_command.h
r5179 r5189 51 51 public: 52 52 static const tList<ShellCommandClass>* getCommandClassList() { return ShellCommandClass::commandClassList; }; 53 static tList<const char>* getCommandListOfClass(const char* className); 53 54 static ShellCommandClass* getCommandClass(const char* className); 54 55 static void unregisterAllCommands();
Note: See TracChangeset
for help on using the changeset viewer.