DNA Calib 1.1
Project brief
Public Types | Public Member Functions | Private Attributes | List of all members
terse::Blob< T, TAllocator > Class Template Reference

#include <Blob.h>

Collaboration diagram for terse::Blob< T, TAllocator >:
Collaboration graph

Public Types

using value_type = T
 
using allocator_type = TAllocator
 

Public Member Functions

 Blob ()=default
 
 Blob (const allocator_type &alloc)
 
 Blob (std::size_t size, const allocator_type &alloc)
 
allocator_type get_allocator () const noexcept
 
value_typedata ()
 
const value_typedata () const
 
std::size_t size () const
 
void setSize (std::size_t newSize)
 

Private Attributes

DynArray< value_type, allocator_typebytes
 

Member Typedef Documentation

◆ allocator_type

template<typename T , typename TAllocator >
using terse::Blob< T, TAllocator >::allocator_type = TAllocator

◆ value_type

template<typename T , typename TAllocator >
using terse::Blob< T, TAllocator >::value_type = T

Constructor & Destructor Documentation

◆ Blob() [1/3]

template<typename T , typename TAllocator >
terse::Blob< T, TAllocator >::Blob ( )
default

◆ Blob() [2/3]

template<typename T , typename TAllocator >
terse::Blob< T, TAllocator >::Blob ( const allocator_type alloc)
inlineexplicit
25 : bytes{alloc} {
26 }
DynArray< value_type, allocator_type > bytes
Definition: Blob.h:52

◆ Blob() [3/3]

template<typename T , typename TAllocator >
terse::Blob< T, TAllocator >::Blob ( std::size_t  size,
const allocator_type alloc 
)
inline
28 : bytes{size, alloc} {
29 }
std::size_t size() const
Definition: Blob.h:43

Member Function Documentation

◆ data() [1/2]

template<typename T , typename TAllocator >
value_type * terse::Blob< T, TAllocator >::data ( )
inline

◆ data() [2/2]

template<typename T , typename TAllocator >
const value_type * terse::Blob< T, TAllocator >::data ( ) const
inline

◆ get_allocator()

template<typename T , typename TAllocator >
allocator_type terse::Blob< T, TAllocator >::get_allocator ( ) const
inlinenoexcept

◆ setSize()

template<typename T , typename TAllocator >
void terse::Blob< T, TAllocator >::setSize ( std::size_t  newSize)
inline
47 {
49 }
void resize_uninitialized(std::size_t size)
Definition: DynArray.h:191

References terse::Blob< T, TAllocator >::bytes, and terse::DynArray< T, TAllocator >::resize_uninitialized().

◆ size()

template<typename T , typename TAllocator >
std::size_t terse::Blob< T, TAllocator >::size ( ) const
inline

Member Data Documentation

◆ bytes

template<typename T , typename TAllocator >
DynArray<value_type, allocator_type> terse::Blob< T, TAllocator >::bytes
private

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