- Timestamp:
- Sep 5, 2005, 11:02:09 PM (19 years ago)
- Location:
- trunk/src/lib/shell
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/shell/shell.cc
r5162 r5164 32 32 using namespace std; 33 33 34 SHELL_COMMAND(clear, Shell, clear) ;34 SHELL_COMMAND(clear, Shell, clear)->describe("Clears the shell from unwanted lines (empties all buffers)"); 35 35 36 36 /** -
trunk/src/lib/shell/shell_command.cc
r5163 r5164 32 32 this->setClassID(CL_SHELL_COMMAND, "ShellCommand"); 33 33 this->setName(commandName); 34 this->description = NULL; 34 35 35 36 // this->classID = classID; … … 217 218 } 218 219 220 221 ShellCommandBase* ShellCommandBase::describe(const char* description) 222 { 223 if (this == NULL) 224 return NULL; 225 226 this->description = description; 227 return this; 228 } 229 230 219 231 void ShellCommandBase::debugDyn() 220 232 { … … 236 248 PRINT(0)("Class %s registered command %s with %d parameters: ", elem->className, elem->getName(), elem->paramCount); 237 249 for (unsigned int i = 0; i< elem->paramCount; i++) 238 printf(ShellCommandBase::paramToString(elem->parameters[i])); 250 printf("%s ", ShellCommandBase::paramToString(elem->parameters[i])); 251 if (elem->description != NULL) 252 printf("- %s", elem->description); 239 253 printf("\n"); 240 254 -
trunk/src/lib/shell/shell_command.h
r5163 r5164 23 23 24 24 #define SHELL_COMMAND(command, class, function) \ 25 ShellCommand <class>* shell_command_##class##_##command = ShellCommand<class>::registerCommand(#command, #class, &class::function)25 ShellCommandBase* shell_command_##class##_##command = ShellCommand<class>::registerCommand(#command, #class, &class::function) 26 26 27 27 … … 35 35 static bool execute (const char* executionString); 36 36 37 ShellCommandBase* describe(const char* description); 38 37 39 static const tList<ShellCommandBase>* getCommandList() { return ShellCommandBase::commandList; }; 38 40 … … 65 67 // long classID; //!< The ID of the Class associated to this Command 66 68 const char* className; //!< The Name of the Class associated to this Command 69 70 const char* description; 67 71 68 72 // STATIC MEMBERS
Note: See TracChangeset
for help on using the changeset viewer.