Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/lib/shell/shell_command_class.h @ 7380

Last change on this file since 7380 was 7374, checked in by bensch, 19 years ago

orxonox/trunk: added new Files shell_completion_plugin for the new Plugin Structure.
Also created the first namespace: OrxShell

File size: 1.8 KB
RevLine 
[4838]1/*!
[5639]2 * @file shell_command_class.h
[5068]3 * Definition of a on-screen-shell
[5391]4 */
[1853]5
[5639]6#ifndef _SHELL_COMMAND_CLASS_H
7#define _SHELL_COMMAND_CLASS_H
[1853]8
[5129]9#include "base_object.h"
[5779]10#include <list>
[1853]11
[5068]12
[7374]13namespace OrxShell
14{
15  // FORWARD DECLARATION
16  class ShellCommand;
17  class ShellCommandAlias;
[3543]18
[7374]19  //! A class to hold all Classes that have (once) registered Commands.
20  class ShellCommandClass : public BaseObject
21  {
22    friend class ShellCommand;
[5170]23
24  public:
[5197]25    /** @returns the CommandClassList */
[5779]26    static const std::list<ShellCommandClass*>* getCommandClassList() { return ShellCommandClass::commandClassList; };
[7221]27    static bool getCommandListOfClass(const std::string& className, std::list<std::string>* stringList);
28    static bool getCommandListOfAlias(std::list<std::string>* aliasList);
[5190]29
[7221]30    static ShellCommandClass* getCommandClass(const std::string& className);
[5171]31    static void unregisterAllCommands();
[5170]32
[7221]33    static void help (const std::string& className);
[5204]34
[5170]35  private:
[7221]36    ShellCommandClass(const std::string& className);
[6981]37    virtual ~ShellCommandClass();
[5170]38
[7221]39    static const ShellCommandClass* isRegistered(const std::string& className);
[5170]40    static void initCommandClassList();
41
42  private:
[7221]43    const std::string                      className;                 //!< The Name of the Class. This should match the ClassName of the Commands Class.
[5779]44    long                                   classID;                   //!< The classID of this Class
45    std::list<ShellCommand*>               commandList;               //!< A list of Commands from this Class
46    static std::list<ShellCommandClass*>*  commandClassList;          //!< A list of Classes
47    static std::list<ShellCommandAlias*>*  aliasList;                 //!< An Alias to A Command. (only for classes with one Instance)
[7374]48  };
[5170]49
[7374]50}
51
[5129]52#endif /* _SHELL_COMMAND_H */
Note: See TracBrowser for help on using the repository browser.