Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 7387 was 7386, checked in by bensch, 19 years ago

orxonox/trunk: completions

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; };
[5190]27
[7386]28    static bool getCommandListOfClass(const std::string& className, std::list<std::string>& stringList);
29    static bool getCommandListOfAlias(std::list<std::string>& aliasList);
30
[7221]31    static ShellCommandClass* getCommandClass(const std::string& className);
[5171]32    static void unregisterAllCommands();
[5170]33
[7221]34    static void help (const std::string& className);
[5204]35
[5170]36  private:
[7221]37    ShellCommandClass(const std::string& className);
[6981]38    virtual ~ShellCommandClass();
[5170]39
[7221]40    static const ShellCommandClass* isRegistered(const std::string& className);
[5170]41    static void initCommandClassList();
42
43  private:
[7221]44    const std::string                      className;                 //!< The Name of the Class. This should match the ClassName of the Commands Class.
[5779]45    long                                   classID;                   //!< The classID of this Class
46    std::list<ShellCommand*>               commandList;               //!< A list of Commands from this Class
47    static std::list<ShellCommandClass*>*  commandClassList;          //!< A list of Classes
48    static std::list<ShellCommandAlias*>*  aliasList;                 //!< An Alias to A Command. (only for classes with one Instance)
[7374]49  };
[5170]50
[7374]51}
52
[5129]53#endif /* _SHELL_COMMAND_H */
Note: See TracBrowser for help on using the repository browser.