#include <bases.h>
Public Member Functions | |
virtual Value | operator() () const =0 |
virtual Union< Value > | operator|| (const Strategy< Value > &strategy) const |
virtual Union< Value > | operator|| (const Union< Value > &strategy) const |
virtual Filtered< Value > | filter (const Requirement< Value > &requirement) const |
virtual Mapped< Value > | map (const Converter< Value > &converter) const |
virtual std::unique_ptr < Strategy< Value > > | clone () const =0 |
Strategies base class.
Hereafter strategy is an object which encapsulates an algorithm for generating specific type of values.
Value | type of values generated by strategy. |
|
pure virtual |
Generates data.
Implemented in cauldron::Mapped< Value >, cauldron::Filtered< Value >, cauldron::Union< Value >, cauldron::Floats< Value >, cauldron::Sets< Element >, cauldron::Vectors< Element >, cauldron::Builder< Object, Value >, cauldron::Integers< Value >, cauldron::Strings, cauldron::Just< Value >, cauldron::Booleans, and cauldron::Characters.
|
inlinevirtual |
Returns a new strategy that generates values from either original strategy or provided one.
Reimplemented in cauldron::Union< Value >.
|
inlinevirtual |
Same result as for any other strategy. Basically added for possible overriding with support of strategies' union associativity.
Reimplemented in cauldron::Union< Value >.
|
inlinevirtual |
Returns a new strategy that generates values from the strategy which satisfy provided strategies::Requirement
instance.
Note that if the requirement
is too hard to satisfy this might result in failing with OutOfCycles
.
Reimplemented in cauldron::Filtered< Value >.
|
inlinevirtual |
Returns a new strategy that generates values from the strategy modified with provided strategies::Converter
instance.
Reimplemented in cauldron::Mapped< Value >.
|
pure virtual |
Creates a copy of the strategy instance and returns pointer to it.
Implemented in cauldron::CloneHelper< Value, Derived >, cauldron::CloneHelper< char, Characters >, cauldron::CloneHelper< Value, Filtered< Value > >, cauldron::CloneHelper< Object, Builder< Object, Value...> >, cauldron::CloneHelper< std::set< Element >, Sets< Element > >, cauldron::CloneHelper< Value, Just< Value > >, cauldron::CloneHelper< Value, Mapped< Value > >, cauldron::CloneHelper< std::vector< Element >, Vectors< Element > >, cauldron::CloneHelper< Value, Integers< Value > >, cauldron::CloneHelper< std::string, Strings >, cauldron::CloneHelper< Value, Floats< Value > >, cauldron::CloneHelper< bool, Booleans >, and cauldron::CloneHelper< Value, Union< Value > >.