The Battle for Wesnoth  1.15.12+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...

Public Member Functions

 string_visitor (const std::string &fallback)
 
std::string operator() (const utils::monostate &) 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 308 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 316 of file config_attribute_value.cpp.

Member Function Documentation

◆ operator()() [1/8]

std::string config_attribute_value::string_visitor::operator() ( const utils::monostate &  ) const
inline

Definition at line 318 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 319 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 321 of file config_attribute_value.cpp.

◆ operator()() [5/8]

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

Definition at line 322 of file config_attribute_value.cpp.

◆ operator()() [6/8]

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

Definition at line 323 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 324 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 325 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 313 of file config_attribute_value.cpp.


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