Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5639 in orxonox.OLD for trunk/src/lib/shell/shell_command.h


Ignore:
Timestamp:
Nov 18, 2005, 7:21:32 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: splitted shell_command into shell_command and shell_command_class

File:
1 edited

Legend:

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

    r5637 r5639  
    2222// FORWARD DECLARATION
    2323template<class T> class tList;
     24class ShellCommandClass;
     25class ShellCommandAlias;
    2426
    2527/**
     
    6365  ShellCommand_Static    = 2,
    6466} ShellCommand_Type;
    65 
    66 ////////////////
    67 // BASE CLASS //
    68 ////////////////
    69 class ShellCommand;
    70 class ShellCommandAlias;
    71 
    72 //! A class to hold all Classes that have (once) registered Commands.
    73 class ShellCommandClass : public BaseObject
    74 {
    75   friend class ShellCommand;
    76 
    77   public:
    78     /** @returns the CommandClassList */
    79     static const tList<ShellCommandClass>* getCommandClassList() { return ShellCommandClass::commandClassList; };
    80     static bool getCommandListOfClass(const char* className, tList<const char>* stringList);
    81     static bool getCommandListOfAlias(tList<const char>* aliasList);
    82 
    83     static ShellCommandClass* getCommandClass(const char* className);
    84     static void unregisterAllCommands();
    85 
    86     static void help (const char* className);
    87 
    88   private:
    89     ShellCommandClass(const char* className);
    90     ~ShellCommandClass();
    91 
    92     static const ShellCommandClass* isRegistered(const char* className);
    93     static void initCommandClassList();
    94 
    95   private:
    96     const char*                      className;                 //!< The Name of the Class. This should match the ClassName of the Commands Class.
    97     long                             classID;                   //!< The classID of this Class
    98     tList<ShellCommand>*         commandList;               //!< A list of Commands from this Class
    99     static tList<ShellCommandClass>* commandClassList;          //!< A list of Classes
    100     static tList<ShellCommandAlias>* aliasList;                 //!< An Alias to A Command. (only for classes with one Instance)
    101 };
    102 
    10367
    10468//! a baseClass for all possible ShellCommands
Note: See TracChangeset for help on using the changeset viewer.