Utopia  2
Framework for studying models of complex & adaptive systems.
Public Types | Public Member Functions | Public Attributes | List of all members
Utopia::DataIO::WriteTask< BGB, DW, DB, AWG, AWD > Struct Template Referencefinal

Encapsulate a task for writing data to a destination. Containes a callable 'writer' responisible for writing data to a held dataset. Contains a callabel 'build_dataset' which builds or opens a dataset for writing to in a held HDFGroup. A WriteTask is bound to a group for its entire lifetime. More...

#include <write_task.hh>

Public Types

using BasegroupBuilder = BGB
 
using Writer = DW
 
using Builder = DB
 
using AttributeWriterGroup = AWG
 
using AttributeWriterDataset = AWD
 

Public Member Functions

std::string get_active_path ()
 Get the path of active dataset relative to the base_group. More...
 
std::string get_base_path ()
 Get the path to the base group object. More...
 
void swap (WriteTask &other)
 Swap the state of the caller with 'other'. More...
 
template<typename Basegroupbuilder , typename Writertype , typename Buildertype , typename AWritertypeG , typename AWritertypeD >
 WriteTask (Basegroupbuilder &&bgb, Writertype &&w, Buildertype &&b, AWritertypeG &&ag, AWritertypeD &&ad)
 Construct a new Write Task object. More...
 
 WriteTask ()=default
 Construct a new writer Task object. More...
 
 WriteTask (const WriteTask &other)=default
 
 WriteTask (WriteTask &&other)=default
 Construct a new writer Task object. More...
 
WriteTaskoperator= (const WriteTask &other)=default
 Copy assign caller from 'other'. More...
 
WriteTaskoperator= (WriteTask &&other)=default
 Move assign from 'other'. More...
 
 ~WriteTask ()=default
 Destroy the writer Task object. More...
 

Public Attributes

BasegroupBuilder build_basegroup
 Function building a base group. More...
 
std::shared_ptr< HDFGroupbase_group
 pointer to the hdfgroup in which all produced datasets live. More...
 
std::shared_ptr< HDFDatasetactive_dataset
 pointer to the dataset which is currently active More...
 
Writer write_data
 Callable to write data. More...
 
Builder build_dataset
 Callable to build new dataset. More...
 
AttributeWriterDataset write_attribute_active_dataset
 Callable to write attributes to dataset; invoked after task write. More...
 
AttributeWriterGroup write_attribute_basegroup
 Callabel to write attributes to base group, invoked after task build. More...
 

Detailed Description

template<class BGB, class DW, class DB, class AWG, class AWD>
struct Utopia::DataIO::WriteTask< BGB, DW, DB, AWG, AWD >

Encapsulate a task for writing data to a destination. Containes a callable 'writer' responisible for writing data to a held dataset. Contains a callabel 'build_dataset' which builds or opens a dataset for writing to in a held HDFGroup. A WriteTask is bound to a group for its entire lifetime.

Template Parameters
BGBBasegroup builder type, automatically determined
DWData writer type, automatically determined
DBDataset builder type, automatically deterimned
AWGGroup attribute writer type, automatically determined
AWDDataset attribute writer type, automatically determined

Member Typedef Documentation

◆ AttributeWriterDataset

template<class BGB , class DW , class DB , class AWG , class AWD >
using Utopia::DataIO::WriteTask< BGB, DW, DB, AWG, AWD >::AttributeWriterDataset = AWD

◆ AttributeWriterGroup

template<class BGB , class DW , class DB , class AWG , class AWD >
using Utopia::DataIO::WriteTask< BGB, DW, DB, AWG, AWD >::AttributeWriterGroup = AWG

◆ BasegroupBuilder

template<class BGB , class DW , class DB , class AWG , class AWD >
using Utopia::DataIO::WriteTask< BGB, DW, DB, AWG, AWD >::BasegroupBuilder = BGB

◆ Builder

template<class BGB , class DW , class DB , class AWG , class AWD >
using Utopia::DataIO::WriteTask< BGB, DW, DB, AWG, AWD >::Builder = DB

◆ Writer

template<class BGB , class DW , class DB , class AWG , class AWD >
using Utopia::DataIO::WriteTask< BGB, DW, DB, AWG, AWD >::Writer = DW

Constructor & Destructor Documentation

◆ WriteTask() [1/4]

template<class BGB , class DW , class DB , class AWG , class AWD >
template<typename Basegroupbuilder , typename Writertype , typename Buildertype , typename AWritertypeG , typename AWritertypeD >
Utopia::DataIO::WriteTask< BGB, DW, DB, AWG, AWD >::WriteTask ( Basegroupbuilder &&  bgb,
Writertype &&  w,
Buildertype &&  b,
AWritertypeG &&  ag,
AWritertypeD &&  ad 
)
inline

Construct a new Write Task object.

