#include <id.hpp>
Public Member Functions | |
id_manager (size_t next_id) | |
unit_id | next_id () |
returns id for unit that is created More... | |
unit_id | next_fake_id () |
size_t | get_save_id () const |
Used for saving id to savegame. More... | |
void | set_save_id (size_t) |
void | clear () |
Clears id counter after game. More... | |
void | reset_fake () |
Private Member Functions | |
id_manager () | |
Private Attributes | |
size_t | next_id_ |
size_t | fake_id_ |
Static Private Attributes | |
static id_manager | manager_ |
void n_unit::id_manager::clear | ( | ) |
Clears id counter after game.
Definition at line 61 of file id.cpp.
References next_id_, and reset_fake().
Referenced by set_save_id().
size_t n_unit::id_manager::get_save_id | ( | ) | const |
Used for saving id to savegame.
Definition at line 44 of file id.cpp.
References next_id_.
Referenced by synced_context::get_unit_id_diff(), actions::undo_list::redo(), actions::undo_list::undo(), and game_board::write_config().
unit_id n_unit::id_manager::next_fake_id | ( | ) |
Definition at line 37 of file id.cpp.
References n_unit::unit_id::create_fake(), DBG_UT, fake_id_, and n_unit::unit_id::highest_bit.
Referenced by unit::clone(), and unit::set_underlying_id().
unit_id n_unit::id_manager::next_id | ( | ) |
returns id for unit that is created
Definition at line 30 of file id.cpp.
References n_unit::unit_id::create_real(), DBG_UT, n_unit::unit_id::highest_bit, and next_id_.
Referenced by unit::clone(), and unit::set_underlying_id().
void n_unit::id_manager::reset_fake | ( | ) |
Definition at line 56 of file id.cpp.
References fake_id_.
Referenced by clear(), and play_controller::finish_side_turn().
void n_unit::id_manager::set_save_id | ( | size_t | id | ) |
Definition at line 49 of file id.cpp.
References clear(), DBG_UT, and next_id_.
Referenced by actions::undo_list::redo(), and actions::undo_list::undo().
|
private |
Definition at line 49 of file id.hpp.
Referenced by next_fake_id(), and reset_fake().
|
staticprivate |
|
private |
Definition at line 48 of file id.hpp.
Referenced by clear(), get_save_id(), next_id(), and set_save_id().