Cafu Engine
ChangePlantDescr.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_COMMAND_CHANGE_PLANT_DESCR_HPP_INCLUDED
8 #define CAFU_COMMAND_CHANGE_PLANT_DESCR_HPP_INCLUDED
9 
10 #include "../../CommandPattern.hpp"
11 
12 
13 class MapDocumentT;
14 class MapPlantT;
15 
16 
18 {
19  public:
20 
21  CommandChangePlantDescrT(MapDocumentT& MapDoc, MapPlantT* Plant, wxString NewPlantDescr);
22 
23  // CommandT implementation.
24  bool Do();
25  void Undo();
26  wxString GetName() const;
27 
28 
29  private:
30 
31  MapDocumentT& m_MapDoc;
32  MapPlantT* m_Plant;
33  const wxString m_NewPlantDescr;
34  const wxString m_OldPlantDescr;
35 };
36 
37 #endif
Definition: MapPlant.hpp:19
This class represents a CaWE "map" document.
Definition: MapDocument.hpp:45
void Undo()
This method un-does the command.
Definition: ChangePlantDescr.cpp:47
bool Do()
This method executes the command.
Definition: ChangePlantDescr.cpp:24
wxString GetName() const
Returns the name (a description) of the command.
Definition: ChangePlantDescr.cpp:69
Definition: ChangePlantDescr.hpp:17
This class represents a general command for implementing modifications to the applications document...
Definition: CommandPattern.hpp:30