Cafu Engine
AddComponent.hpp
1 /*
2 Cafu Engine, http://www.cafu.de/
3 Copyright (c) Carsten Fuchs and other contributors.
4 This project is licensed under the terms of the MIT license.
5 */
6 
7 #ifndef CAFU_MAPEDITOR_COMMAND_ADD_COMPONENT_HPP_INCLUDED
8 #define CAFU_MAPEDITOR_COMMAND_ADD_COMPONENT_HPP_INCLUDED
9 
10 #include "../../CommandPattern.hpp"
11 #include "Templates/Pointer.hpp"
12 
13 
14 namespace cf { namespace GameSys { class ComponentBaseT; } }
15 namespace cf { namespace GameSys { class EntityT; } }
16 class MapDocumentT;
17 
18 
19 namespace MapEditor
20 {
22  {
23  public:
24 
26 
27  // CommandT implementation.
28  bool Do();
29  void Undo();
30  wxString GetName() const;
31 
32 
33  private:
34 
35  MapDocumentT* m_MapDocument;
38  const unsigned long m_Index;
39  };
40 }
41 
42 #endif
wxString GetName() const
Returns the name (a description) of the command.
Definition: AddComponent.cpp:51
This class represents a CaWE "map" document.
Definition: MapDocument.hpp:45
bool Do()
This method executes the command.
Definition: AddComponent.cpp:26
This class represents a general command for implementing modifications to the applications document...
Definition: CommandPattern.hpp:30
void Undo()
This method un-does the command.
Definition: AddComponent.cpp:39
Definition: AddComponent.hpp:21