Changeset 5170 in orxonox.OLD for trunk/src/lib/shell/shell_command.h
- Timestamp:
- Sep 7, 2005, 10:25:21 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/shell/shell_command.h
r5166 r5170 35 35 // BASE CLASS // 36 36 //////////////// 37 class ShellCommandBase; 38 39 //! A class to hold all Classes that have (once) registered Commands. 40 class ShellCommandClass : public BaseObject 41 { 42 friend class ShellCommandBase; 43 44 public: 45 static const tList<ShellCommandClass>* getCommandClassList() { return ShellCommandClass::commandClassList; }; 46 static ShellCommandClass* getCommandClass(const char* className); 47 48 private: 49 ShellCommandClass(const char* className); 50 ~ShellCommandClass(); 51 52 static const ShellCommandClass* isRegistered(const char* className); 53 static void initCommandClassList(); 54 55 private: 56 const char* className; 57 ClassID classID; 58 tList<ShellCommandBase>* commandList; 59 static tList<ShellCommandClass>* commandClassList; //!< A list of Classes 60 }; 61 62 37 63 //! a baseClass for all possible ShellCommands 38 64 class ShellCommandBase : public BaseObject 39 65 { 66 friend class ShellCommandClass; 40 67 public: 41 68 static bool execute (const char* executionString); … … 44 71 45 72 /** @returns the CommandList of the Shell */ 46 static const tList<ShellCommandBase>* getCommandList() { return ShellCommandBase::commandList; };47 73 48 74 static void unregisterAllCommands(); … … 74 100 75 101 private: 76 // long classID; //!< The ID of the Class associated to this Command 77 const char* className; //!< The Name of the Class associated to this Command 102 ShellCommandClass* shellClass; //!< A Pointer to the Shell-Class this Command belongs to. 78 103 79 104 const char* description; //!< A description for this commnand. (initially NULL). Assigned with (create)->describe("blablabla"); 80 81 // STATIC MEMBERS82 static tList<ShellCommandBase>* commandList; //!< A list of availiable commands.83 105 }; 84 106
Note: See TracChangeset
for help on using the changeset viewer.