Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 7410 was 7408, checked in by bensch, 19 years ago

orxonox/trunk: exist get functions

File size: 1.7 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"
[7388]10#include <vector>
[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 */
[7394]26    static const std::vector<ShellCommandClass*>& getCommandClassList() { return ShellCommandClass::commandClassList; };
[5190]27
[7386]28    static bool getCommandListOfClass(const std::string& className, std::list<std::string>& stringList);
29
[5171]30    static void unregisterAllCommands();
[7408]31    static const ShellCommandClass* getCommandClass(const std::string& className);
32    static bool exists(const std::string& className);
[5170]33
[7221]34    static void help (const std::string& className);
[5204]35
[5170]36  private:
[7221]37    ShellCommandClass(const std::string& className);
[7408]38    static ShellCommandClass* acquireCommandClass(const std::string& className);
[6981]39    virtual ~ShellCommandClass();
[5170]40
41
[7388]42    void registerCommand(ShellCommand* command);
43    void unregisterCommand(ShellCommand* command);
44
[5170]45  private:
[7221]46    const std::string                      className;                 //!< The Name of the Class. This should match the ClassName of the Commands Class.
[5779]47    long                                   classID;                   //!< The classID of this Class
[7388]48    std::vector<ShellCommand*>             commandList;               //!< A list of Commands from this Class
[7394]49
50    static std::vector<ShellCommandClass*> commandClassList;          //!< A list of Classes
[7374]51  };
[5170]52
[7374]53}
54
[5129]55#endif /* _SHELL_COMMAND_H */
Note: See TracBrowser for help on using the repository browser.