Assimp v5.2.2 (January 2022)
The Asset-Importer-Lib API documentation.
Assimp::SmallVector< T, Capacity > Class Template Reference

Small vector with inplace storage. More...

#include <SmallVector.h>

Public Member Functions

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

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.

Constructor & Destructor Documentation

◆ SmallVector() [1/3]

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

The default class constructor.

◆ ~SmallVector()

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

The class destructor.

◆ SmallVector() [2/3]

template<typename T , unsigned int Capacity>
Assimp::SmallVector< T, Capacity >::SmallVector ( const SmallVector< T, Capacity > &  )
delete

◆ SmallVector() [3/3]

template<typename T , unsigned int Capacity>
Assimp::SmallVector< T, Capacity >::SmallVector ( SmallVector< T, Capacity > &&  )
delete

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.

◆ operator=() [1/2]

template<typename T , unsigned int Capacity>
SmallVector & Assimp::SmallVector< T, Capacity >::operator= ( const SmallVector< T, Capacity > &  )
delete

◆ operator=() [2/2]

template<typename T , unsigned int Capacity>
SmallVector & Assimp::SmallVector< T, Capacity >::operator= ( SmallVector< T, Capacity > &&  )
delete

◆ 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: