Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes

n_unit::id_manager Class Reference

#include <unit_id.hpp>

Collaboration diagram for n_unit::id_manager:
Collaboration graph
[legend]

List of all members.

Public Member Functions

size_t next_id ()
 returns id for unit that is created
size_t next_fake_id ()
size_t get_save_id ()
 Used for saving id to savegame.
void set_save_id (size_t)
void clear ()
 Clears id counter after game.
void reset_fake ()

Static Public Member Functions

static id_managerinstance ()

Private Member Functions

 id_manager ()

Private Attributes

size_t next_id_
size_t fake_id_

Static Private Attributes

static id_manager manager_

Detailed Description

Definition at line 26 of file unit_id.hpp.


Constructor & Destructor Documentation

n_unit::id_manager::id_manager (  )  [private]

Definition at line 34 of file unit_id.cpp.


Member Function Documentation

void n_unit::id_manager::clear (  ) 

Clears id counter after game.

Definition at line 73 of file unit_id.cpp.

References next_id_, and reset_fake().

Referenced by set_save_id().

Here is the call graph for this function:

Here is the caller graph for this function:

size_t n_unit::id_manager::get_save_id (  ) 

Used for saving id to savegame.

Definition at line 56 of file unit_id.cpp.

References next_id_.

id_manager & n_unit::id_manager::instance (  )  [static]
size_t n_unit::id_manager::next_fake_id (  ) 

Definition at line 49 of file unit_id.cpp.

References DBG_UT, fake_id_, and next_id_.

size_t n_unit::id_manager::next_id (  ) 

returns id for unit that is created

Definition at line 42 of file unit_id.cpp.

References DBG_UT, fake_id_, and next_id_.

void n_unit::id_manager::reset_fake (  ) 

Definition at line 68 of file unit_id.cpp.

References fake_id_, and INITIAL_FAKE_ID.

Referenced by clear().

Here is the caller graph for this function:

void n_unit::id_manager::set_save_id ( size_t  id  ) 

Definition at line 61 of file unit_id.cpp.

References clear(), DBG_UT, and next_id_.

Here is the call graph for this function:


Member Data Documentation

size_t n_unit::id_manager::fake_id_ [private]

Definition at line 29 of file unit_id.hpp.

Referenced by next_fake_id(), next_id(), and reset_fake().

Definition at line 30 of file unit_id.hpp.

Referenced by instance().

size_t n_unit::id_manager::next_id_ [private]

Definition at line 28 of file unit_id.hpp.

Referenced by clear(), get_save_id(), next_fake_id(), next_id(), and set_save_id().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Thu May 24 2012 01:24:58 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs