Utopia  2
Framework for studying models of complex & adaptive systems.
Static Public Member Functions | Private Attributes | List of all members
Utopia::DataIO::HDFBufferFactory Class Reference

Class which turns non-vector or plain-array containers into vectors. If the value_types are containers themselves, these are turned into vectors as well, because HDF5 cannot write something else. More...

#include <hdfbufferfactory.hh>

Static Public Member Functions

template<typename T >
static auto convert_source (T &source)
 function for converting source data into variable length type More...
 
template<typename Iter , typename Adaptor >
static auto buffer (Iter begin, Iter end, Adaptor &&adaptor)
 static function for turning an iterator range with arbitrarty datatypes into a vector of data as returned from 'adaptor'. Version for non-container return types of 'adaptor' More...
 

Private Attributes

std::shared_ptr< spdlog::logger > _log
 For logging all kinds of stuff. More...
 

Detailed Description

Class which turns non-vector or plain-array containers into vectors. If the value_types are containers themselves, these are turned into vectors as well, because HDF5 cannot write something else.

Member Function Documentation

◆ buffer()

template<typename Iter , typename Adaptor >
static auto Utopia::DataIO::HDFBufferFactory::buffer ( Iter  begin,
Iter  end,
Adaptor &&  adaptor 
)
inlinestatic

static function for turning an iterator range with arbitrarty datatypes into a vector of data as returned from 'adaptor'. Version for non-container return types of 'adaptor'

Parameters
beginstart of raw data range
endend of raw data range
adaptoradaptor function-pointer/functor/lamdba...
Template Parameters
IterIterator
Adaptorfunction<some_type(typename Iterator::value_type)>
Returns
auto The data range buffered from the adaptor

◆ convert_source()

template<typename T >
static auto Utopia::DataIO::HDFBufferFactory::convert_source ( T &  source)
inlinestatic

function for converting source data into variable length type

Parameters
sourceThe source
Template Parameters
Tthe source type
Returns
auto

Member Data Documentation

◆ _log

std::shared_ptr< spdlog::logger > Utopia::DataIO::HDFBufferFactory::_log
private

For logging all kinds of stuff.


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