Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 23, 2006, 12:43:25 AM (18 years ago)
Author:
bensch
Message:

orxonox/new_class_id: some thoughts on a BaseIterator class, that can travers through ObejectLists without knowing the Polymorph type.
This is all virtual, and since templated virutal functions are not allowed, quite hard to implements…
hpe it will work

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/new_class_id/src/lib/shell/shell_command_class.h

    r8362 r9692  
    2525  class ShellCommandClass : public BaseObject
    2626  {
     27    NewObjectListDeclaration(ShellCommandClass);
     28
    2729    friend class ShellCommand;
    2830  public:
    2931    /** @returns the CommandClassList */
    30     static const CmdClassList& getCommandClassList() { return *ShellCommandClass::commandClassList; };
     32    static const CmdClassList& getCommandClassList() { return *ShellCommandClass::_commandClassList; };
    3133
    3234    static bool getCommandListOfClass(const std::string& className, std::list<std::string>& stringList);
     
    3436    static void unregisterAllCommands();
    3537    static ShellCommandClass* getCommandClass(const std::string& className);
    36     ClassID getClassID();
     38    NewClassID getClassID();
    3739    static bool exists(const std::string& className);
    3840
     
    5153
    5254  private:
    53     const std::string                      className;                 //!< The Name of the Class. This should match the ClassName of the Commands Class.
    54     ClassID                                classID;                   //!< The classID of this Class
    55     CmdList                                commandList;               //!< A list of Commands from this Class
     55    const std::string                      _className;                 //!< The Name of the Class. This should match the ClassName of the Commands Class.
     56    NewClassID                             _classID;                   //!< The classID of this Class
     57    CmdList                                _commandList;               //!< A list of Commands from this Class
    5658
    57     static CmdClassList*                   commandClassList;          //!< A list of Classes
     59    static CmdClassList*                   _commandClassList;          //!< A list of Classes
    5860  };
    5961}
Note: See TracChangeset for help on using the changeset viewer.