00001 00002 00003 00004 #ifndef COMMAND_H 00005 #define COMMAND_H 00006 00007 #ifdef __GNUG__ 00008 #pragma interface 00009 #endif 00010 00011 #include <stdlib.h> 00012 #include <stdio.h> 00013 #include <fstream.h> 00014 00015 #include "wxmatrix.h" 00016 #include "tool.h" 00017 00018 class Structure; 00019 class ElementList; 00020 class Element; 00021 00023 00033 class Command 00034 { 00035 public: 00036 Command(); 00037 ~Command(); 00038 00040 const char* Get_Keyword(); 00042 void Set_Keyword(const wxString& a_keyword); 00044 wxString Get_Command(); 00046 bool Set_Command(char* Format,...); 00048 bool Get_Undo(); 00050 void Set_Undo(bool possible); 00052 ElementList* Get_ElementList(); 00054 void Set_ElementList(ElementList* a_elementlist); 00056 Element* Get_Element(); 00058 void Set_Element(Element* a_element); 00060 Structure* Get_Structure(); 00062 void Set_Structure(Structure* a_structure); 00064 long Get_Long(); 00066 void Set_Long(long a_long); 00068 void Set_Tool(ToolSet a_tool); 00070 ToolSet Get_Tool(); 00072 long Get_EventStamp(); 00074 void Set_EventStamp(long a_long); 00076 wxTransformMatrix* Get_Matrix(); 00078 void Set_Matrix(wxTransformMatrix* _undo_trans_matrix); 00079 00080 private: 00082 bool _undo; 00084 wxString _commandstring; 00086 wxString _keyword; 00088 long _eventstamp; 00090 ToolSet _tool; 00091 00092 union undo_data 00093 { 00094 ElementList* _elementlist; 00095 Element* _element; 00096 Structure* _structure; 00097 long _long; 00098 char* _string; 00099 wxTransformMatrix* _matrix; 00100 } undo_data; 00101 }; 00102 00103 00104 #endif