entity
Entity/Component System for C++
entity::component::sparse_pool< T >::window Struct Reference

Description

template<typename T>
struct entity::component::sparse_pool< T >::window

Definition at line 108 of file sparse_pool.hpp.

Friends

class sparse_pool
 

Public Types

typedef type value_type
 

Public Member Functions

bool advance (entity target)
 
value_typeget () const
 
bool increment (entity target)
 
bool is_end () const
 
bool is_entity (entity e) const
 
 window ()
 

Methods

template<typename T >
friend class sparse_pool
friend

Definition at line 145 of file sparse_pool.hpp.

Member Function Documentation

template<typename T >
bool entity::component::sparse_pool< T >::window::advance ( entity  target)

Definition at line 128 of file sparse_pool.hpp.

References entity::component::sparse_pool< T >::window::increment().

129  {
130  return increment(target);
131  }
template<typename T >
value_type& entity::component::sparse_pool< T >::window::get ( ) const

Definition at line 133 of file sparse_pool.hpp.

134  {
135  return iterator_->second;
136  }
template<typename T >
bool entity::component::sparse_pool< T >::window::increment ( entity  target)

Definition at line 120 of file sparse_pool.hpp.

Referenced by entity::component::sparse_pool< T >::window::advance().

121  {
122  while(iterator_ != end_ && iterator_->first < target)
123  ++iterator_;
124 
125  return iterator_ != end_ && iterator_->first == target;
126  }
template<typename T >
bool entity::component::sparse_pool< T >::window::is_end ( ) const

Definition at line 138 of file sparse_pool.hpp.

139  {
140  return iterator_ == end_;
141  }
template<typename T >
bool entity::component::sparse_pool< T >::window::is_entity ( entity  e) const

Definition at line 115 of file sparse_pool.hpp.

116  {
117  return iterator_ != end_ && e == iterator_->first;
118  }

Member Typedef Documentation

template<typename T >
typedef type entity::component::sparse_pool< T >::window::value_type

Definition at line 110 of file sparse_pool.hpp.

Constructor & Destructor Documentation

template<typename T >
entity::component::sparse_pool< T >::window::window ( )

Definition at line 112 of file sparse_pool.hpp.

113  {}