#include <editor_undo.hpp>
Public Member Functions | |
map_undo_action () | |
const std::map < gamemap::location, t_translation::t_terrain > & | undo_terrains () const |
const std::map < gamemap::location, t_translation::t_terrain > & | redo_terrains () const |
const std::set< gamemap::location > | undo_selection () const |
const std::set< gamemap::location > | redo_selection () const |
std::string | new_map_data () const |
std::string | old_map_data () const |
const std::map < gamemap::location, int > & | undo_starting_locations () const |
const std::map < gamemap::location, int > & | redo_starting_locations () const |
void | add_terrain (const t_translation::t_terrain &old_tr, const t_translation::t_terrain &new_tr, const gamemap::location &lc) |
bool | terrain_set () const |
Return true if a terrain change has been saved in this undo action. | |
void | set_selection (const std::set< gamemap::location > &old_selection, const std::set< gamemap::location > &new_selection) |
bool | selection_set () const |
Return true if a selection change has been saved in this undo action. | |
void | set_map_data (const std::string &old_data, const std::string &new_data) |
bool | map_data_set () const |
Return true if a map data change has been saved in this undo action. | |
void | add_starting_location (const int old_side, const int new_side, const gamemap::location &old_loc, const gamemap::location &new_loc) |
bool | starting_location_set () const |
Return true if starting locations have been saved in this undo action. | |
bool | something_set () const |
Return true if something have been saved in this undo. | |
Private Attributes | |
std::map< gamemap::location, t_translation::t_terrain > | old_terrain_ |
std::map< gamemap::location, t_translation::t_terrain > | new_terrain_ |
bool | terrain_set_ |
std::set< gamemap::location > | old_selection_ |
std::set< gamemap::location > | new_selection_ |
bool | selection_set_ |
std::string | old_map_data_ |
std::string | new_map_data_ |
bool | map_data_set_ |
std::map< gamemap::location, int > | old_starting_locations_ |
std::map< gamemap::location, int > | new_starting_locations_ |
bool | starting_locations_set_ |
Definition at line 35 of file editor_undo.hpp.
map_editor::map_undo_action::map_undo_action | ( | ) |
Definition at line 29 of file editor_undo.cpp.
References map_data_set_, selection_set_, starting_locations_set_, and terrain_set_.
const std::map< gamemap::location, t_translation::t_terrain > & map_editor::map_undo_action::undo_terrains | ( | ) | const |
Definition at line 36 of file editor_undo.cpp.
References old_terrain_.
Referenced by map_editor::undo().
const std::map< gamemap::location, t_translation::t_terrain > & map_editor::map_undo_action::redo_terrains | ( | ) | const |
Definition at line 41 of file editor_undo.cpp.
References new_terrain_.
Referenced by map_editor::redo().
const std::set< gamemap::location > map_editor::map_undo_action::undo_selection | ( | ) | const |
Definition at line 46 of file editor_undo.cpp.
References old_selection_.
Referenced by map_editor::undo().
const std::set< gamemap::location > map_editor::map_undo_action::redo_selection | ( | ) | const |
Definition at line 50 of file editor_undo.cpp.
References new_selection_.
Referenced by map_editor::redo().
std::string map_editor::map_undo_action::new_map_data | ( | ) | const |
Definition at line 58 of file editor_undo.cpp.
References new_map_data_.
Referenced by map_editor::redo().
std::string map_editor::map_undo_action::old_map_data | ( | ) | const |
Definition at line 54 of file editor_undo.cpp.
References old_map_data_.
Referenced by map_editor::undo().
const std::map< gamemap::location, int > & map_editor::map_undo_action::undo_starting_locations | ( | ) | const |
Definition at line 62 of file editor_undo.cpp.
References old_starting_locations_.
Referenced by map_editor::undo().
const std::map< gamemap::location, int > & map_editor::map_undo_action::redo_starting_locations | ( | ) | const |
Definition at line 66 of file editor_undo.cpp.
References new_starting_locations_.
Referenced by map_editor::redo().
void map_editor::map_undo_action::add_terrain | ( | const t_translation::t_terrain & | old_tr, | |
const t_translation::t_terrain & | new_tr, | |||
const gamemap::location & | lc | |||
) |
Definition at line 70 of file editor_undo.cpp.
References new_terrain_, old_terrain_, and terrain_set_.
Referenced by map_editor::draw_terrain(), map_editor::paste_buffer(), map_editor::perform_fill_hexes(), and map_editor::perform_flood_fill().
bool map_editor::map_undo_action::terrain_set | ( | ) | const |
Return true if a terrain change has been saved in this undo action.
Definition at line 79 of file editor_undo.cpp.
References terrain_set_.
Referenced by map_editor::redo(), and map_editor::undo().
void map_editor::map_undo_action::set_selection | ( | const std::set< gamemap::location > & | old_selection, | |
const std::set< gamemap::location > & | new_selection | |||
) |
Definition at line 83 of file editor_undo.cpp.
References new_selection_, old_selection_, and selection_set_.
Referenced by map_editor::paste_buffer().
bool map_editor::map_undo_action::selection_set | ( | ) | const |
Return true if a selection change has been saved in this undo action.
Definition at line 90 of file editor_undo.cpp.
References selection_set_.
Referenced by map_editor::redo(), and map_editor::undo().
void map_editor::map_undo_action::set_map_data | ( | const std::string & | old_data, | |
const std::string & | new_data | |||
) |
Definition at line 94 of file editor_undo.cpp.
References map_data_set_, new_map_data_, and old_map_data_.
Referenced by map_editor::edit_flip(), map_editor::edit_resize(), and map_editor::edit_revert().
bool map_editor::map_undo_action::map_data_set | ( | ) | const |
Return true if a map data change has been saved in this undo action.
Definition at line 101 of file editor_undo.cpp.
References map_data_set_.
Referenced by map_editor::redo(), and map_editor::undo().
void map_editor::map_undo_action::add_starting_location | ( | const int | old_side, | |
const int | new_side, | |||
const gamemap::location & | old_loc, | |||
const gamemap::location & | new_loc | |||
) |
Definition at line 105 of file editor_undo.cpp.
References new_starting_locations_, old_starting_locations_, and starting_locations_set_.
Referenced by map_editor::paste_buffer(), and map_editor::set_starting_position().
bool map_editor::map_undo_action::starting_location_set | ( | ) | const |
Return true if starting locations have been saved in this undo action.
Definition at line 113 of file editor_undo.cpp.
References starting_locations_set_.
Referenced by map_editor::redo(), and map_editor::undo().
bool map_editor::map_undo_action::something_set | ( | ) | const |
Return true if something have been saved in this undo.
Definition at line 117 of file editor_undo.cpp.
References map_data_set_, selection_set_, starting_locations_set_, and terrain_set_.
Referenced by map_editor::save_undo_action().
bool map_editor::map_undo_action::terrain_set_ [private] |
Definition at line 87 of file editor_undo.hpp.
Referenced by add_terrain(), map_undo_action(), something_set(), and terrain_set().
std::set<gamemap::location> map_editor::map_undo_action::old_selection_ [private] |
std::set<gamemap::location> map_editor::map_undo_action::new_selection_ [private] |
bool map_editor::map_undo_action::selection_set_ [private] |
Definition at line 90 of file editor_undo.hpp.
Referenced by map_undo_action(), selection_set(), set_selection(), and something_set().
std::string map_editor::map_undo_action::old_map_data_ [private] |
std::string map_editor::map_undo_action::new_map_data_ [private] |
bool map_editor::map_undo_action::map_data_set_ [private] |
Definition at line 93 of file editor_undo.hpp.
Referenced by map_data_set(), map_undo_action(), set_map_data(), and something_set().
Definition at line 94 of file editor_undo.hpp.
Referenced by add_starting_location(), and undo_starting_locations().
Definition at line 95 of file editor_undo.hpp.
Referenced by add_starting_location(), and redo_starting_locations().
bool map_editor::map_undo_action::starting_locations_set_ [private] |
Definition at line 96 of file editor_undo.hpp.
Referenced by add_starting_location(), map_undo_action(), something_set(), and starting_location_set().
Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |