The Battle for Wesnoth  1.15.2+dev
Public Member Functions | Private Member Functions | List of all members
wfl::variant_decimal Class Reference

#include <variant_value.hpp>

Inheritance diagram for wfl::variant_decimal:
Inheritance graph

Public Member Functions

 variant_decimal (int value)
 
 variant_decimal (double value)
 
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 const VARIANT_TYPE & get_type () const override
 Returns the id of the variant type. More...
 
- Public Member Functions inherited from wfl::variant_numeric
 variant_numeric (int value)
 
virtual bool as_bool () const override
 Returns a bool expression of the variant value. More...
 
int get_numeric_value () const
 
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...
 
- 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 bool is_empty () const
 Whether the stored value is considered empty or not. More...
 
virtual boost::iterator_range< variant_iteratormake_iterator () const
 Creates an iterator pair that can be used for iteration. More...
 
virtual variant deref_iterator (const boost::any &iter) const
 Implements the dereference functionality of variant_iterator for a value of this type. More...
 
virtual void iterator_inc (boost::any &) const
 Implements the increment functionality of variant_iterator for a value of this type. More...
 
virtual void iterator_dec (boost::any &) const
 Implements the decrement functionality of variant_iterator for a value of this type. More...
 
virtual bool iterator_equals (const boost::any &, const boost::any &) const
 Implements the equality functionality of variant_iterator for a value of this type. More...
 
virtual ~variant_value_base ()
 

Private Member Functions

std::string to_string_impl (const bool sign_value) const
 

Additional Inherited Members

- Protected Attributes inherited from wfl::variant_numeric
int value_
 

Detailed Description

Definition at line 269 of file variant_value.hpp.

Constructor & Destructor Documentation

◆ variant_decimal() [1/2]

wfl::variant_decimal::variant_decimal ( int  value)
inlineexplicit

Definition at line 272 of file variant_value.hpp.

◆ variant_decimal() [2/2]

wfl::variant_decimal::variant_decimal ( double  value)
inlineexplicit

Definition at line 274 of file variant_value.hpp.

Member Function Documentation

◆ get_debug_string()

virtual std::string wfl::variant_decimal::get_debug_string ( formula_seen_stack ,
bool   
) const
inlineoverridevirtual

Returns debug info for the variant value.

Reimplemented from wfl::variant_value_base.

Definition at line 297 of file variant_value.hpp.

◆ get_serialized_string()

virtual std::string wfl::variant_decimal::get_serialized_string ( ) const
inlineoverridevirtual

Returns the stored variant value in formula syntax.

Reimplemented from wfl::variant_value_base.

Definition at line 292 of file variant_value.hpp.

◆ get_type()

virtual const VARIANT_TYPE& wfl::variant_decimal::get_type ( ) const
inlineoverridevirtual

Returns the id of the variant type.

Reimplemented from wfl::variant_value_base.

Definition at line 302 of file variant_value.hpp.

◆ string_cast()

virtual std::string wfl::variant_decimal::string_cast ( ) const
inlineoverridevirtual

Returns the stored variant value in plain string form.

Reimplemented from wfl::variant_value_base.

Definition at line 287 of file variant_value.hpp.

◆ to_string_impl()

std::string wfl::variant_decimal::to_string_impl ( const bool  sign_value) const
private

Definition at line 47 of file variant_value.cpp.


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