Utopia
2
Framework for studying models of complex & adaptive systems.
|
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... | |
WriteTask & | operator= (const WriteTask &other)=default |
Copy assign caller from 'other'. More... | |
WriteTask & | operator= (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< HDFGroup > | base_group |
pointer to the hdfgroup in which all produced datasets live. More... | |
std::shared_ptr< HDFDataset > | active_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... | |
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.
BGB | Basegroup builder type, automatically determined |
DW | Data writer type, automatically determined |
DB | Dataset builder type, automatically deterimned |
AWG | Group attribute writer type, automatically determined |
AWD | Dataset attribute writer type, automatically determined |
using Utopia::DataIO::WriteTask< BGB, DW, DB, AWG, AWD >::AttributeWriterDataset = AWD |
using Utopia::DataIO::WriteTask< BGB, DW, DB, AWG, AWD >::AttributeWriterGroup = AWG |
using Utopia::DataIO::WriteTask< BGB, DW, DB, AWG, AWD >::BasegroupBuilder = BGB |
using Utopia::DataIO::WriteTask< BGB, DW, DB, AWG, AWD >::Builder = DB |
using Utopia::DataIO::WriteTask< BGB, DW, DB, AWG, AWD >::Writer = DW |
|
inline |
Construct a new Write Task object.
Basegroupbuilder | Automatically determined. |
Writertype | Automatically determined. |
Buildertype | Automatically determined. |
AWritertypeG | Automatically determined. |
AWritertypeD | Automatically determined. |
bgb | builder function for basegroup |
w | writer function for wrtiing data |
b | builder function for dataset |
ag | group attribute writer |
ad | dataset attribute writer |
|
default |
Construct a new writer Task object.
|
default |
other | WriteTask object to copy from |
|
default |
Construct a new writer Task object.
other | WriteTask to move from |
|
default |
Destroy the writer Task object.
|
inline |
Get the path of active dataset relative to the base_group.
|
inline |
Get the path to the base group object.
|
default |
|
default |
|
inline |
Swap the state of the caller with 'other'.
other | Different WriteTask object |
std::shared_ptr< HDFDataset> Utopia::DataIO::WriteTask< BGB, DW, DB, AWG, AWD >::active_dataset |
pointer to the dataset which is currently active
std::shared_ptr< HDFGroup > Utopia::DataIO::WriteTask< BGB, DW, DB, AWG, AWD >::base_group |
pointer to the hdfgroup in which all produced datasets live.
BasegroupBuilder Utopia::DataIO::WriteTask< BGB, DW, DB, AWG, AWD >::build_basegroup |
Function building a base group.
Builder Utopia::DataIO::WriteTask< BGB, DW, DB, AWG, AWD >::build_dataset |
Callable to build new dataset.
AttributeWriterDataset Utopia::DataIO::WriteTask< BGB, DW, DB, AWG, AWD >::write_attribute_active_dataset |
Callable to write attributes to dataset; invoked after task write.
AttributeWriterGroup Utopia::DataIO::WriteTask< BGB, DW, DB, AWG, AWD >::write_attribute_basegroup |
Callabel to write attributes to base group, invoked after task build.
Writer Utopia::DataIO::WriteTask< BGB, DW, DB, AWG, AWD >::write_data |
Callable to write data.