Path Tracer
Public Member Functions | List of all members
Assimp::SmallVector< T, Capacity > Class Template Reference

Small vector with inplace storage. More...

#include <SmallVector.h>

Public Member Functions

 SmallVector ()
 The default class constructor.
 
 ~SmallVector ()
 The class destructor.
 
void push_back (const T &item)
 Will push a new item. The capacity will grow in case of a too small capacity. More...
 
void resize (size_t newSize)
 Will resize the vector. More...
 
size_t size () const
 Returns the current size of the vector. More...
 
T * begin ()
 Returns a pointer to the first item. More...
 
T * end ()
 Returns a pointer to the end. More...
 
T * begin () const
 Returns a const pointer to the first item. More...
 
T * end () const
 Returns a const pointer to the end. More...
 
 SmallVector (const SmallVector &)=delete
 
 SmallVector (SmallVector &&)=delete
 
SmallVectoroperator= (const SmallVector &)=delete
 
SmallVectoroperator= (SmallVector &&)=delete
 

Detailed Description

template<typename T, unsigned int Capacity>
class Assimp::SmallVector< T, Capacity >

Small vector with inplace storage.

Reduces heap allocations when list is shorter. It uses a small array for a dedicated size. When the growing gets bigger than this small cache a dynamic growing algorithm will be used.

Member Function Documentation

◆ begin() [1/2]

template<typename T , unsigned int Capacity>
T* Assimp::SmallVector< T, Capacity >::begin ( )
inline

Returns a pointer to the first item.

Returns
The first item as a pointer.

◆ begin() [2/2]

template<typename T , unsigned int Capacity>
T* Assimp::SmallVector< T, Capacity >::begin ( ) const
inline

Returns a const pointer to the first item.

Returns
The first item as a const pointer.

◆ end() [1/2]

template<typename T , unsigned int Capacity>
T* Assimp::SmallVector< T, Capacity >::end ( )
inline

Returns a pointer to the end.

Returns
The end as a pointer.

◆ end() [2/2]

template<typename T , unsigned int Capacity>
T* Assimp::SmallVector< T, Capacity >::end ( ) const
inline

Returns a const pointer to the end.

Returns
The end as a const pointer.

◆ push_back()

template<typename T , unsigned int Capacity>
void Assimp::SmallVector< T, Capacity >::push_back ( const T &  item)
inline

Will push a new item. The capacity will grow in case of a too small capacity.

Parameters
item[in] The item to push at the end of the vector.

◆ resize()

template<typename T , unsigned int Capacity>
void Assimp::SmallVector< T, Capacity >::resize ( size_t  newSize)
inline

Will resize the vector.

Parameters
newSize[in] The new size.

◆ size()

template<typename T , unsigned int Capacity>
size_t Assimp::SmallVector< T, Capacity >::size ( ) const
inline

Returns the current size of the vector.

Returns
The current size.

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