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