]> Creatis software - creaContours.git/blob - lib/kernel_ManagerContour_NDimensions/ExecutableCommand.h
8a21ab4f2dd85712813efd495d8d08b132cd721f
[creaContours.git] / lib / kernel_ManagerContour_NDimensions / ExecutableCommand.h
1 #ifndef __EXECUTABLE_COMMAND__
2 #define __EXECUTABLE_COMMAND__
3
4
5
6 //------------------------------------------------------------------------------------------------------------
7 // Includes
8 //------------------------------------------------------------------------------------------------------------
9 #include <iostream>
10 #include "CommandObject.h"
11
12 class ExecutableCommand : public CommandObject{
13
14 //------------------------------------------------------------------------------------------------------------
15 // Constructors & Destructors
16 //------------------------------------------------------------------------------------------------------------
17 public:
18
19         /*
20         * Creates a command (executable) with the given text
21         * @param aText Is the text to assign to the command
22         * @return Returns the created ExecutableCommand pointer
23         */
24         ExecutableCommand(std::string aText );
25
26         /*
27         * Destroys the command
28         */
29         virtual ~ExecutableCommand( );
30 //------------------------------------------------------------------------------------------------------------
31 // Methods
32 //------------------------------------------------------------------------------------------------------------
33
34
35         /*
36         * Gets the text of the command
37         * @return text Is the text of the command
38         */
39         std::string getText();
40
41         /*
42         * Sets the text of the command
43         * @param theText Is the text of the command
44         */
45         void setText(std::string theText);
46
47         /*
48         * Includes the command into the given queue for execution
49         * @param executionQueue Is the queue in which is included the command
50         */
51         virtual void includeToExecute(std::deque<CommandObject * > & executionQueue);
52
53         /*
54         * Counts the command(s)
55         * @return The value of commands that represents this
56         */
57         virtual int count();
58
59         /*
60         * Method that clears the command
61         */
62         virtual void clear();
63
64 //------------------------------------------------------------------------------------------------------------
65 // Constants
66 //------------------------------------------------------------------------------------------------------------
67
68 private:        
69 //------------------------------------------------------------------------------------------------------------
70 // Attributes
71 //------------------------------------------------------------------------------------------------------------
72
73         /*
74         * Represents the text of the command
75         */
76         std::string text;
77         
78 };
79 #endif