Cafu Engine
ChangePlantSeed.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_SEED_HPP_INCLUDED
8 #define CAFU_COMMAND_CHANGE_PLANT_SEED_HPP_INCLUDED
9 
10 #include "../../CommandPattern.hpp"
11 
12 
13 class MapDocumentT;
14 class MapPlantT;
15 
16 
18 {
19  public:
20 
21  CommandChangePlantSeedT(MapDocumentT& MapDoc, MapPlantT* Plant, unsigned int NewRandomSeed);
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 unsigned int m_NewRandomSeed;
34  const unsigned int m_OldRandomSeed;
35 };
36 
37 #endif
Definition: MapPlant.hpp:19
This class represents a CaWE "map" document.
Definition: MapDocument.hpp:45
wxString GetName() const
Returns the name (a description) of the command.
Definition: ChangePlantSeed.cpp:69
bool Do()
This method executes the command.
Definition: ChangePlantSeed.cpp:24
void Undo()
This method un-does the command.
Definition: ChangePlantSeed.cpp:47
Definition: ChangePlantSeed.hpp:17
This class represents a general command for implementing modifications to the applications document...
Definition: CommandPattern.hpp:30