cauldron  0.0.0
 All Classes Namespaces Files Functions Variables Typedefs
Public Member Functions | List of all members
cauldron::Union< Value > Class Template Reference

#include <bases.h>

Inheritance diagram for cauldron::Union< Value >:
Inheritance graph
[legend]
Collaboration diagram for cauldron::Union< Value >:
Collaboration graph
[legend]

Public Member Functions

 Union (const Strategy< Value > &strategy, const Strategy< Value > &other_strategy)
 
 Union (const Union< Value > &strategy)
 
Value operator() () const override
 
Union< Value > operator|| (const Strategy< Value > &strategy) const override
 
Union< Value > operator|| (const Union< Value > &strategy) const override
 
- Public Member Functions inherited from cauldron::CloneHelper< Value, Union< Value > >
std::unique_ptr< Strategy
< Value > > 
clone () const override
 
- Public Member Functions inherited from cauldron::Strategy< Value >
virtual Filtered< Value > filter (const Requirement< Value > &requirement) const
 
virtual Mapped< Value > map (const Converter< Value > &converter) const
 

Detailed Description

template<typename Value>
class cauldron::Union< Value >

Union of strategies. Generates values from any one of given strategies.

Template Parameters
Valuetype of values generated by strategy.

Constructor & Destructor Documentation

template<typename Value>
cauldron::Union< Value >::Union ( const Strategy< Value > &  strategy,
const Strategy< Value > &  other_strategy 
)
inlineexplicit
template<typename Value>
cauldron::Union< Value >::Union ( const Union< Value > &  strategy)
inline

Default copy constructor doesn't fit since we're using std::unique_ptr in class member which is not copyable.

Member Function Documentation

template<typename Value>
Value cauldron::Union< Value >::operator() ( ) const
inlineoverridevirtual

Generates value from one of strategies_ elements.

Implements cauldron::Strategy< Value >.

template<typename Value>
Union<Value> cauldron::Union< Value >::operator|| ( const Strategy< Value > &  strategy) const
inlineoverridevirtual

Returns a new strategy that generates values from either original strategy or provided one.

Reimplemented from cauldron::Strategy< Value >.

template<typename Value>
Union<Value> cauldron::Union< Value >::operator|| ( const Union< Value > &  strategy) const
inlineoverridevirtual

Same result as for any other strategy. Basically added for possible overriding with support of strategies' union associativity.

Reimplemented from cauldron::Strategy< Value >.


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