Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5163 in orxonox.OLD for trunk/src/lib/shell


Ignore:
Timestamp:
Sep 5, 2005, 10:37:45 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: match on Singleton dynamically

Location:
trunk/src/lib/shell
Files:
2 edited

Legend:

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

    r5161 r5163  
    3535//  this->classID = classID;
    3636  this->className = className; //ClassList::IDToString(classID);
    37 
    38 /*  if (classID & CL_MASK_SINGLETON == CL_MASK_SINGLETON)
    39     this->isSingleton = true;
    40   else*/
    41     this->isSingleton = true;
    4237
    4338  // handling parameters, and storing them:
     
    149144      PRINTF(4)("Class %s matches\n", elem->className);
    150145      BaseObject* objectPointer = NULL;
    151       if (elem->isSingleton)
     146      if (ClassList::StringToID(elem->className) & CL_MASK_SINGLETON == CL_MASK_SINGLETON)
    152147      {
    153148        while(*commandBegin == ' ')
  • trunk/src/lib/shell/shell_command.h

    r5162 r5163  
    5454
    5555  protected:
    56     void*                            functionPointer;     //!< The pointeer to the function of the Class (or static pointer if ClassID == CL_NULL )
    57     unsigned int                     paramCount;          //!< the count of parameters
    58     unsigned int*                    parameters;          //!< Parameters
    59     bool                             isSingleton;         //!< if the Class is Singleton @todo autocheck
     56    void*                            functionPointer;                      //!< The pointeer to the function of the Class (or static pointer if ClassID == CL_NULL )
     57    unsigned int                     paramCount;                           //!< the count of parameters
     58    unsigned int*                    parameters;                           //!< Parameters
    6059    char*                            defaultStrings[FUNCTOR_MAX_ARGUMENTS];
    6160    int                              defaultInts[FUNCTOR_MAX_ARGUMENTS];
     
    6564  private:
    6665//    long                             classID;             //!< The ID of the Class associated to this Command
    67     const char*                      className;           //!< The Name of the Class associated to this Command
     66    const char*                      className;                            //!< The Name of the Class associated to this Command
    6867
    6968    // STATIC MEMBERS
    70     static tList<ShellCommandBase>*  commandList;         //!< A list of availiable commands.
     69    static tList<ShellCommandBase>*  commandList;                          //!< A list of availiable commands.
    7170};
    7271
Note: See TracChangeset for help on using the changeset viewer.