entity
Entity/Component System for C++
entity::unique_entity Class Reference

Description

Definition at line 71 of file entity.hpp.

+ Inheritance diagram for entity::unique_entity:

Friends

class entity_pool
 
class shared_entity
 
void swap (unique_entity &, unique_entity &)
 

Public Member Functions

void clear ()
 
entity get () const
 
bool operator< (unique_entity const &rhs) const
 
bool operator== (unique_entity const &rhs) const
 
 unique_entity ()
 

Methods

friend class entity_pool
friend

Definition at line 100 of file entity.hpp.

friend class shared_entity
friend

Definition at line 101 of file entity.hpp.

void swap ( unique_entity a,
unique_entity b 
)
friend

Definition at line 125 of file entity.hpp.

126  {
127  std::swap(a.ref_, b.ref_);
128  }
void swap(shared_entity &a, shared_entity &b)
Definition: entity.hpp:181

Member Function Documentation

void entity::unique_entity::clear ( )

Definition at line 93 of file entity.hpp.

94  {
95  ref_ = nullptr;
96  }
entity entity::unique_entity::get ( ) const

Definition at line 78 of file entity.hpp.

References entity::make_entity().

Referenced by operator<(), and operator==().

79  {
80  return make_entity(*ref_);
81  }
entity make_entity(entity_index_t idx) BOOST_NOEXCEPT_OR_NOTHROW
Definition: entity.hpp:64
bool entity::unique_entity::operator< ( unique_entity const &  rhs) const

Definition at line 88 of file entity.hpp.

References get().

89  {
90  return get() < rhs.get();
91  }
bool entity::unique_entity::operator== ( unique_entity const &  rhs) const

Definition at line 83 of file entity.hpp.

References get().

84  {
85  return get() == rhs.get();
86  }

Constructor & Destructor Documentation

entity::unique_entity::unique_entity ( )

Definition at line 75 of file entity.hpp.

76  {}