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

Description

Definition at line 188 of file entity.hpp.

+ Inheritance diagram for entity::weak_entity:

Friends

class shared_entity
 

Public Member Functions

shared_entity lock () const
 
bool operator< (weak_entity const &rhs) const
 
bool operator== (weak_entity const &rhs) const
 
 weak_entity (shared_entity const &ref)
 

Methods

friend class shared_entity
friend

Definition at line 213 of file entity.hpp.

Member Function Documentation

shared_entity entity::weak_entity::lock ( ) const

Definition at line 196 of file entity.hpp.

197  {
198  return ref_.lock();
199  }
bool entity::weak_entity::operator< ( weak_entity const &  rhs) const

Definition at line 206 of file entity.hpp.

207  {
208  return ref_.lock() < rhs.ref_.lock();
209  }
bool entity::weak_entity::operator== ( weak_entity const &  rhs) const

Definition at line 201 of file entity.hpp.

202  {
203  return ref_.lock() == rhs.ref_.lock();
204  }

Constructor & Destructor Documentation

entity::weak_entity::weak_entity ( shared_entity const &  ref)

Definition at line 192 of file entity.hpp.

193  : ref_(ref.ref_)
194  {}