Template Parameters
BasegroupbuilderAutomatically determined.
WritertypeAutomatically determined.
BuildertypeAutomatically determined.
AWritertypeGAutomatically determined.
AWritertypeDAutomatically determined.
Parameters
bgbbuilder function for basegroup
wwriter function for wrtiing data
bbuilder function for dataset
aggroup attribute writer
addataset attribute writer

◆ WriteTask() [2/4]

template<class BGB , class DW , class DB , class AWG , class AWD >
Utopia::DataIO::WriteTask< BGB, DW, DB, AWG, AWD >::WriteTask ( )
default

Construct a new writer Task object.

◆ WriteTask() [3/4]

template<class BGB , class DW , class DB , class AWG , class AWD >
Utopia::DataIO::WriteTask< BGB, DW, DB, AWG, AWD >::WriteTask ( const WriteTask< BGB, DW, DB, AWG, AWD > &  other)
default
Parameters
otherWriteTask object to copy from

◆ WriteTask() [4/4]

template<class BGB , class DW , class DB , class AWG , class AWD >
Utopia::DataIO::WriteTask< BGB, DW, DB, AWG, AWD >::WriteTask ( WriteTask< BGB, DW, DB, AWG, AWD > &&  other)
default

Construct a new writer Task object.

Parameters
otherWriteTask to move from

◆ ~WriteTask()

template<class BGB , class DW , class DB , class AWG , class AWD >
Utopia::DataIO::WriteTask< BGB, DW, DB, AWG, AWD >::~WriteTask ( )
default

Destroy the writer Task object.

Member Function Documentation

◆ get_active_path()

template<class BGB , class DW , class DB , class AWG , class AWD >
std::string Utopia::DataIO::WriteTask< BGB, DW, DB, AWG, AWD >::get_active_path ( )
inline

Get the path of active dataset relative to the base_group.

Returns
std::string

◆ get_base_path()

template<class BGB , class DW , class DB , class AWG , class AWD >
std::string Utopia::DataIO::WriteTask< BGB, DW, DB, AWG, AWD >::get_base_path ( )
inline

Get the path to the base group object.

Returns
std::string

◆ operator=() [1/2]

template<class BGB , class DW , class DB , class AWG , class AWD >
WriteTask& Utopia::DataIO::WriteTask< BGB, DW, DB, AWG, AWD >::operator= ( const WriteTask< BGB, DW, DB, AWG, AWD > &  other)
default

Copy assign caller from 'other'.

Parameters
otherObject to assign from
Returns
WriteTask&

◆ operator=() [2/2]

template<class BGB , class DW , class DB , class AWG , class AWD >
WriteTask& Utopia::DataIO::WriteTask< BGB, DW, DB, AWG, AWD >::operator= ( WriteTask< BGB, DW, DB, AWG, AWD > &&  other)
default

Move assign from 'other'.

Parameters
otherObject to assign from.
Returns
WriteTask&

◆ swap()

template<class BGB , class DW , class DB , class AWG , class AWD >
void Utopia::DataIO::WriteTask< BGB, DW, DB, AWG, AWD >::swap ( WriteTask< BGB, DW, DB, AWG, AWD > &  other)
inline

Swap the state of the caller with 'other'.

Parameters
otherDifferent WriteTask object

Member Data Documentation

◆ active_dataset

template<class BGB , class DW , class DB , class AWG , class AWD >
std::shared_ptr< HDFDataset> Utopia::DataIO::WriteTask< BGB, DW, DB, AWG, AWD >::active_dataset

pointer to the dataset which is currently active

◆ base_group

template<class BGB , class DW , class DB , class AWG , class AWD >
std::shared_ptr< HDFGroup > Utopia::DataIO::WriteTask< BGB, DW, DB, AWG, AWD >::base_group

pointer to the hdfgroup in which all produced datasets live.

◆ build_basegroup

template<class BGB , class DW , class DB , class AWG , class AWD >
BasegroupBuilder Utopia::DataIO::WriteTask< BGB, DW, DB, AWG, AWD >::build_basegroup

Function building a base group.

◆ build_dataset

template<class BGB , class DW , class DB , class AWG , class AWD >
Builder Utopia::DataIO::WriteTask< BGB, DW, DB, AWG, AWD >::build_dataset

Callable to build new dataset.

◆ write_attribute_active_dataset

template<class BGB , class DW , class DB , class AWG , class AWD >
AttributeWriterDataset Utopia::DataIO::WriteTask< BGB, DW, DB, AWG, AWD >::write_attribute_active_dataset

Callable to write attributes to dataset; invoked after task write.

◆ write_attribute_basegroup

template<class BGB , class DW , class DB , class AWG , class AWD >
AttributeWriterGroup Utopia::DataIO::WriteTask< BGB, DW, DB, AWG, AWD >::write_attribute_basegroup

Callabel to write attributes to base group, invoked after task build.

◆ write_data

template<class BGB , class DW , class DB , class AWG , class AWD >
Writer Utopia::DataIO::WriteTask< BGB, DW, DB, AWG, AWD >::write_data

Callable to write data.


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