The Battle for Wesnoth  1.19.5+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 301 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 309 of file config_attribute_value.cpp.

Member Function Documentation

◆ operator()() [1/8]

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

Definition at line 317 of file config_attribute_value.cpp.

References s.

◆ operator()() [2/8]

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

Definition at line 318 of file config_attribute_value.cpp.

References s.

◆ operator()() [3/8]

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

Definition at line 313 of file config_attribute_value.cpp.

References b.

◆ operator()() [4/8]

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

Definition at line 311 of file config_attribute_value.cpp.

References default_.

◆ operator()() [5/8]

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

Definition at line 312 of file config_attribute_value.cpp.

References b.

◆ operator()() [6/8]

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

Definition at line 316 of file config_attribute_value.cpp.

References d.

◆ operator()() [7/8]

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

Definition at line 314 of file config_attribute_value.cpp.

References i.

◆ operator()() [8/8]

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

Definition at line 315 of file config_attribute_value.cpp.

Member Data Documentation

◆ default_

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

Definition at line 306 of file config_attribute_value.cpp.

Referenced by operator()().


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