Ophidian
 All Classes Namespaces Functions
Public Member Functions | List of all members
ophidian::entity_system::vector_property< T > Class Template Reference

Implementation of the vector property class. More...

#include <vector_property.h>

Inheritance diagram for ophidian::entity_system::vector_property< T >:
ophidian::entity_system::property

Public Member Functions

 vector_property ()
 Constructor. More...
 
T & operator[] (entity_index e)
 Property getter. More...
 
const T & operator[] (entity_index e) const
 Constant property getter. More...
 
T & at (entity_index e)
 Property getter with range check. More...
 
const T & at (entity_index e) const
 Constant property getter with range check. More...
 
std::vector< T >::const_iterator begin () const
 Begin iterator. More...
 
std::vector< T >::const_iterator end () const
 End iterator. More...
 
T * data ()
 
const T * data () const
 
- Public Member Functions inherited from ophidian::entity_system::property
virtual ~property ()
 Virtual destructor.
 

Detailed Description

template<class T>
class ophidian::entity_system::vector_property< T >

Describes an implementation of the property class that stores the properties in a vector, acessed by the entity index.

Template Parameters
TType of the property value to be stored.

Constructor & Destructor Documentation

template<class T>
ophidian::entity_system::vector_property< T >::vector_property ( )
inline

Default constructor. Creates an empty vector property.

Member Function Documentation

template<class T>
T& ophidian::entity_system::vector_property< T >::at ( entity_index  e)
inline

Returns the property value for an entity after checking the range.

Parameters
entity_indexThe index of the entity to get the property.
Returns
A reference to the property of that entity.
template<class T>
const T& ophidian::entity_system::vector_property< T >::at ( entity_index  e) const
inline

Returns the property value for an entity after checking the range. Necessary when there is only a constant reference to the properties.

Parameters
entity_indexThe index of the entity to get the property.
Returns
A constant reference to the property of that entity.
template<class T>
std::vector<T>::const_iterator ophidian::entity_system::vector_property< T >::begin ( ) const
inline

Returns an iterator pointing to the beginning of the vector of properties.

Returns
Iterator pointing to the beginning of the vector of properties.
template<class T>
std::vector<T>::const_iterator ophidian::entity_system::vector_property< T >::end ( ) const
inline

Returns an iterator pointing to the end of the vector of properties.

Returns
Iterator pointing to the end of the vector of properties.
template<class T>
T& ophidian::entity_system::vector_property< T >::operator[] ( entity_index  e)
inline

Returns the property value for an entity.

Parameters
entity_indexThe index of the entity to get the property.
Returns
A reference to the property of that entity.
template<class T>
const T& ophidian::entity_system::vector_property< T >::operator[] ( entity_index  e) const
inline

Returns the property value for an entity. Necessary when there is only a constant reference to the properties.

Parameters
entity_indexThe index of the entity to get the property.
Returns
A constant reference to the property of that entity.

The documentation for this class was generated from the following file: