Doxygen Samurai Engine 0.0.1
Doxygen Samurai Engine Documentation
Loading...
Searching...
No Matches
samurai::StaticVector< T, N > Struct Template Reference

#include <staticVector.h>

Collaboration diagram for samurai::StaticVector< T, N >:
Collaboration graph

Public Types

typedef T * iterator
 
typedef const T * constIterator
 

Public Member Functions

iterator begin ()
 
constIterator begin () const
 
iterator end ()
 
constIterator end () const
 
 StaticVector ()
 
 StaticVector (std::initializer_list< T > &&l)
 
 StaticVector (StaticVector &&other)
 
 StaticVector (const StaticVector &other)
 
size_t size () const
 
bool empty () const
 
T * data ()
 
StaticVectoroperator= (const StaticVector &other)
 
StaticVectoroperator= (StaticVector &&other)
 
bool operator== (const StaticVector &other)
 
T & operator[] (size_t index)
 
operator[] (size_t index) const
 
T & back ()
 
const T & back () const
 
void clear ()
 
void push_back (const T &el)
 
void push_back (T &&el)
 
void pop_back ()
 

Public Attributes

size_t size_ = 0
 
beg_ [N]
 

Static Public Attributes

static constexpr unsigned int MAX_SIZE = N
 
static constexpr unsigned int capacity = N
 

Detailed Description

template<class T, size_t N>
struct samurai::StaticVector< T, N >

Definition at line 11 of file staticVector.h.

Member Typedef Documentation

◆ constIterator

template<class T , size_t N>
typedef const T* samurai::StaticVector< T, N >::constIterator

Definition at line 14 of file staticVector.h.

◆ iterator

template<class T , size_t N>
typedef T* samurai::StaticVector< T, N >::iterator

Definition at line 13 of file staticVector.h.

Constructor & Destructor Documentation

◆ StaticVector() [1/4]

template<class T , size_t N>
samurai::StaticVector< T, N >::StaticVector ( )
inline

Definition at line 24 of file staticVector.h.

◆ StaticVector() [2/4]

template<class T , size_t N>
samurai::StaticVector< T, N >::StaticVector ( std::initializer_list< T > && l)
inline

Definition at line 26 of file staticVector.h.

Here is the call graph for this function:

◆ StaticVector() [3/4]

template<class T , size_t N>
samurai::StaticVector< T, N >::StaticVector ( StaticVector< T, N > && other)
inline

Definition at line 34 of file staticVector.h.

◆ StaticVector() [4/4]

template<class T , size_t N>
samurai::StaticVector< T, N >::StaticVector ( const StaticVector< T, N > & other)
inline

Definition at line 45 of file staticVector.h.

Member Function Documentation

◆ back() [1/2]

template<class T , size_t N>
T & samurai::StaticVector< T, N >::back ( )
inline

Definition at line 130 of file staticVector.h.

◆ back() [2/2]

template<class T , size_t N>
const T & samurai::StaticVector< T, N >::back ( ) const
inline

Definition at line 135 of file staticVector.h.

◆ begin() [1/2]

template<class T , size_t N>
iterator samurai::StaticVector< T, N >::begin ( )
inline

Definition at line 16 of file staticVector.h.

◆ begin() [2/2]

template<class T , size_t N>
constIterator samurai::StaticVector< T, N >::begin ( ) const
inline

Definition at line 17 of file staticVector.h.

◆ clear()

template<class T , size_t N>
void samurai::StaticVector< T, N >::clear ( )
inline

Definition at line 140 of file staticVector.h.

◆ data()

template<class T , size_t N>
T * samurai::StaticVector< T, N >::data ( )
inline

Definition at line 62 of file staticVector.h.

Here is the caller graph for this function:

◆ empty()

template<class T , size_t N>
bool samurai::StaticVector< T, N >::empty ( ) const
inline

Definition at line 57 of file staticVector.h.

◆ end() [1/2]

template<class T , size_t N>
iterator samurai::StaticVector< T, N >::end ( )
inline

Definition at line 18 of file staticVector.h.

◆ end() [2/2]

template<class T , size_t N>
constIterator samurai::StaticVector< T, N >::end ( ) const
inline

Definition at line 19 of file staticVector.h.

◆ operator=() [1/2]

template<class T , size_t N>
StaticVector & samurai::StaticVector< T, N >::operator= ( const StaticVector< T, N > & other)
inline

Definition at line 67 of file staticVector.h.

◆ operator=() [2/2]

template<class T , size_t N>
StaticVector & samurai::StaticVector< T, N >::operator= ( StaticVector< T, N > && other)
inline

Definition at line 83 of file staticVector.h.

◆ operator==()

template<class T , size_t N>
bool samurai::StaticVector< T, N >::operator== ( const StaticVector< T, N > & other)
inline

Definition at line 101 of file staticVector.h.

◆ operator[]() [1/2]

template<class T , size_t N>
T & samurai::StaticVector< T, N >::operator[] ( size_t index)
inline

Definition at line 118 of file staticVector.h.

◆ operator[]() [2/2]

template<class T , size_t N>
T samurai::StaticVector< T, N >::operator[] ( size_t index) const
inline

Definition at line 124 of file staticVector.h.

◆ pop_back()

template<class T , size_t N>
void samurai::StaticVector< T, N >::pop_back ( )
inline

Definition at line 156 of file staticVector.h.

◆ push_back() [1/2]

template<class T , size_t N>
void samurai::StaticVector< T, N >::push_back ( const T & el)
inline

Definition at line 142 of file staticVector.h.

Here is the caller graph for this function:

◆ push_back() [2/2]

template<class T , size_t N>
void samurai::StaticVector< T, N >::push_back ( T && el)
inline

Definition at line 149 of file staticVector.h.

◆ size()

template<class T , size_t N>
size_t samurai::StaticVector< T, N >::size ( ) const
inline

Definition at line 55 of file staticVector.h.

Here is the caller graph for this function:

Member Data Documentation

◆ beg_

template<class T , size_t N>
T samurai::StaticVector< T, N >::beg_[N]

Definition at line 164 of file staticVector.h.

◆ capacity

template<class T , size_t N>
constexpr unsigned int samurai::StaticVector< T, N >::capacity = N
staticconstexpr

Definition at line 22 of file staticVector.h.

◆ MAX_SIZE

template<class T , size_t N>
constexpr unsigned int samurai::StaticVector< T, N >::MAX_SIZE = N
staticconstexpr

Definition at line 21 of file staticVector.h.

◆ size_

template<class T , size_t N>
size_t samurai::StaticVector< T, N >::size_ = 0

Definition at line 163 of file staticVector.h.


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