Utopia 2
Framework for studying models of complex & adaptive systems.
|
Provides default implementations for the datamanager's requirements. More...
Namespaces | |
namespace | Utopia::DataIO::Default |
Classes | |
struct | Utopia::DataIO::Default::DefaultExecutionProcess |
Functor representing what is considered the most widely used execution process for writing data. More... | |
struct | Utopia::DataIO::Default::Decider< Model > |
Common interface for all deciders (and triggers, for that matter). Every decider/Trigger must inherit from this, and implement its virtual functions 'bool operator()(Model&)' and 'void set_from_cfg(const Config&)'. More... | |
struct | Utopia::DataIO::Default::IntervalDecider< Model > |
A decider that returns true when within certain time intervals. More... | |
struct | Utopia::DataIO::Default::OnceDecider< Model > |
Decider which only returns true at a certain time. More... | |
struct | Utopia::DataIO::Default::AlwaysDecider< Model > |
Decider which always returns true. More... | |
struct | Utopia::DataIO::Default::CompositeDecider< Model, Deciders > |
Combines a number of deciders; returns true if any of them is true. More... | |
Variables | |
template<typename Model > | |
static DefaultDecidermap< Model > | Utopia::DataIO::Default::default_deciders |
Map that names the deciders supplied by default such that they can be addressed in a config file. | |
template<typename Model > | |
static DefaultTriggermap< Model > | Utopia::DataIO::Default::default_triggers = default_deciders< Model > |
Default trigger factories. Equal to deciders because while the task they fullfill is different, their functionality is not. | |
Provides default implementations for the datamanager's requirements.
// endgroup DataManager
Here, default implementations for common deciders, triggers and write tasks for the ::DataManager are defined, as well as a default execution process which is to run the actual writer tasks.
using Utopia::DataIO::Default::CompositeTrigger = typedef CompositeDecider< Model, Deciders... > |
using Utopia::DataIO::Default::DefaultAttributeWriterDataset = typedef std::function< void(std::shared_ptr< HDFDataset >&, Model&) > |
Type of the default attribute writer for datasets.
using Utopia::DataIO::Default::DefaultAttributeWriterGroup = typedef std::function< void(std::shared_ptr< HDFGroup >&, Model&) > |
Type of the default attribute writer for groups.
using Utopia::DataIO::Default::DefaultBaseGroupBuilder = typedef std::function< std::shared_ptr< HDFGroup >(std::shared_ptr< HDFGroup >&&) > |
Type of the default group builder.
using Utopia::DataIO::Default::DefaultBuilder = typedef std::function< std::shared_ptr< HDFDataset >( std::shared_ptr< HDFGroup >&, Model&) > |
Type of the default dataset builder.
using Utopia::DataIO::Default::DefaultDataWriter = typedef std::function< void(std::shared_ptr< HDFDataset >&, Model&) > |
Type of the default data writer.
using Utopia::DataIO::Default::DefaultDecidermap = typedef std::unordered_map< std::string, std::function< std::shared_ptr< Decider< Model > >() > > |
The function to decide whether a writer's builder will be triggered - default signature These are only aliases for the deciders to avoid copy pasta. Keep this in mind if messing with types!
|
static |
Map that names the deciders supplied by default such that they can be addressed in a config file.
This map does not provide decider objects or pointers to them in itself, but functions which create shared_pointers to a particular decider function. This is made such that we can use dynamic polymorphism and do not have to resort to tuples.
Model | A model type for which the deciders shall be employed. |
|
static |