OGRE-Next  2.3
Object-Oriented Graphics Rendering Engine
Ogre::StackVector< T, Capacity > Class Template Reference

Compact implementation similar to std::array. More...

#include <OgreStackVector.h>

Public Types

typedef const T * const_iterator
 
typedef T * iterator
 
typedef T value_type
 

Public Member Functions

 StackVector ()
 
template<size_t C>
 StackVector (const StackVector< T, C > &copy)
 
 StackVector (size_t count, const T &value)
 Creates an array pushing the value N times. More...
 
 ~StackVector ()
 
void appendPOD (const_iterator otherBegin, const_iterator otherEnd)
 
T & back ()
 
const T & back () const
 
iterator begin ()
 
const_iterator begin () const
 
size_t capacity () const
 
void clear ()
 
T * data ()
 
const T * data () const
 
void destroy ()
 
bool empty () const
 
iterator end ()
 
const_iterator end () const
 
iterator erase (iterator first, iterator last)
 
iterator erase (iterator toErase)
 
iterator erasePOD (iterator first, iterator last)
 
T & front ()
 
const T & front () const
 
iterator insert (iterator where, const T &val)
 
iterator insertPOD (iterator where, const_iterator otherBegin, const_iterator otherEnd)
 otherBegin & otherEnd must not overlap with this->begin() and this->end() More...
 
template<size_t C>
void operator= (const StackVector< T, C > &copy)
 
T & operator[] (size_t idx)
 
const T & operator[] (size_t idx) const
 
void pop_back ()
 
void push_back (const T &val)
 
void resize (size_t newSize, const T &value=T())
 
void resizePOD (size_t newSize, const T &value=T())
 
size_t size () const
 

Detailed Description

template<typename T, size_t Capacity>
class Ogre::StackVector< T, Capacity >

Compact implementation similar to std::array.

Remarks
This container is a simple one, for simple cases

It will assert on buffer overflows, but it asserts are disabled, it will let them happen.

Author
Matias N. Goldberg
Version
1.0

Member Typedef Documentation

◆ const_iterator

template<typename T , size_t Capacity>
typedef const T* Ogre::StackVector< T, Capacity >::const_iterator

◆ iterator

template<typename T , size_t Capacity>
typedef T* Ogre::StackVector< T, Capacity >::iterator

◆ value_type

template<typename T , size_t Capacity>
typedef T Ogre::StackVector< T, Capacity >::value_type

Constructor & Destructor Documentation

◆ StackVector() [1/3]

template<typename T , size_t Capacity>
Ogre::StackVector< T, Capacity >::StackVector ( )
inline

◆ StackVector() [2/3]

template<typename T , size_t Capacity>
template<size_t C>
Ogre::StackVector< T, Capacity >::StackVector ( const StackVector< T, C > &  copy)
inline

References OGRE_ASSERT_LOW.

◆ StackVector() [3/3]

template<typename T , size_t Capacity>
Ogre::StackVector< T, Capacity >::StackVector ( size_t  count,
const T &  value 
)
inline

Creates an array pushing the value N times.

◆ ~StackVector()

template<typename T , size_t Capacity>
Ogre::StackVector< T, Capacity >::~StackVector ( )
inline

Member Function Documentation

◆ appendPOD()

template<typename T , size_t Capacity>
void Ogre::StackVector< T, Capacity >::appendPOD ( const_iterator  otherBegin,
const_iterator  otherEnd 
)
inline

References OGRE_ASSERT_LOW.

◆ back() [1/2]

template<typename T , size_t Capacity>
T& Ogre::StackVector< T, Capacity >::back ( )
inline

◆ back() [2/2]

template<typename T , size_t Capacity>
const T& Ogre::StackVector< T, Capacity >::back ( ) const
inline

◆ begin() [1/2]

template<typename T , size_t Capacity>
iterator Ogre::StackVector< T, Capacity >::begin ( )
inline

◆ begin() [2/2]

