]> Creatis software - creaContours.git/blob - lib/kernel_ManagerContour_NDimensions/ComposedCommand.h
4e4889319338d2bfee8f0464ac1a1c4deb83cd5b
[creaContours.git] / lib / kernel_ManagerContour_NDimensions / ComposedCommand.h
1 #ifndef __COMPOSED_COMMAND__
2 #define __COMPOSED_COMMAND__
3
4
5 //------------------------------------------------------------------------------------------------------------
6 // Includes
7 //------------------------------------------------------------------------------------------------------------
8 #include <iostream>
9 #include <deque>
10 #include "CommandObject.h"
11
12 /*
13 class CommandObject;
14 class ExecutableCommand;*/
15
16 class ComposedCommand : public CommandObject{
17
18 //------------------------------------------------------------------------------------------------------------
19 // Constructors & Destructors
20 //------------------------------------------------------------------------------------------------------------
21 public:
22
23         ComposedCommand( );
24
25         virtual ~ComposedCommand( );
26 //------------------------------------------------------------------------------------------------------------
27 // Methods
28 //------------------------------------------------------------------------------------------------------------
29         
30         /*
31         * Adds a command to the list of command
32         * @param nwCommand Is the new command to include
33         */
34         void addCommand(CommandObject * nwCommand);     
35
36         /*
37         * Includes the command into the given queue for execution
38         * @param executionQueue Is the queue in which is included the command
39         */
40         virtual void includeToExecute(std::deque<CommandObject *> &executionQueue);
41
42         /*
43         * Counts the command(s)
44         * @return The value of commands that represents this
45         */
46         virtual int count();
47
48         /*
49         * Method that clears the command
50         */
51         virtual void clear();
52
53 //------------------------------------------------------------------------------------------------------------
54 // Constants
55 //------------------------------------------------------------------------------------------------------------
56
57 private:        
58 //------------------------------------------------------------------------------------------------------------
59 // Attributes
60 //------------------------------------------------------------------------------------------------------------
61         
62         /*
63         * Represents the internal commands 
64         */
65         std::deque< CommandObject *> internalCommands;  
66         
67 };
68 #endif