Cafu Engine
ChangeEntityHierarchy.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_CHANGE_ENTITY_HIERARCHY_HPP_INCLUDED
8 #define CAFU_MAPEDITOR_COMMAND_CHANGE_ENTITY_HIERARCHY_HPP_INCLUDED
9 
10 #include "../../CommandPattern.hpp"
11 
12 #include "Math3D/Quaternion.hpp"
13 #include "Templates/Pointer.hpp"
14 
15 
16 class MapDocumentT;
17 namespace cf { namespace GameSys { class EntityT; } }
18 
19 
20 namespace MapEditor
21 {
23  {
24  public:
25 
27 
28  // CommandT implementation.
29  bool Do();
30  void Undo();
31  wxString GetName() const;
32 
33 
34  private:
35 
36  MapDocumentT* m_MapDoc;
38  const Vector3fT m_OriginWS;
39  const cf::math::QuaternionfT m_QuatWS;
41  unsigned long m_NewPosition;
43  const unsigned long m_OldPosition;
44  const std::string m_OldName;
45  };
46 }
47 
48 #endif
bool Do()
This method executes the command.
Definition: ChangeEntityHierarchy.cpp:32
This class represents a CaWE "map" document.
Definition: MapDocument.hpp:45
Definition: ChangeEntityHierarchy.hpp:22
void Undo()
This method un-does the command.
Definition: ChangeEntityHierarchy.cpp:66
This class represents a general command for implementing modifications to the applications document...
Definition: CommandPattern.hpp:30
wxString GetName() const
Returns the name (a description) of the command.
Definition: ChangeEntityHierarchy.cpp:90