template<typename T , size_t Capacity>
const_iterator Ogre::StackVector< T, Capacity >::begin ( ) const
inline

◆ capacity()

template<typename T , size_t Capacity>
size_t Ogre::StackVector< T, Capacity >::capacity ( ) const
inline

◆ clear()

template<typename T , size_t Capacity>
void Ogre::StackVector< T, Capacity >::clear ( )
inline

◆ data() [1/2]

template<typename T , size_t Capacity>
T* Ogre::StackVector< T, Capacity >::data ( )
inline

◆ data() [2/2]

template<typename T , size_t Capacity>
const T* Ogre::StackVector< T, Capacity >::data ( ) const
inline

◆ destroy()

template<typename T , size_t Capacity>
void Ogre::StackVector< T, Capacity >::destroy ( )
inline

◆ empty()

template<typename T , size_t Capacity>
bool Ogre::StackVector< T, Capacity >::empty ( ) const
inline

◆ end() [1/2]

template<typename T , size_t Capacity>
iterator Ogre::StackVector< T, Capacity >::end ( )
inline

◆ end() [2/2]

template<typename T , size_t Capacity>
const_iterator Ogre::StackVector< T, Capacity >::end ( ) const
inline

◆ erase() [1/2]

template<typename T , size_t Capacity>
iterator Ogre::StackVector< T, Capacity >::erase ( iterator  first,
iterator  last 
)
inline

◆ erase() [2/2]

template<typename T , size_t Capacity>
iterator Ogre::StackVector< T, Capacity >::erase ( iterator  toErase)
inline

◆ erasePOD()

template<typename T , size_t Capacity>
iterator Ogre::StackVector< T, Capacity >::erasePOD ( iterator  first,
iterator  last 
)
inline

◆ front() [1/2]

template<typename T , size_t Capacity>
T& Ogre::StackVector< T, Capacity >::front ( )
inline

◆ front() [2/2]

template<typename T , size_t Capacity>
const T& Ogre::StackVector< T, Capacity >::front ( ) const
inline

◆ insert()

template<typename T , size_t Capacity>
iterator Ogre::StackVector< T, Capacity >::insert ( iterator  where,
const T &  val 
)
inline

References OGRE_ASSERT_LOW.

◆ insertPOD()

template<typename T , size_t Capacity>
iterator Ogre::StackVector< T, Capacity >::insertPOD ( iterator  where,
const_iterator  otherBegin,
const_iterator  otherEnd 
)
inline

otherBegin & otherEnd must not overlap with this->begin() and this->end()

References OGRE_ASSERT_LOW.

◆ operator=()

template<typename T , size_t Capacity>
template<size_t C>
void Ogre::StackVector< T, Capacity >::operator= ( const StackVector< T, C > &  copy)
inline

◆ operator[]() [1/2]

template<typename T , size_t Capacity>
T& Ogre::StackVector< T, Capacity >::operator[] ( size_t  idx)
inline

◆ operator[]() [2/2]

template<typename T , size_t Capacity>
const T& Ogre::StackVector< T, Capacity >::operator[] ( size_t  idx) const
inline

◆ pop_back()

template<typename T , size_t Capacity>
void Ogre::StackVector< T, Capacity >::pop_back ( )
inline

References OGRE_ASSERT_LOW.

◆ push_back()

template<typename T , size_t Capacity>
void Ogre::StackVector< T, Capacity >::push_back ( const T &  val)
inline

References OGRE_ASSERT_LOW.

◆ resize()

template<typename T , size_t Capacity>
void Ogre::StackVector< T, Capacity >::resize ( size_t  newSize,
const T &  value = T() 
)
inline

References OGRE_ASSERT_LOW.

◆ resizePOD()

template<typename T , size_t Capacity>
void Ogre::StackVector< T, Capacity >::resizePOD ( size_t  newSize,
const T &  value = T() 
)
inline

References OGRE_ASSERT_LOW.

◆ size()

template<typename T , size_t Capacity>
size_t Ogre::StackVector< T, Capacity >::size ( ) const
inline

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