Utopia  2
Framework for studying models of complex & adaptive systems.
Public Member Functions | Public Attributes | List of all members
Utopia::Models::Environment::FuncBundle::RuleFuncBundle< RuleFunc, Time, CellContainer > Struct Template Reference

A bundle wrapping a (rule-)function with metadata. More...

#include <func_bundle.hh>

Inheritance diagram for Utopia::Models::Environment::FuncBundle::RuleFuncBundle< RuleFunc, Time, CellContainer >:
Inheritance graph
[legend]
Collaboration diagram for Utopia::Models::Environment::FuncBundle::RuleFuncBundle< RuleFunc, Time, CellContainer >:
Collaboration graph
[legend]

Public Member Functions

 RuleFuncBundle (std::string name, RuleFunc func, Update update=Update::sync, bool invoke_at_initialization=true, bool invoke_always=true, std::set< Time > times={}, bool fix_selection=false, const CellContainer &cell_selection={}, const DataIO::Config &select_cfg={})
 
 RuleFuncBundle (std::string name, RuleFunc func, Update update, bool invoke_at_initialization, std::pair< bool, std::set< Time >> times_pair, std::tuple< bool, CellContainer, DataIO::Config > select_tuple)
 
- Public Member Functions inherited from Utopia::Models::Environment::FuncBundle::FuncBundle< RuleFunc, Time >
 FuncBundle (std::string name, RuleFunc func, bool invoke_at_initialization=true, bool invoke_always=true, std::set< Time > times={})
 When to invoke. More...
 

Public Attributes

Update update
 The update mode of the RuleFunc. More...
 
bool fix_selection
 Whether the selection of cells is fixed. More...
 
CellContainer cell_selection
 Cell container over which to apply the func, optional. More...
 
DataIO::Config select_cfg
 Config node that is passed to the select_cells of the cell manager. More...
 
- Public Attributes inherited from Utopia::Models::Environment::FuncBundle::FuncBundle< RuleFunc, Time >
std::string name
 
RuleFunc func
 The name of the function. More...
 
bool invoke_at_initialization
 The function. More...
 
bool invoke_always
 Whether to invoke at initialization. More...
 
std::set< Time > times
 Whether to invoke in every timestep. More...
 

Detailed Description

template<typename RuleFunc, typename Time, typename CellContainer>
struct Utopia::Models::Environment::FuncBundle::RuleFuncBundle< RuleFunc, Time, CellContainer >

A bundle wrapping a (rule-)function with metadata.

This gathers a rule function alongside some metadata into a custom construct. It can (optional) carry its own cellcontainer or a Config how to select cells from the cell manager.

Constructor & Destructor Documentation

◆ RuleFuncBundle() [1/2]

template<typename RuleFunc , typename Time , typename CellContainer >
Utopia::Models::Environment::FuncBundle::RuleFuncBundle< RuleFunc, Time, CellContainer >::RuleFuncBundle ( std::string  name,
RuleFunc  func,
Update  update = Update::sync,
bool  invoke_at_initialization = true,
bool  invoke_always = true,
std::set< Time >  times = {},
bool  fix_selection = false,
const CellContainer cell_selection = {},
const DataIO::Config select_cfg = {} 
)
inline

◆ RuleFuncBundle() [2/2]

template<typename RuleFunc , typename Time , typename CellContainer >
Utopia::Models::Environment::FuncBundle::RuleFuncBundle< RuleFunc, Time, CellContainer >::RuleFuncBundle ( std::string  name,
RuleFunc  func,
Update  update,
bool  invoke_at_initialization,
std::pair< bool, std::set< Time >>  times_pair,
std::tuple< bool, CellContainer, DataIO::Config select_tuple 
)
inline

Member Data Documentation

◆ cell_selection

template<typename RuleFunc , typename Time , typename CellContainer >
CellContainer Utopia::Models::Environment::FuncBundle::RuleFuncBundle< RuleFunc, Time, CellContainer >::cell_selection

Cell container over which to apply the func, optional.

◆ fix_selection

template<typename RuleFunc , typename Time , typename CellContainer >
bool Utopia::Models::Environment::FuncBundle::RuleFuncBundle< RuleFunc, Time, CellContainer >::fix_selection

Whether the selection of cells is fixed.

◆ select_cfg

template<typename RuleFunc , typename Time , typename CellContainer >
DataIO::Config Utopia::Models::Environment::FuncBundle::RuleFuncBundle< RuleFunc, Time, CellContainer >::select_cfg

Config node that is passed to the select_cells of the cell manager.

◆ update

template<typename RuleFunc , typename Time , typename CellContainer >
Update Utopia::Models::Environment::FuncBundle::RuleFuncBundle< RuleFunc, Time, CellContainer >::update

The update mode of the RuleFunc.


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