# Frost::s_array< T, 0 > Class Template Reference

Dynamic array. More...

`#include <frost_utils_ctnr.h>`

Inheritance diagram for Frost::s_array< T, 0 >:

List of all members.

## Public Types

typedef T | ValueType
typedef s_ctnr_t< T, std::vector< T > > | ParentContainerType

## Public Member Functions

| s_array ()
| s_array (const ValueType &mElem)
template<default_uint N>
| s_array (const s_array< ValueType, N > &lElemArray)
| s_array (const ParentContainerType &mCtnr)
| s_array (const s_ctnr_t< T, std::deque< T > > &mCtnr)
ValueType * | GetClassicArray ()
| Returns the underlying C array.
void | Reserve (const s_uint_t< default_uint > &uiSize)
| Reserves some space in memory.

## Detailed Description

### template<class T>
class Frost::s_array< T, 0 >

Dynamic array.

Implemented with std::vector : supports fast operations at the end of the container.
It's main advantage over s_ctnr is that you can get a pointer to the data it contains, if you need to feed it to an external library without bothering with dynamic allocations and classic C arrays.
Use the Reserve() function to allocate the needed space : it will greatly improve performances.

Definition at line 564 of file frost_utils_ctnr.h.

## Member Typedef Documentation

template<class T >

typedef s_ctnr_t< T, std::vector<T> > Frost::s_array< T, 0 >::ParentContainerType

Definition at line 569 of file frost_utils_ctnr.h.

template<class T >

typedef T Frost::s_array< T, 0 >::ValueType

Reimplemented from Frost::s_ctnr_t< T, std::vector< T > >.

Definition at line 568 of file frost_utils_ctnr.h.

## Constructor & Destructor Documentation

template<class T >

Frost::s_array< T, 0 >::s_array | ( |  | ) | `[inline]`

Definition at line 572 of file frost_utils_ctnr.h.

template<class T >

Frost::s_array< T, 0 >::s_array | ( | const ValueType & | mElem | ) | `[inline]`

Definition at line 574 of file frost_utils_ctnr.h.

template<class T >
template<default_uint N>

Frost::s_array< T, 0 >::s_array | ( | const s_array< ValueType, N > & | lElemArray | ) | `[inline]`

Definition at line 581 of file frost_utils_ctnr.h.

template<class T >

Frost::s_array< T, 0 >::s_array | ( | const ParentContainerType & | mCtnr | ) | `[inline]`

Definition at line 583 of file frost_utils_ctnr.h.

template<class T >

Frost::s_array< T, 0 >::s_array | ( | const s_ctnr_t< T, std::deque< T > > & | mCtnr | ) | `[inline]`

Definition at line 585 of file frost_utils_ctnr.h.

## Member Function Documentation

template<class T >

ValueType* Frost::s_array< T, 0 >::GetClassicArray | ( |  | ) | `[inline]`

Returns the underlying C array.

Returns:
  The underlying C array

Definition at line 590 of file frost_utils_ctnr.h.

template<class T >

void Frost::s_array< T, 0 >::Reserve | ( | const s_uint_t< default_uint > & | uiSize | ) | `[inline]`

Reserves some space in memory.

Parameters:

  | uiSize | The requested space

Note:
  Can be used to reduce the number of allocations and improve performances.

Definition at line 600 of file frost_utils_ctnr.h.

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

- D:/Programmation/Sources/Tensor2/Utils/include/frost_utils_ctnr.h