Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5164 in orxonox.OLD for trunk/src/lib/shell/shell_command.cc


Ignore:
Timestamp:
Sep 5, 2005, 11:02:09 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: ability to describe the presented options :)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/shell/shell_command.cc

    r5163 r5164  
    3232  this->setClassID(CL_SHELL_COMMAND, "ShellCommand");
    3333  this->setName(commandName);
     34  this->description = NULL;
    3435
    3536//  this->classID = classID;
     
    217218}
    218219
     220
     221ShellCommandBase* ShellCommandBase::describe(const char* description)
     222{
     223  if (this == NULL)
     224    return NULL;
     225
     226  this->description = description;
     227  return this;
     228}
     229
     230
    219231void ShellCommandBase::debugDyn()
    220232{
     
    236248    PRINT(0)("Class %s registered command %s with %d parameters: ", elem->className, elem->getName(), elem->paramCount);
    237249    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);
    239253    printf("\n");
    240254
Note: See TracChangeset for help on using the changeset viewer.