CoreLinux++  0.4.32
Command.hpp
1 #if !defined(__COMMAND_HPP)
2 #define __COMMAND_HPP
3 
4 /*
5  CoreLinux++
6  Copyright (C) 1999,2000 CoreLinux Consortium
7 
8  The CoreLinux++ Library is free software; you can redistribute it and/or
9  modify it under the terms of the GNU Library General Public License as
10  published by the Free Software Foundation; either version 2 of the
11  License, or (at your option) any later version.
12 
13  The CoreLinux++ Library Library is distributed in the hope that it will
14  be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  Library General Public License for more details.
17 
18  You should have received a copy of the GNU Library General Public
19  License along with the GNU C Library; see the file COPYING.LIB. If not,
20  write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21  Boston, MA 02111-1307, USA.
22 */
23 
24 #if !defined(__COMMON_HPP)
25 #include <Common.hpp>
26 #endif
27 
28 #if !defined(__ABSTRACTCOMMAND_HPP)
29 #include <AbstractCommand.hpp>
30 #endif
31 
32 namespace corelinux
33 {
34  DECLARE_CLASS( Command );
35 
44  class Command : public AbstractCommand
45  {
46 
47  public:
48 
49  //
50  // Constructors and destructor
51  //
53 
54  Command( void );
55 
57 
59 
61 
63 
65 
66  virtual ~Command( void );
67 
68  //
69  // Operator overloads
70  //
71 
73 
75 
77 
78  bool operator==( CommandCref ) const;
79 
80  //
81  // Accessors
82  //
83 
89  virtual AbstractCommandPtr getReverseCommand( void ) const;
90 
91  //
92  // Mutators
93  //
94 
102  virtual void setReverseCommand( AbstractCommandPtr );
103 
109  virtual void executeReverse( void ) ;
110 
111  protected:
112 
114 
116 
117  private:
118 
119  };
120 }
121 
122 #endif // if !defined(__COMMAND_HPP)
123 
124 /*
125  Common rcs information do not modify
126  $Author: frankc $
127  $Revision: 1.1 $
128  $Date: 2000/05/03 03:56:47 $
129  $Locker: $
130 */
131 
132 
virtual void executeReverse(void)
If theReverseCommand is not null, call its execute method.
Definition: Command.cpp:99
CommandRef operator=(CommandCref)
Assignment operator.
Definition: Command.cpp:70
Command captures the semantics of allowing commands to be added as a reverse command type...
Definition: Command.hpp:44
virtual void setReverseCommand(AbstractCommandPtr)
Sets the reverse command pointer to be used by the executeReverse call.
Definition: Command.cpp:91
virtual ~Command(void)
Virtual Destructor.
Definition: Command.cpp:63
virtual AbstractCommandPtr getReverseCommand(void) const
Retrieves the reverse command.
Definition: Command.cpp:84
Forward reference the various common classes.
Definition: AbstractAllocator.hpp:32
AbstractCommand captures the semantics of the capabilities of commands, which is basically to provide...
Definition: AbstractCommand.hpp:38
AbstractCommandPtr theReverseCommand
The infamous reverse command.
Definition: Command.hpp:115
bool operator==(CommandCref) const
Equality operator.
Definition: Command.cpp:77
Command(void)
Default Constructor.
Definition: Command.cpp:33

This is the CoreLinux++ reference manual
Provided by The CoreLinux Consortium