The Vish Visualization Shell 0.3
Vish
Public Member Functions | List of all members
MemCore::ResizableChunk< T > Class Template Reference

A chunk that has no elements initially but can grow. More...

#include <elementary/memcore/Chunk.hpp>

Inheritance diagram for MemCore::ResizableChunk< T >:
MemCore::Chunk< T > MemCore::TypedChunk< T >

Public Member Functions

 ResizableChunk (size_t N=0)
 Constructor allocates a chunk of data.
 
- Public Member Functions inherited from MemCore::Chunk< T >
const base_vector_type & base_vector () const override
 Implement virtual base class function to yield constant vector of base elements. Internally uses ugly reinterpret_cast<> of STL vectors.
 
base_vector_type & base_vector () override
 Implement virtual base class function to yield vector of base elements. Internally uses ugly reinterpret_cast<> of STL vectors.
 
 Chunk (const Filler &, const T &FillValue, size_t N=1)
 Constructor allocates a chunk of data.
 
 Chunk (const std::string &buffer)
 Construct a chunk of data from a character set.
 
 Chunk (const std::vector< T > &SourceValues)
 Copy values.
 
 Chunk (size_t N, bool ReserveOnly=false)
 Constructor allocates a chunk of data.
 
T * operator() ()
 Use function call operator to get the actual data pointer Note that this function returns 0 if the data type is not addressible via a pointer, for instance a boolean.
 
- Public Member Functions inherited from MemCore::TypedChunk< T >
std::vector< T > & get_vector ()
 Get a STL vector of element types, it can be modified.
 
const std::vector< T > & get_vector () const
 Get a const STL vector of element types, only for read access.
 

Additional Inherited Members

- Protected Member Functions inherited from MemCore::Chunk< T >
 ~Chunk ()
 Destructor deletes the data pointer.
 

Detailed Description

template<class T>
class MemCore::ResizableChunk< T >

A chunk that has no elements initially but can grow.

Constructor & Destructor Documentation

◆ ResizableChunk()

template<class T >
MemCore::ResizableChunk< T >::ResizableChunk ( size_t  N = 0)
inline

Constructor allocates a chunk of data.

Parameters
NAllocate that many objects.
ReserveOnlyReserve that many objects to be appended later.