Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/cd/src/lib/shell/shell_command_class.h @ 7590

Last change on this file since 7590 was 7221, checked in by bensch, 19 years ago

orxonox/trunk: merged the std-branche back, it runs on windows and Linux

svn merge https://svn.orxonox.net/orxonox/branches/std . -r7202:HEAD

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