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. | |
std::string | get_base_path () |
Get the path to the base group object. | |
void | swap (WriteTask &other) |
Swap the state of the caller with 'other'. | |
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. | |
WriteTask ()=default | |
Construct a new writer Task object. | |
WriteTask (const WriteTask &other)=default | |
WriteTask (WriteTask &&other)=default | |
Construct a new writer Task object. | |
WriteTask & | operator= (const WriteTask &other)=default |
Copy assign caller from 'other'. | |
WriteTask & | operator= (WriteTask &&other)=default |
Move assign from 'other'. | |
~WriteTask ()=default | |
Destroy the writer Task object. | |
Public Attributes | |
BasegroupBuilder | build_basegroup |
Function building a base group. | |
std::shared_ptr< HDFGroup > | base_group |
pointer to the hdfgroup in which all produced datasets live. | |
std::shared_ptr< HDFDataset > | active_dataset |
pointer to the dataset which is currently active | |
Writer | write_data |
Callable to write data. | |
Builder | build_dataset |
Callable to build new dataset. | |
AttributeWriterDataset | write_attribute_active_dataset |
Callable to write attributes to dataset; invoked after task write. | |
AttributeWriterGroup | write_attribute_basegroup |
Callabel to write attributes to base group, invoked after task build. | |
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 |
|
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 |
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 |
Destroy the writer Task object.
Get the path of active dataset relative to the base_group.
Get the path to the base group object.
|
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
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.
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.