#include <variant_value.hpp>
Public Member Functions | |
variant_callable (const_formula_callable_ptr callable) | |
~variant_callable () | |
virtual bool | as_bool () const override |
Returns a bool expression of the variant value. More... | |
virtual std::size_t | num_elements () const override |
Returns the number of elements in a type. More... | |
const_formula_callable_ptr | get_callable () const |
virtual std::string | string_cast () const override |
Returns the stored variant value in plain string form. More... | |
virtual std::string | get_serialized_string () const override |
Returns the stored variant value in formula syntax. More... | |
virtual std::string | get_debug_string (formula_seen_stack &seen, bool verbose) const override |
Returns debug info for the variant value. More... | |
virtual bool | equals (variant_value_base &other) const override |
Called to determine if this variant is equal to another of the same type. More... | |
virtual bool | less_than (variant_value_base &other) const override |
Called to determine if this variant is less than another of the same type. More... | |
virtual const formula_variant::type & | get_type () const override |
Returns the id of the variant type. More... | |
virtual boost::iterator_range< variant_iterator > | make_iterator () const override |
Creates an iterator pair that can be used for iteration. More... | |
virtual variant | deref_iterator (const utils::any &iter) const override |
Implements the dereference functionality of variant_iterator for a value of this type. More... | |
virtual void | iterator_inc (utils::any &iter) const override |
Implements the increment functionality of variant_iterator for a value of this type. More... | |
virtual void | iterator_dec (utils::any &iter) const override |
Implements the decrement functionality of variant_iterator for a value of this type. More... | |
virtual bool | iterator_equals (const utils::any &, const utils::any &) const override |
Implements the equality functionality of variant_iterator for a value of this type. More... | |
Public Member Functions inherited from wfl::variant_value_base | |
virtual bool | is_empty () const |
Whether the stored value is considered empty or not. More... | |
virtual | ~variant_value_base () |
Private Member Functions | |
void | notify_dead () override |
Private Member Functions inherited from wfl::callable_die_subscriber | |
virtual | ~callable_die_subscriber () |
Private Attributes | |
formula_input_vector | inputs |
const_formula_callable_ptr | callable_ |
Definition at line 299 of file variant_value.hpp.
|
explicit |
Definition at line 81 of file variant_value.cpp.
References callable_.
wfl::variant_callable::~variant_callable | ( | ) |
Definition at line 89 of file variant_value.cpp.
References callable_.
|
inlineoverridevirtual |
Returns a bool expression of the variant value.
Reimplemented from wfl::variant_value_base.
Definition at line 305 of file variant_value.hpp.
References callable_.
|
overridevirtual |
Implements the dereference functionality of variant_iterator for a value of this type.
iter | The opaque reference that was passed to the variant_iterator by make_iterator. |
Reimplemented from wfl::variant_value_base.
Definition at line 171 of file variant_value.cpp.
References callable_.
|
overridevirtual |
Called to determine if this variant is equal to another of the same type.
This function is only called if get_type() returns the same result for both arguments.
Reimplemented from wfl::variant_value_base.
Definition at line 146 of file variant_value.cpp.
References callable_.
|
inline |
Definition at line 315 of file variant_value.hpp.
References callable_.
|
overridevirtual |
Returns debug info for the variant value.
Reimplemented from wfl::variant_value_base.
Definition at line 106 of file variant_value.cpp.
References callable_, utils::find(), wfl::read_write, and wfl::write_only.
|
overridevirtual |
Returns the stored variant value in formula syntax.
Reimplemented from wfl::variant_value_base.
Definition at line 95 of file variant_value.cpp.
References callable_.
|
inlineoverridevirtual |
Returns the id of the variant type.
Reimplemented from wfl::variant_value_base.
Definition at line 332 of file variant_value.hpp.
|
overridevirtual |
Implements the decrement functionality of variant_iterator for a value of this type.
The parameter is an opaque reference that was passed to the variant_iterator by make_iterator.
Reimplemented from wfl::variant_value_base.
Definition at line 185 of file variant_value.cpp.
|
inlineoverridevirtual |
Implements the equality functionality of variant_iterator for a value of this type.
Note that this is only called if the two iterators are already known to be of the same type.
The first parameter is an opaque reference that was passed to the variant_iterator by make_iterator. The second parameter is an opaque reference that was passed to the variant_iterator by make_iterator.
Reimplemented from wfl::variant_value_base.
Definition at line 343 of file variant_value.hpp.
|
overridevirtual |
Implements the increment functionality of variant_iterator for a value of this type.
The parameter is an opaque reference that was passed to the variant_iterator by make_iterator.
Reimplemented from wfl::variant_value_base.
Definition at line 180 of file variant_value.cpp.
|
overridevirtual |
Called to determine if this variant is less than another of the same type.
This function is only called if get_type() returns the same result for both arguments.
Reimplemented from wfl::variant_value_base.
Definition at line 152 of file variant_value.cpp.
References callable_.
|
overridevirtual |
Creates an iterator pair that can be used for iteration.
For an iterable type, it should use the two-argument constructor of variant-iterator, passing the underlying iterator as the utils::any parameter.
This creates both the begin and end iterator, but the variant implementation discards one of the two.
Reimplemented from wfl::variant_value_base.
Definition at line 158 of file variant_value.cpp.
References callable_, inputs, and wfl::variant_value_base::make_iterator().
|
inlineoverrideprivatevirtual |
Reimplemented from wfl::callable_die_subscriber.
Definition at line 349 of file variant_value.hpp.
References callable_.
|
inlineoverridevirtual |
Returns the number of elements in a type.
Not relevant for every derivative.
Reimplemented from wfl::variant_value_base.
Definition at line 310 of file variant_value.hpp.
|
inlineoverridevirtual |
Returns the stored variant value in plain string form.
Reimplemented from wfl::variant_value_base.
Definition at line 320 of file variant_value.hpp.
|
private |
Definition at line 352 of file variant_value.hpp.
Referenced by as_bool(), deref_iterator(), equals(), get_callable(), get_debug_string(), get_serialized_string(), less_than(), make_iterator(), notify_dead(), variant_callable(), and ~variant_callable().
|
mutableprivate |
Definition at line 351 of file variant_value.hpp.
Referenced by make_iterator().