Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 7389 was 7389, checked in by bensch, 18 years ago

orxonox/trunk: new and improved ShellCommandAlias

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 */
[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
[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
[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
[5779]49    static std::list<ShellCommandClass*>*  commandClassList;          //!< A list of Classes
[7374]50  };
[5170]51
[7374]52}
53
[5129]54#endif /* _SHELL_COMMAND_H */
Note: See TracBrowser for help on using the repository browser.