Changeset 5197 in orxonox.OLD for trunk/src/lib/shell/shell_command.cc
- Timestamp:
- Sep 18, 2005, 2:57:20 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/shell/shell_command.cc
r5196 r5197 61 61 } 62 62 63 /** 64 * collects the Commands registered to some class. 65 * @param className the name of the Class to collect the Commands from. 66 * @param stringList a List to paste the Commands into. 67 * @returns true on success, false otherwise 68 */ 63 69 bool ShellCommandClass::getCommandListOfClass(const char* className, tList<const char>* stringList) 64 70 { … … 88 94 } 89 95 96 /** 97 * collects the Aliases registered to the ShellCommands 98 * @param stringList a List to paste the Aliases into. 99 * @returns true on success, false otherwise 100 */ 90 101 bool ShellCommandClass::getCommandListOfAlias(tList<const char>* stringList) 91 102 { … … 104 115 } 105 116 106 107 117 /** 108 118 * unregisters all Commands that exist … … 127 137 if (ShellCommandClass::aliasList != NULL) 128 138 { 129 tIterator<ShellCommandAlias>* itAL = ShellCommandClass::aliasList->getIterator(); 130 ShellCommandAlias* elemAL = itAL->firstElement(); 131 while(elemAL != NULL) 132 { 133 delete elemAL; 134 elemAL = itAL->nextElement(); 135 } 136 delete itAL; 137 delete ShellCommandClass::aliasList; 138 ShellCommandClass::aliasList = NULL; 139 } 140 } 141 139 tIterator<ShellCommandAlias>* itAL = ShellCommandClass::aliasList->getIterator(); 140 ShellCommandAlias* elemAL = itAL->firstElement(); 141 while(elemAL != NULL) 142 { 143 delete elemAL; 144 elemAL = itAL->nextElement(); 145 } 146 delete itAL; 147 delete ShellCommandClass::aliasList; 148 ShellCommandClass::aliasList = NULL; 149 } 150 } 151 152 /** 153 * checks if a Class is already registered to the Commands' class-stack 154 * @param className the Name of the Class to check for 155 * @returns the CommandClass if found, NULL otherwise 156 */ 142 157 const ShellCommandClass* ShellCommandClass::isRegistered(const char* className) 143 158 { … … 468 483 } 469 484 485 /** 486 * adds an Alias to this Command 487 * @param alias the name of the Alias to set 488 * @returns itself 489 */ 470 490 ShellCommandBase* ShellCommandBase::setAlias(const char* alias) 471 491 {
Note: See TracChangeset
for help on using the changeset viewer.