Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5140 in orxonox.OLD


Ignore:
Timestamp:
Aug 26, 2005, 2:15:06 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: now all new commands get subscribed

Location:
trunk/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/lang/class_list.cc

    r5115 r5140  
    4040  ++ClassList::classCount;
    4141}
    42 
    4342
    4443/**
  • trunk/src/proto/proto_singleton.cc

    r4839 r5140  
    3333       1. Add the new file new_class.cc to the ./src/Makefile.am
    3434       2. Add the class identifier to ./src/class_id.h eg. CL_NEW_CLASS
     35   !!!!!!!!!! IMPORTANT FOR SINGLETON !!!!!!!!!!!!!!!!
     36        3. SingleTon MUST be CL_NEW_CLASS = 0x00000fxx
    3537
    3638      Advanced Topics:
  • trunk/src/util/shell_command.cc

    r5138 r5140  
    3434
    3535  this->classID = classID;
     36  if (classID & CL_MASK_SINGLETON == CL_MASK_SINGLETON)
     37    this->isSingleton = true;
     38  else
     39    this->isSingleton = false;
     40
    3641  this->commandName = new char[strlen(commandName)+1];
    3742  strcpy(this->commandName, commandName);
     
    7580    if (classID == elem->classID && !strcmp(commandName, elem->commandName))
    7681    {
    77 //      PRINTF(2)("Command already registered\n");
     82      PRINTF(2)("Command already registered\n");
    7883      delete iterator;
    7984      return true;
     
    8287  }
    8388  delete iterator;
    84   return true;
     89  return false;
    8590}
     91
    8692
    8793bool ShellCommandBase::execute(const char* executionString)
     
    98104  while(elem != NULL)
    99105  {
     106    printf("%s\n", elem->commandName);
    100107    if (!strncmp(executionString, elem->commandName, strlen(elem->commandName)))
    101108    {
  • trunk/src/util/shell_command.h

    r5139 r5140  
    6565    unsigned int                     paramCount;          //!< the count of parameters
    6666    ParameterType*                   parameters;          //!< Parameters
     67    bool                             isSingleton;         //!< if the Class is Singleton @todo autocheck
    6768
    6869  private:
     
    123124    virtual void executeCommand (const char* parameters)
    124125    {
     126      printf("not implemented yet\n");
    125127/*      if (this->paramCount == 0)
    126128        (objectPointer->*functionPointer_NULL)();*/
Note: See TracChangeset for help on using the changeset viewer.