Utopia  2
Framework for studying models of complex & adaptive systems.
Public Types | Public Member Functions | Public Attributes | List of all members
Utopia::DataIO::Default::CompositeDecider< Model, Deciders > Struct Template Reference

Combines a number of deciders; returns true if any of them is true. More...

#include <defaults.hh>

Inheritance diagram for Utopia::DataIO::Default::CompositeDecider< Model, Deciders >:
Inheritance graph
[legend]
Collaboration diagram for Utopia::DataIO::Default::CompositeDecider< Model, Deciders >:
Collaboration graph
[legend]

Public Types

using Base = Decider< Model >
 The type of the base decider class. More...
 

Public Member Functions

virtual bool operator() (Model &m) override
 Evaluates the composite deciders; returns true if any is true. More...
 
virtual void set_from_cfg (const Config &cfg) override
 Set the decider up from a given config node. More...
 
 CompositeDecider ()=default
 
 CompositeDecider (const CompositeDecider &)=default
 
CompositeDecideroperator= (const CompositeDecider &)=default
 
CompositeDecideroperator= (CompositeDecider &&)=default
 
virtual ~CompositeDecider ()=default
 
- Public Member Functions inherited from Utopia::DataIO::Default::Decider< Model >
 Decider ()=default
 
 Decider (const Decider &)=default
 
 Decider (Decider &&)=default
 
Decideroperator= (const Decider &)=default
 
Decideroperator= (Decider &&)=default
 
virtual ~Decider ()=default
 

Public Attributes

std::tuple< Deciders... > held_deciders
 Tuple of associated decider objects. More...
 

Detailed Description

template<typename Model, typename... Deciders>
struct Utopia::DataIO::Default::CompositeDecider< Model, Deciders >

Combines a number of deciders; returns true if any of them is true.

Template Parameters
ModelThe model
DecidersThe decider types to combine as composite

Member Typedef Documentation

◆ Base

template<typename Model , typename... Deciders>
using Utopia::DataIO::Default::CompositeDecider< Model, Deciders >::Base = Decider< Model >

The type of the base decider class.

Constructor & Destructor Documentation

◆ CompositeDecider() [1/2]

template<typename Model , typename... Deciders>
Utopia::DataIO::Default::CompositeDecider< Model, Deciders >::CompositeDecider ( )
default

◆ CompositeDecider() [2/2]

template<typename Model , typename... Deciders>
Utopia::DataIO::Default::CompositeDecider< Model, Deciders >::CompositeDecider ( const CompositeDecider< Model, Deciders > &  )
default

◆ ~CompositeDecider()

template<typename Model , typename... Deciders>
virtual Utopia::DataIO::Default::CompositeDecider< Model, Deciders >::~CompositeDecider ( )
virtualdefault

Member Function Documentation

◆ operator()()

template<typename Model , typename... Deciders>
virtual bool Utopia::DataIO::Default::CompositeDecider< Model, Deciders >::operator() ( Model m)
inlineoverridevirtual

Evaluates the composite deciders; returns true if any is true.

Parameters
mThe model reference, passed on to decider objects

Implements Utopia::DataIO::Default::Decider< Model >.

◆ operator=() [1/2]

template<typename Model , typename... Deciders>
CompositeDecider& Utopia::DataIO::Default::CompositeDecider< Model, Deciders >::operator= ( CompositeDecider< Model, Deciders > &&  )
default

◆ operator=() [2/2]

template<typename Model , typename... Deciders>
CompositeDecider& Utopia::DataIO::Default::CompositeDecider< Model, Deciders >::operator= ( const CompositeDecider< Model, Deciders > &  )
default

◆ set_from_cfg()

template<typename Model , typename... Deciders>
virtual void Utopia::DataIO::Default::CompositeDecider< Model, Deciders >::set_from_cfg ( const Config cfg)
inlineoverridevirtual

Set the decider up from a given config node.

Warning
The ordering of he decider nodes in the config needs to be the same as the ordering of the arguments given to the constructor of this class
Parameters
cfgconfig node containing arguments for this decider

Implements Utopia::DataIO::Default::Decider< Model >.

Member Data Documentation

◆ held_deciders

template<typename Model , typename... Deciders>
std::tuple< Deciders... > Utopia::DataIO::Default::CompositeDecider< Model, Deciders >::held_deciders

Tuple of associated decider objects.


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