The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
undo_update_shroud_action.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include "undo_action.hpp"
4 #include "units/ptr.hpp"
5 #include "units/unit.hpp"
6 
7 namespace actions
8 {
9 namespace undo
10 {
11 
13  bool active;
14 
15  explicit auto_shroud_action(bool turned_on)
17  , active(turned_on)
18  {}
19  virtual const char* get_type() const { return "auto_shroud"; }
20  virtual ~auto_shroud_action() {}
21 
22  /// Writes this into the provided config.
23  virtual void write(config & cfg) const;
24 };
25 
27  // No additional data.
28 
31  {}
32  virtual const char* get_type() const { return "update_shroud"; }
33  virtual ~update_shroud_action() {}
34 
35  /// Writes this into the provided config.
36  virtual void write(config & cfg) const;
37 };
38 
39 }
40 }
virtual void write(config &cfg) const
Writes this into the provided config.
Records information to be able to undo an action.
Definition: undo_action.hpp:28
virtual void write(config &cfg) const
Writes this into the provided config.
virtual const char * get_type() const
A config object defines a single node in a WML file, with access to child nodes.
Definition: config.hpp:83