Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5461 in orxonox.OLD for trunk/src/lib/event/command_chain.h


Ignore:
Timestamp:
Oct 30, 2005, 10:37:14 AM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: command-chain (copy and renaming of shell_command) added to project … think some more

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/event/command_chain.h

    r5460 r5461  
    11/*!
    2  * @file shell_command.h
     2 * @file command_chain.h
    33 * Definition of a on-screen-shell
    44 */
    55
    6 #ifndef _SHELL_COMMAND_H
    7 #define _SHELL_COMMAND_H
     6#ifndef _COMMAND_CHAIN_H
     7#define _COMMAND_CHAIN_H
    88
    99#include "base_object.h"
     
    1515#include <stdarg.h>
    1616
    17 #define     SHELL_COMMAND_MAX_SIZE      //!< The maximum size of a Shell Command
     17#define     COMMAND_CHAIN_MAX_SIZE      //!< The maximum size of a Shell Command
    1818
    1919
     
    2929 *
    3030 * MEANING:
    31  *  ShellCommandBase* someUniqueVarName =
    32  *       ShellCommand<ClassName>::registerCommand("commandNameInShell", "ClassName", &ClassName::FunctionToCall);
     31 *  CommandChainBase* someUniqueVarName =
     32 *       CommandChain<ClassName>::registerCommand("commandNameInShell", "ClassName", &ClassName::FunctionToCall);
    3333 *
    3434 * In the Shell you would call this Command using:
    3535 * $ ClassName [ObjectName] commandNameInShell [parameters]
    3636 */
    37 #define SHELL_COMMAND(command, class, function) \
    38         ShellCommandBase* shell_command_##class##_##command = ShellCommand<class>::registerCommand(#command, #class, &class::function)
     37#define COMMAND_CHAIN(command, class, function) \
     38        CommandChainBase* command_chain_##class##_##command = CommandChain<class>::registerCommand(#command, #class, &class::function)
    3939/**
    4040 * an easy to use Macro to create a Command
     
    4444 *
    4545 * MEANING:
    46  *  ShellCommandBase* someUniqueVarName =
    47  *       ShellCommand<ClassName>::registerCommand("commandNameInShell", "ClassName", &ClassName::FunctionToCall);
     46 *  CommandChainBase* someUniqueVarName =
     47 *       CommandChain<ClassName>::registerCommand("commandNameInShell", "ClassName", &ClassName::FunctionToCall);
    4848 *
    4949 * In the Shell you would call this Command using:
    5050 * $ ClassName [ObjectName] commandNameInShell [parameters]
    5151 */
    52 #define SHELL_COMMAND_STATIC(command, class, function) \
    53                          ShellCommandBase* shell_command_##class##_##command = ShellCommandStatic<class>::registerCommand(#command, #class, function)
     52#define COMMAND_CHAIN_STATIC(command, class, function) \
     53                         CommandChainBase* command_chain_##class##_##command = CommandChainStatic<class>::registerCommand(#command, #class, function)
    5454
    5555
    5656//! an enumerator for the definition of the Type.
    5757typedef enum {
    58   ShellCommand_Objective = 1,
    59   ShellCommand_Static    = 2,
    60 } ShellCommand_Type;
     58  CommandChain_Objective = 1,
     59  CommandChain_Static    = 2,
     60} CommandChain_Type;
    6161
    6262////////////////
    6363// BASE CLASS //
    6464////////////////
    65 class ShellCommandBase;
    66 class ShellCommandAlias;
     65class CommandChainBase;
     66class CommandChainAlias;
    6767
    6868//! A class to hold all Classes that have (once) registered Commands.
    69 class ShellCommandClass : public BaseObject
     69class CommandChainClass : public BaseObject
    7070{
    71   friend class ShellCommandBase;
     71  friend class CommandChainBase;
    7272
    7373  public:
    7474    /** @returns the CommandClassList */
    75     static const tList<ShellCommandClass>* getCommandClassList() { return ShellCommandClass::commandClassList; };
     75    static const tList<CommandChainClass>* getCommandClassList() { return CommandChainClass::commandClassList; };
    7676    static bool getCommandListOfClass(const char* className, tList<const char>* stringList);
    7777    static bool getCommandListOfAlias(tList<const char>* aliasList);
    7878
    79     static ShellCommandClass* getCommandClass(const char* className);
     79    static CommandChainClass* getCommandClass(const char* className);
    8080    static void unregisterAllCommands();
    8181
     
    8383
    8484  private:
    85     ShellCommandClass(const char* className);
    86     ~ShellCommandClass();
    87 
    88     static const ShellCommandClass* isRegistered(const char* className);
     85    CommandChainClass(const char* className);
     86    ~CommandChainClass();
     87
     88    static const CommandChainClass* isRegistered(const char* className);
    8989    static void initCommandClassList();
    9090
     
    9292    const char*                      className;                 //!< The Name of the Class. This should match the ClassName of the Commands Class.
    9393    long                             classID;                   //!< The classID of this Class
    94     tList<ShellCommandBase>*         commandList;               //!< A list of Commands from this Class
    95     static tList<ShellCommandClass>* commandClassList;          //!< A list of Classes
    96     static tList<ShellCommandAlias>* aliasList;                 //!< An Alias to A Command. (only for classes with one Instance)
     94    tList<CommandChainBase>*         commandList;               //!< A list of Commands from this Class
     95    static tList<CommandChainClass>* commandClassList;          //!< A list of Classes
     96    static tList<CommandChainAlias>* aliasList;                 //!< An Alias to A Command. (only for classes with one Instance)
    9797};
    9898
    9999
    100 //! a baseClass for all possible ShellCommands
    101 class ShellCommandBase : public BaseObject
     100//! a baseClass for all possible CommandChains
     101class CommandChainBase : public BaseObject
    102102{
    103   friend class ShellCommandClass;
     103  friend class CommandChainClass;
    104104  public:
    105105    static bool execute (const char* executionString);
    106106
    107     ShellCommandBase* describe(const char* description);
    108     ShellCommandBase* setAlias(const char* alias);
    109     ShellCommandBase* defaultValues(unsigned int count, ...);
     107    CommandChainBase* describe(const char* description);
     108    CommandChainBase* setAlias(const char* alias);
     109    CommandChainBase* defaultValues(unsigned int count, ...);
    110110
    111111    /** @returns the CommandList of the Shell */
     
    115115
    116116  protected:
    117     ShellCommandBase(const char* commandName, const char* className, unsigned int paramCount, ...);
    118     ~ShellCommandBase();
     117    CommandChainBase(const char* commandName, const char* className, unsigned int paramCount, ...);
     118    ~CommandChainBase();
    119119
    120120    /** @returns the Type of this Function (either static or objective) */
    121     inline ShellCommand_Type getType() { return this->functorType; };
     121    inline CommandChain_Type getType() { return this->functorType; };
    122122
    123123    static bool isRegistered(const char* commandName, const char* className, unsigned int paramCount, ...);
     
    129129
    130130  protected:
    131     ShellCommand_Type                functorType;                          //!< The type of Function we've got (either static or objective).
     131    CommandChain_Type                functorType;                          //!< The type of Function we've got (either static or objective).
    132132    void*                            functionPointer;                      //!< The pointeer to the function of the Class (or static pointer if ClassID == CL_NULL )
    133133    unsigned int                     paramCount;                           //!< the count of parameters.
     
    140140
    141141  private:
    142     ShellCommandClass*               shellClass;                           //!< A Pointer to the Shell-Class this Command belongs to.
    143     ShellCommandAlias*               alias;                                //!< An Alias for the Class.
     142    CommandChainClass*               shellClass;                           //!< A Pointer to the Shell-Class this Command belongs to.
     143    CommandChainAlias*               alias;                                //!< An Alias for the Class.
    144144
    145145    const char*                      description;                          //!< A description for this commnand. (initially NULL). Assigned with (create)->describe("blablabla");
     
    168168// COMMAND REGISTRATION //
    169169//////////////////////////
    170 // SHELLCOMMAND can be redefined as ShellCommand or ShellCommandStatic
     170// SHELLCOMMAND can be redefined as CommandChain or CommandChainStatic
    171171// SHELLCOMMANDEXECUTER can be redefined too.
    172172// SHELLCOMMANDINCLASS
    173173// SHELLCOMMANDTYPE
    174174//! registers a command without any parameters
    175 #define ShellCommandRegister0() \
     175#define CommandChainRegister0() \
    176176  static SHELLCOMMAND<T>* registerCommand(const char* commandName, const char* className, void SHELLCOMMANDINCLASS(*function)()) \
    177177  { \
     
    182182
    183183//! registers a command with 1 parameter
    184 #define ShellCommandRegister1(t1) \
     184#define CommandChainRegister1(t1) \
    185185  static SHELLCOMMAND<T>* registerCommand(const char* commandName, const char* className, void SHELLCOMMANDINCLASS(*function)(t1##_TYPE), t1##_TYPE d1 = t1##_DEFAULT) \
    186186  { \
     
    191191
    192192//! registers a command with 2 parameters
    193 #define ShellCommandRegister2(t1,t2) \
     193#define CommandChainRegister2(t1,t2) \
    194194  static SHELLCOMMAND<T>* registerCommand(const char* commandName, const char* className, void SHELLCOMMANDINCLASS(*function)(t1##_TYPE, t2##_TYPE), t1##_TYPE d1 = t1##_DEFAULT, t2##_TYPE d2 = t2##_DEFAULT) \
    195195  { \
     
    200200
    201201//! registers a command with 3 parameters
    202 #define ShellCommandRegister3(t1,t2,t3) \
     202#define CommandChainRegister3(t1,t2,t3) \
    203203  static SHELLCOMMAND<T>* registerCommand(const char* commandName, const char* className, void SHELLCOMMANDINCLASS(*function)(t1##_TYPE, t2##_TYPE, t3##_TYPE), t1##_TYPE d1 = t1##_DEFAULT, t2##_TYPE d2 = t2##_DEFAULT, t3##_TYPE d3 = t3##_DEFAULT) \
    204204  { \
     
    209209
    210210//! registers a command with 4 parameters
    211 #define ShellCommandRegister4(t1,t2,t3,t4) \
     211#define CommandChainRegister4(t1,t2,t3,t4) \
    212212  static SHELLCOMMAND<T>* registerCommand(const char* commandName, const char* className, void SHELLCOMMANDINCLASS(*function)(t1##_TYPE, t2##_TYPE, t3##_TYPE, t4##_TYPE), t1##_TYPE d1 = t1##_DEFAULT, t2##_TYPE d2 = t2##_DEFAULT, t3##_TYPE d3 = t3##_DEFAULT, t4##_TYPE d4 = t4##_DEFAULT) \
    213213  { \
     
    218218
    219219//! registers a command with 5 parameters
    220 #define ShellCommandRegister5(t1,t2,t3,t4,t5) \
     220#define CommandChainRegister5(t1,t2,t3,t4,t5) \
    221221  static SHELLCOMMAND<T>* registerCommand(const char* commandName, const char* className, void SHELLCOMMANDINCLASS(*function)(t1##_TYPE, t2##_TYPE, t3##_TYPE, t4##_TYPE, t5##_TYPE), t1##_TYPE d1 = t1##_DEFAULT, t2##_TYPE d2 = t2##_DEFAULT, t3##_TYPE d3 = t3##_DEFAULT, t4##_TYPE d4 = t4##_DEFAULT, t5##_TYPE d5 = t5##_DEFAULT) \
    222222  { \
    223223    if (isRegistered(commandName, className, 5, t1##_PARAM, t2##_PARAM, t3##_PARAM, t4##_PARAM, t5##_PARAM)== true) \
    224224      return NULL; \
    225     return new ShellCommand<T>(commandName, className, function, d1, d2, d3, d4, d5); \
     225    return new CommandChain<T>(commandName, className, function, d1, d2, d3, d4, d5); \
    226226  }
    227227
     
    230230/////////////////
    231231//! creates a command that takes no parameters
    232 #define ShellCommandConstructor0() \
     232#define CommandChainConstructor0() \
    233233  void SHELLCOMMANDINCLASS(*functionPointer_0)(); \
    234234  SHELLCOMMAND(const char* commandName, const char* className, void SHELLCOMMANDINCLASS(*function)()) \
    235   : ShellCommandBase(commandName, className, 0) \
     235  : CommandChainBase(commandName, className, 0) \
    236236  { \
    237237    this->functorType = SHELLCOMMANDTYPE; \
     
    240240
    241241//! creates a command that takes one parameter
    242 #define ShellCommandConstructor1(t1) \
     242#define CommandChainConstructor1(t1) \
    243243  void SHELLCOMMANDINCLASS(*functionPointer_1_##t1)(t1##_TYPE); \
    244244  SHELLCOMMAND(const char* commandName, const char* className, void SHELLCOMMANDINCLASS(*function)(t1##_TYPE), t1##_TYPE d1) \
    245   : ShellCommandBase(commandName, className, 1, t1##_PARAM, d1) \
     245  : CommandChainBase(commandName, className, 1, t1##_PARAM, d1) \
    246246  { \
    247247    this->functorType = SHELLCOMMANDTYPE; \
     
    250250
    251251//! creates a command that takes two parameters
    252 #define ShellCommandConstructor2(t1,t2) \
     252#define CommandChainConstructor2(t1,t2) \
    253253  void SHELLCOMMANDINCLASS(*functionPointer_2_##t1##_##t2)(t1##_TYPE, t2##_TYPE); \
    254254  SHELLCOMMAND(const char* commandName, const char* className, void SHELLCOMMANDINCLASS(*function)(t1##_TYPE, t2##_TYPE), t1##_TYPE d1, t2##_TYPE d2) \
    255   : ShellCommandBase(commandName, className, 2, t1##_PARAM, d1, t2##_PARAM, d2) \
     255  : CommandChainBase(commandName, className, 2, t1##_PARAM, d1, t2##_PARAM, d2) \
    256256  { \
    257257    this->functorType = SHELLCOMMANDTYPE; \
     
    260260
    261261//! creates a command that takes three parameter
    262 #define ShellCommandConstructor3(t1,t2,t3) \
     262#define CommandChainConstructor3(t1,t2,t3) \
    263263  void SHELLCOMMANDINCLASS(*functionPointer_3_##t1##_##t2##_##t3)(t1##_TYPE, t2##_TYPE, t3##_TYPE); \
    264264  SHELLCOMMAND(const char* commandName, const char* className, void SHELLCOMMANDINCLASS(*function)(t1##_TYPE, t2##_TYPE, t3##_TYPE), t1##_TYPE d1, t2##_TYPE d2, t3##_TYPE d3) \
    265   : ShellCommandBase(commandName, className, 3, t1##_PARAM, d1, t2##_PARAM, d2, t3##_PARAM, d3) \
     265  : CommandChainBase(commandName, className, 3, t1##_PARAM, d1, t2##_PARAM, d2, t3##_PARAM, d3) \
    266266  { \
    267267    this->functorType = SHELLCOMMANDTYPE; \
     
    270270
    271271//! creates a command that takes four parameter
    272 #define ShellCommandConstructor4(t1,t2,t3,t4) \
     272#define CommandChainConstructor4(t1,t2,t3,t4) \
    273273  void SHELLCOMMANDINCLASS(*functionPointer_4_##t1##_##t2##_##t3##_##t4)(t1##_TYPE, t2##_TYPE, t3##_TYPE, t4##_TYPE); \
    274274  SHELLCOMMAND(const char* commandName, const char* className, void SHELLCOMMANDINCLASS(*function)(t1##_TYPE, t2##_TYPE, t3##_TYPE, t4##_TYPE), t1##_TYPE d1, t2##_TYPE d2, t3##_TYPE d3, t4##_TYPE d4) \
    275   : ShellCommandBase(commandName, className, 4, t1##_PARAM, d1, t2##_PARAM, d2, t3##_PARAM, d3, t4##_PARAM, d4) \
     275  : CommandChainBase(commandName, className, 4, t1##_PARAM, d1, t2##_PARAM, d2, t3##_PARAM, d3, t4##_PARAM, d4) \
    276276  { \
    277277    this->functorType = SHELLCOMMANDTYPE; \
     
    280280
    281281//! creates a command that takes five parameter
    282 #define ShellCommandConstructor5(t1,t2,t3,t4,t5) \
     282#define CommandChainConstructor5(t1,t2,t3,t4,t5) \
    283283  void SHELLCOMMANDINCLASS(*functionPointer_5_##t1##_##t2##_##t3##_##t4##_##t5)(t1##_TYPE, t2##_TYPE, t3##_TYPE, t4##_TYPE, t5##_TYPE); \
    284284  SHELLCOMMAND(const char* commandName, const char* className, void SHELLCOMMANDINCLASS(*function)(t1##_TYPE, t2##_TYPE, t3##_TYPE, t4##_TYPE, t5##_TYPE), t1##_TYPE d1, t2##_TYPE d2, t3##_TYPE d3, t4##_TYPE d4, t5##_TYPE d5) \
    285   : ShellCommandBase(commandName, className, 5, t1##_PARAM, d1, t2##_PARAM, d2, t3##_PARAM, d3, t4##_PARAM, d4, t5##_PARAM, d5) \
     285  : CommandChainBase(commandName, className, 5, t1##_PARAM, d1, t2##_PARAM, d2, t3##_PARAM, d3, t4##_PARAM, d4, t5##_PARAM, d5) \
    286286  { \
    287287    this->functorType = SHELLCOMMANDTYPE; \
     
    293293///////////////
    294294//! execute-macro for functions with no parameters
    295 #define ShellCommandExecute0() \
     295#define CommandChainExecute0() \
    296296  if (this->paramCount == 0) \
    297297    SHELLCOMMANDEXECUTER(_0)()
    298298
    299299//! execute-macro for functions with one parameter
    300 #define ShellCommandExecute1(t1) \
     300#define CommandChainExecute1(t1) \
    301301   else if (this->paramCount == 1 && this->parameters[0] == t1##_PARAM) \
    302302    SHELLCOMMANDEXECUTER(_1_##t1)(t1##_FUNC(parameters, t1##_DEFGRAB(0)))
    303303
    304304//! execute-macro for functions with two parameters
    305 #define ShellCommandExecute2(t1,t2) \
     305#define CommandChainExecute2(t1,t2) \
    306306   else if (this->paramCount == 2 && this->parameters[0] == t1##_PARAM && this->parameters[1] == t2##_PARAM) \
    307307    SHELLCOMMANDEXECUTER(_2_##t1##_##t2)(t1##_FUNC(sub.getString(0), t1##_DEFGRAB(0)), t2##_FUNC(sub.getString(1), t2##_DEFGRAB(1)))
    308308
    309309//! execute-macro for functions with three parameters
    310 #define ShellCommandExecute3(t1,t2,t3) \
     310#define CommandChainExecute3(t1,t2,t3) \
    311311   else if (this->paramCount == 3 && this->parameters[0] == t1##_PARAM && this->parameters[1] == t2##_PARAM && this->parameters[2] == t3##_PARAM) \
    312312    SHELLCOMMANDEXECUTER(_3_##t1##_##t2##_##t3)(t1##_FUNC(sub.getString(0), t1##_DEFGRAB(0)), t2##_FUNC(sub.getString(1), t2##_DEFGRAB(1)), t3##_FUNC(sub.getString(2), t3##_DEFGRAB(2)))
    313313
    314314//! execute-macro for functions with four parameters
    315 #define ShellCommandExecute4(t1,t2,t3,t4) \
     315#define CommandChainExecute4(t1,t2,t3,t4) \
    316316   else if (this->paramCount == 4 && this->parameters[0] == t1##_PARAM && this->parameters[1] == t2##_PARAM && this->parameters[2] == t3##_PARAM && this->parameters[3] == t4##_PARAM) \
    317317    SHELLCOMMANDEXECUTER(_4_##t1##_##t2##_##t3##_##t4)(t1##_FUNC(sub.getString(0), t1##_DEFGRAB(0)), t2##_FUNC(sub.getString(1), t2##_DEFGRAB(1)), t3##_FUNC(sub.getString(2), t3##_DEFGRAB(2)), t4##_FUNC(sub.getString(3), t4##_DEFGRAB(3)))
    318318
    319319//! execute-macro for functions with five parameters
    320 #define ShellCommandExecute5(t1,t2,t3,t4,t5) \
     320#define CommandChainExecute5(t1,t2,t3,t4,t5) \
    321321   else if (this->paramCount == 5 && this->parameters[0] == t1##_PARAM && this->parameters[1] == t2##_PARAM && this->parameters[2] == t3##_PARAM && this->parameters[3] == t4##_PARAM && this->parameters[4] == t5##_PARAM) \
    322322    SHELLCOMMANDEXECUTER(_5_##t1##_##t2##_##t3##_##t4##_##t5)(t1##_FUNC(sub.getString(0), t1##_DEFGRAB(0)), t2##_FUNC(sub.getString(1), t2##_DEFGRAB(1)), t3##_FUNC(sub.getString(2), t3##_DEFGRAB(2)), t4##_FUNC(sub.getString(3), t4##_DEFGRAB(3)), t5##_FUNC(sub.getString(4), t5##_DEFGRAB(4)))
    323323
    324324
    325 //! keeps information about a ShellCommand
    326 template<class T> class ShellCommand : public ShellCommandBase
     325//! keeps information about a CommandChain
     326template<class T> class CommandChain : public CommandChainBase
    327327{
    328328  public:
     
    333333#undef SHELLCOMMAND
    334334#endif
    335 #define SHELLCOMMAND                       ShellCommand
     335#define SHELLCOMMAND                       CommandChain
    336336#ifdef SHELLCOMMANDEXECUTER
    337337#undef SHELLCOMMANDEXECUTER
     
    345345#undef SHELLCOMMANDTYPE
    346346#endif
    347 #define SHELLCOMMANDTYPE                   ShellCommand_Objective
     347#define SHELLCOMMANDTYPE                   CommandChain_Objective
    348348//! FUNCTOR_LIST is the List of command-registerers
    349 #define FUNCTOR_LIST(x) ShellCommandRegister ## x
     349#define FUNCTOR_LIST(x) CommandChainRegister ## x
    350350#include "functor_list.h"
    351351#undef FUNCTOR_LIST
     
    354354  private:
    355355//! FUNCTOR_LIST is the List of CommandConstructors
    356 #define FUNCTOR_LIST(x) ShellCommandConstructor ## x
     356#define FUNCTOR_LIST(x) CommandChainConstructor ## x
    357357#include "functor_list.h"
    358358#undef FUNCTOR_LIST
     
    362362      SubString sub(parameters, true);
    363363//! FUNCTOR_LIST is the List of Executive Functions
    364 #define FUNCTOR_LIST(x) ShellCommandExecute ## x
     364#define FUNCTOR_LIST(x) CommandChainExecute ## x
    365365#include "functor_list.h"
    366366#undef FUNCTOR_LIST
     
    368368};
    369369
    370 //! keeps information about a ShellCommand, that points to a Static Function
    371 template<class T> class ShellCommandStatic : public ShellCommandBase
     370//! keeps information about a CommandChain, that points to a Static Function
     371template<class T> class CommandChainStatic : public CommandChainBase
    372372{
    373373  public:
     
    378378#undef SHELLCOMMAND
    379379#endif
    380 #define SHELLCOMMAND                      ShellCommandStatic
     380#define SHELLCOMMAND                      CommandChainStatic
    381381#ifdef SHELLCOMMANDEXECUTER
    382382#undef SHELLCOMMANDEXECUTER
     
    390390#undef SHELLCOMMANDTYPE
    391391#endif
    392 #define SHELLCOMMANDTYPE                   ShellCommand_Static
     392#define SHELLCOMMANDTYPE                   CommandChain_Static
    393393
    394394//! FUNCTOR_LIST is the List of command-registerers
    395 #define FUNCTOR_LIST(x) ShellCommandRegister ## x
     395#define FUNCTOR_LIST(x) CommandChainRegister ## x
    396396#include "functor_list.h"
    397397#undef FUNCTOR_LIST
     
    399399  private:
    400400//! FUNCTOR_LIST is the List of CommandConstructors
    401 #define FUNCTOR_LIST(x) ShellCommandConstructor ## x
     401#define FUNCTOR_LIST(x) CommandChainConstructor ## x
    402402#include "functor_list.h"
    403403#undef FUNCTOR_LIST
     
    407407  SubString sub(parameters, true);
    408408//! FUNCTOR_LIST is the List of Executive Functions
    409 #define FUNCTOR_LIST(x) ShellCommandExecute ## x
     409#define FUNCTOR_LIST(x) CommandChainExecute ## x
    410410#include "functor_list.h"
    411411#undef FUNCTOR_LIST
     
    414414
    415415//! A Class, that handles aliases.
    416 class ShellCommandAlias
     416class CommandChainAlias
    417417{
    418   friend class ShellCommandBase;
     418  friend class CommandChainBase;
    419419  public:
    420420    /** @returns the Name of the Alias. */
    421421    const char* getName() const { return this->aliasName; };
    422422    /** @returns the Command, this Alias is asociated with */
    423     ShellCommandBase* getCommand() const { return this->command; };
     423    CommandChainBase* getCommand() const { return this->command; };
    424424
    425425  private:
    426426    /** @param aliasName the name of the Alias @param command the Command, to associate this alias with */
    427     ShellCommandAlias(const char* aliasName, ShellCommandBase* command) { this->aliasName = aliasName; this->command = command; };
     427    CommandChainAlias(const char* aliasName, CommandChainBase* command) { this->aliasName = aliasName; this->command = command; };
    428428
    429429  private:
    430430    const char*         aliasName;       //!< the name of the Alias
    431     ShellCommandBase*   command;         //!< a pointer to the command, this alias executes.
     431    CommandChainBase*   command;         //!< a pointer to the command, this alias executes.
    432432};
    433433
    434 #endif /* _SHELL_COMMAND_H */
     434#endif /* _COMMAND_CHAIN_H */
Note: See TracChangeset for help on using the changeset viewer.