16 #ifndef UNIT_ID_HPP_INCLUDED
17 #define UNIT_ID_HPP_INCLUDED
21 #include <boost/noncopyable.hpp>
29 static const size_t highest_bit =
static_cast<size_t>(1) << (
sizeof(
size_t) * 8 - 1);
32 bool is_fake()
const {
return (value & highest_bit) != 0; }
static unit_id create_real(size_t val)
friend bool operator<(unit_id a, unit_id b)
friend bool operator>(unit_id a, unit_id b)
size_t get_save_id() const
Used for saving id to savegame.
unit_id next_id()
returns id for unit that is created
GLuint const GLfloat * val
id_manager(size_t next_id)
GLdouble GLdouble GLdouble b
friend bool operator<=(unit_id a, unit_id b)
void clear()
Clears id counter after game.
GLsizei const GLfloat * value
GLboolean GLboolean GLboolean GLboolean a
friend bool operator==(unit_id a, unit_id b)
friend bool operator>=(unit_id a, unit_id b)
static id_manager manager_
static unit_id create_fake(size_t val)
static const size_t highest_bit