SDRAngel  4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
Public Member Functions | Public Attributes | Private Attributes | List of all members
IncrementalArray< T > Class Template Reference

#include <incrementalarray.h>

Public Member Functions

 IncrementalArray ()
 
 ~IncrementalArray ()
 
void allocate (uint32_t size)
 

Public Attributes

T * m_array
 

Private Attributes

uint32_t m_size
 

Detailed Description

template<typename T>
class IncrementalArray< T >

Definition at line 24 of file incrementalarray.h.

Constructor & Destructor Documentation

◆ IncrementalArray()

template<typename T >
IncrementalArray< T >::IncrementalArray ( )

Definition at line 39 of file incrementalarray.h.

39  :
40  m_array(0),
41  m_size(0)
42 {
43 }

◆ ~IncrementalArray()

template<typename T >
IncrementalArray< T >::~IncrementalArray ( )

Definition at line 46 of file incrementalarray.h.

47 {
48  if (m_array) { delete[] m_array; }
49 }

Member Function Documentation

◆ allocate()

template<typename T >
void IncrementalArray< T >::allocate ( uint32_t  size)

Definition at line 52 of file incrementalarray.h.

Referenced by GLSpectrum::applyChanges(), and GLScope::applyConfig().

53 {
54  if (size <= m_size) { return; }
55  if (m_array) { delete[] m_array; }
56  m_array = new T[size];
57  m_size = size;
58 }
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_array

template<typename T>
T* IncrementalArray< T >::m_array

◆ m_size

template<typename T>
uint32_t IncrementalArray< T >::m_size
private

Definition at line 35 of file incrementalarray.h.

Referenced by IncrementalArray< GLfloat >::allocate().


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