#include <variant_value.hpp>
Public Member Functions | |
| variant_string (const std::string &str) | |
| variant_string (std::string &&str) | |
| virtual bool | is_empty () const override |
| Whether the stored value is considered empty or not. More... | |
| virtual bool | as_bool () const override |
| Returns a bool expression of the variant value. More... | |
| const std::string & | get_string () 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 &, bool) const override |
| Returns debug info for the variant value. More... | |
| virtual bool | equals (const 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 (const variant_value_base &other) const override |
| Called to determine if this variant is less than another of the same type. More... | |
Public Member Functions inherited from wfl::variant_value_base | |
| virtual std::size_t | num_elements () const |
| Returns the number of elements in a type. More... | |
| virtual formula_variant::type | get_type () const |
| Returns the id of the variant type. More... | |
| virtual boost::iterator_range< variant_iterator > | make_iterator () const |
| Creates an iterator pair that can be used for iteration. More... | |
| virtual variant | deref_iterator (const utils::any &iter) const |
| Implements the dereference functionality of variant_iterator for a value of this type. More... | |
| virtual void | iterator_inc (utils::any &) const |
| Implements the increment functionality of variant_iterator for a value of this type. More... | |
| virtual void | iterator_dec (utils::any &) const |
| 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 |
| Implements the equality functionality of variant_iterator for a value of this type. More... | |
| virtual | ~variant_value_base () |
Private Attributes | |
| std::string | string_ |
| Required by variant_value_base. More... | |
Additional Inherited Members | |
Static Public Attributes inherited from wfl::variant_value_base | |
| static constexpr auto | value_type = formula_variant::type::null |
| Each 'final' derived class should define a static type flag. More... | |
Definition at line 333 of file variant_value.hpp.
|
inlineexplicit |
Definition at line 336 of file variant_value.hpp.
|
inlineexplicit |
Definition at line 337 of file variant_value.hpp.
|
inlineoverridevirtual |
Returns a bool expression of the variant value.
Reimplemented from wfl::variant_value_base.
Definition at line 344 of file variant_value.hpp.
References is_empty().
|
inlineoverridevirtual |
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 366 of file variant_value.hpp.
References utils::cast_as(), and string_.
|
inlineoverridevirtual |
Returns debug info for the variant value.
Reimplemented from wfl::variant_value_base.
Definition at line 361 of file variant_value.hpp.
References string_.
|
overridevirtual |
Returns the stored variant value in formula syntax.
Reimplemented from wfl::variant_value_base.
Definition at line 203 of file variant_value.cpp.
|
inline |
Definition at line 349 of file variant_value.hpp.
References string_.
|
inlineoverridevirtual |
Whether the stored value is considered empty or not.
Reimplemented from wfl::variant_value_base.
Definition at line 339 of file variant_value.hpp.
References string_.
Referenced by as_bool().
|
inlineoverridevirtual |
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 371 of file variant_value.hpp.
References utils::cast_as(), and string_.
|
inlineoverridevirtual |
Returns the stored variant value in plain string form.
Reimplemented from wfl::variant_value_base.
Definition at line 354 of file variant_value.hpp.
References string_.
|
private |
Required by variant_value_base.
Definition at line 380 of file variant_value.hpp.
Referenced by equals(), get_debug_string(), get_serialized_string(), get_string(), is_empty(), less_than(), and string_cast().