Factory function which produces a Datamanager of type Default::DefaultDataManager<Model> from a config and argumets from which to construct writetasks.
More...
#include <factory.hh>
|
template<typename ArgTpl > |
std::pair< std::string, std::shared_ptr< Default::DefaultWriteTask< Model > > > | _call_taskfactory (std::string typetag, ArgTpl &&arg_tpl) |
| Function which calls the taskfactory with argument tuples, and takes care of using the correct type-tags. More...
|
|
template<class Model>
class Utopia::DataIO::DataManagerFactory< Model >
Factory function which produces a Datamanager of type Default::DefaultDataManager<Model> from a config and argumets from which to construct writetasks.
- Template Parameters
-
Model | Modeltype to use. |
Args | Tuple types <TypeTag, std::string, argstypes_for_task...> |
- Parameters
-
model | Reference to the model the produced datamanagere shall belong to |
w_args | Tuples, have to contain [tagtype, name, argumnets...] |
- Returns
- auto DefaultDatamanager with DefaultWriteTasks produced from model
◆ _call_taskfactory()
template<class Model >
template<typename ArgTpl >
Function which calls the taskfactory with argument tuples, and takes care of using the correct type-tags.
- Template Parameters
-
ArgTpl | automatically determined |
- Parameters
-
typetag | string indicating which type tag to use |
arg_tpl | tuple of arguments to invoke the taskfactory with |
- Returns
- Default::DefaultWriteTask<Model> produced by invoking the TaskFactory with the passed argument tuple
◆ operator()()
template<class Model >
template<typename... Args>
Builds a new datamanager from a config file and a tuple of tuples of arguments.
The latter are supplemented by the arguments given by the config, and then passed to the writetask factory, each. The result is then used for creating the datamanager. The arguments that need to be supplied in the code are
- function which returns the data source, preferably by reference. Mind that you need to use decltype(auto) as return type if using a lambda.
- the getter function which extracts data from the sources values, same thing as employed by dataset->write.
- callable to write group attribute or tuple containing (name, data) or 'Nothing{}' if no attributes are desired
- callable to write dataset attribute or tuple containing (name, data) or 'Nothing{}' if no attributes are desired
- Template Parameters
-
Args | automatically determined |
- Parameters
-
conf | config node giving the 'data_manager' configuration nodes |
args | tuple of argument tuples |
- Returns
- auto DefaultDatamanager<Model> with the tasks built from config and arguments
The documentation for this class was generated from the following file: