/*! * @file shell_command_class.h * Definition of a on-screen-shell */ #ifndef _SHELL_COMMAND_CLASS_H #define _SHELL_COMMAND_CLASS_H #include "base_object.h" // FORWARD DECLARATION template class tList; //////////////// // BASE CLASS // //////////////// class ShellCommand; class ShellCommandAlias; //! A class to hold all Classes that have (once) registered Commands. class ShellCommandClass : public BaseObject { friend class ShellCommand; public: /** @returns the CommandClassList */ static const tList* getCommandClassList() { return ShellCommandClass::commandClassList; }; static bool getCommandListOfClass(const char* className, tList* stringList); static bool getCommandListOfAlias(tList* aliasList); static ShellCommandClass* getCommandClass(const char* className); static void unregisterAllCommands(); static void help (const char* className); private: ShellCommandClass(const char* className); ~ShellCommandClass(); static const ShellCommandClass* isRegistered(const char* className); static void initCommandClassList(); private: const char* className; //!< The Name of the Class. This should match the ClassName of the Commands Class. long classID; //!< The classID of this Class tList* commandList; //!< A list of Commands from this Class static tList* commandClassList; //!< A list of Classes static tList* aliasList; //!< An Alias to A Command. (only for classes with one Instance) }; #endif /* _SHELL_COMMAND_H */