ResourceVector< T > Class Template Reference

A vector that can be used as a resource. More...

Inheritance diagram for ResourceVector< T >:

Public Member Functions

 ResourceVector (unsigned int size)
 Constructor. More...
 
 ~ResourceVector ()
 Destructor. More...
 
const T & operator[] (unsigned int i) const
 Returns the i-th element (const version) More...
 
T & operator[] (unsigned int i)
 Returns the i-th element. More...
 
unsigned int size () const
 Returns the size of the vector. More...
 

Protected Attributes

const unsigned int m_size
 The number of elements. More...
 
T *const m_vector
 The vector containing the elements. More...
 

Detailed Description

template<class T>
class farsa::ResourceVector< T >

A vector that can be used as a resource.

The number of elements must be set in the constructor and cannot be changed.

Definition at line 35 of file helperresources.h.

Constructor & Destructor Documentation

ResourceVector ( unsigned int  size)
inline

Constructor.

Note that the elem

Parameters
sizeThe number of elements in the vector

Definition at line 44 of file helperresources.h.

~ResourceVector ( )
inline

Destructor.

Definition at line 54 of file helperresources.h.

Member Function Documentation

const T& operator[] ( unsigned int  i) const
inline

Returns the i-th element (const version)

Parameters
ithe index of the element to return
Returns
the value of the element

Definition at line 73 of file helperresources.h.

T& operator[] ( unsigned int  i)
inline

Returns the i-th element.

Parameters
ithe index of the element to return
Returns
the value of the element

Definition at line 84 of file helperresources.h.

unsigned int size ( ) const
inline

Returns the size of the vector.

Definition at line 62 of file helperresources.h.

Member Data Documentation

const unsigned int m_size
protected

The number of elements.

Definition at line 93 of file helperresources.h.

T* const m_vector
protected

The vector containing the elements.

Definition at line 98 of file helperresources.h.


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