Main Page Class List Class Members

# Nv::Blast::FixedArray< T > Class Template Reference

`#include <NvBlastFixedArray.h>`

List of all members.

## Public Member Functions
NV_FORCE_INLINE const T & | at (uint32_t idx) const
NV_FORCE_INLINE T & | at (uint32_t idx)
void | clear ()
| FixedArray ()
NV_FORCE_INLINE void | forceSize_Unsafe (uint32_t s)
NV_FORCE_INLINE const T & | operator[] (uint32_t idx) const
NV_FORCE_INLINE T & | operator[] (uint32_t idx)
T | popBack ()
NV_FORCE_INLINE T & | pushBack (T &t)
NV_FORCE_INLINE uint32_t | size () const
## Static Public Member Functions
static size_t | requiredMemorySize (uint32_t capacity)

## Detailed Description

### template<class T>
class Nv::Blast::FixedArray< T >

FixedArray is a sequential container which is intended to be used with placement new on chunk of memory. It'll use following memory for data layout. As follows:

some memory char ​*buf = new char[64 *​ 1024];

placement new on this memory FixedArray<SomeClass>* arr = new (buf) FixedArray<SomeClass>();

you can get max requiredMemorySize by an array of 'capacity' elements count to use memory left buf = buf + FixedArray<SomeClass>::requiredMemorySize(capacity);

buf:

+------------------------------------------------------------+ | uint32_t | T[0] | T[1] | T[2] | ... | +------------------------------------------------------------+

!!!TODO:

- check ctor/dtor of elements calls

## Constructor & Destructor Documentation

template<class T>

Nv::Blast::FixedArray< T >::FixedArray | ( |  | ) | `[inline, explicit]`

## Member Function Documentation

template<class T>

NV_FORCE_INLINE const T& Nv::Blast::FixedArray< T >::at | ( | uint32_t | idx | ) | const`[inline]`

template<class T>

NV_FORCE_INLINE T& Nv::Blast::FixedArray< T >::at | ( | uint32_t | idx | ) | `[inline]`

template<class T>

void Nv::Blast::FixedArray< T >::clear | ( |  | ) | `[inline]`

template<class T>

NV_FORCE_INLINE void Nv::Blast::FixedArray< T >::forceSize_Unsafe | ( | uint32_t | s | ) | `[inline]`

template<class T>

NV_FORCE_INLINE const T& Nv::Blast::FixedArray< T >::operator[] | ( | uint32_t | idx | ) | const`[inline]`

template<class T>

NV_FORCE_INLINE T& Nv::Blast::FixedArray< T >::operator[] | ( | uint32_t | idx | ) | `[inline]`

template<class T>

T Nv::Blast::FixedArray< T >::popBack | ( |  | ) | `[inline]`

template<class T>

NV_FORCE_INLINE T& Nv::Blast::FixedArray< T >::pushBack | ( | T & | t | ) | `[inline]`

template<class T>

static size_t Nv::Blast::FixedArray< T >::requiredMemorySize | ( | uint32_t | capacity | ) | `[inline, static]`

template<class T>

NV_FORCE_INLINE uint32_t Nv::Blast::FixedArray< T >::size | ( |  | ) | const`[inline]`

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

- sdk/common/NvBlastFixedArray.h