The Battle for Wesnoth  1.15.2+dev
Public Member Functions | Private Attributes | List of all members
config_attribute_value::string_visitor Class Reference

Visitor for converting a variant to a string. More...

Inheritance diagram for config_attribute_value::string_visitor:
Inheritance graph

Public Member Functions

 string_visitor (const std::string &fallback)
 
std::string operator() (const boost::blank &) const
 
std::string operator() (const yes_no &b) const
 
std::string operator() (const true_false &b) const
 
std::string operator() (int i) const
 
std::string operator() (unsigned long long u) const
 
std::string operator() (double d) const
 
std::string operator() (const std::string &s) const
 
std::string operator() (const t_string &s) const
 

Private Attributes

const std::string default_
 

Detailed Description

Visitor for converting a variant to a string.

Definition at line 310 of file config_attribute_value.cpp.

Constructor & Destructor Documentation

◆ string_visitor()

config_attribute_value::string_visitor::string_visitor ( const std::string &  fallback)
inline

Definition at line 315 of file config_attribute_value.cpp.

Member Function Documentation

◆ operator()() [1/8]

std::string config_attribute_value::string_visitor::operator() ( const boost::blank &  ) const
inline

Definition at line 317 of file config_attribute_value.cpp.

◆ operator()() [2/8]

std::string config_attribute_value::string_visitor::operator() ( const yes_no b) const
inline

Definition at line 318 of file config_attribute_value.cpp.

References config_attribute_value::yes_no::str().

◆ operator()() [3/8]

std::string config_attribute_value::string_visitor::operator() ( const true_false b) const
inline

◆ operator()() [4/8]

std::string config_attribute_value::string_visitor::operator() ( int  i) const
inline

Definition at line 320 of file config_attribute_value.cpp.

References i, and lexical_cast().

◆ operator()() [5/8]

std::string config_attribute_value::string_visitor::operator() ( unsigned long long  u) const
inline

Definition at line 321 of file config_attribute_value.cpp.

References lexical_cast().

◆ operator()() [6/8]

std::string config_attribute_value::string_visitor::operator() ( double  d) const
inline

Definition at line 322 of file config_attribute_value.cpp.

References d, and lexical_cast().

◆ operator()() [7/8]

std::string config_attribute_value::string_visitor::operator() ( const std::string &  s) const
inline

Definition at line 323 of file config_attribute_value.cpp.

References s.

◆ operator()() [8/8]

std::string config_attribute_value::string_visitor::operator() ( const t_string s) const
inline

Definition at line 324 of file config_attribute_value.cpp.

References t_string::str().

Member Data Documentation

◆ default_

const std::string config_attribute_value::string_visitor::default_
private

Definition at line 312 of file config_attribute_value.cpp.


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