The Battle for Wesnoth  1.15.2+dev
Public Member Functions | Public Attributes | List of all members
persist_choice Struct Reference
Inheritance diagram for persist_choice:
Inheritance graph

Public Member Functions

 persist_choice (const persist_context &context, const std::string &name, int side_num)
 
virtual config query_user (int) const
 
virtual config random_choice (int) const
 
virtual std::string description () const
 
virtual bool is_visible () const
 whether the choice is visible for the user like an advancement choice a non-visible choice is for example get_global_variable More...
 
- Public Member Functions inherited from mp_sync::user_choice
virtual ~user_choice ()
 

Public Attributes

const persist_contextctx
 
std::string var_name
 
int side
 

Detailed Description

Definition at line 32 of file persist_var.cpp.

Constructor & Destructor Documentation

◆ persist_choice()

persist_choice::persist_choice ( const persist_context context,
const std::string &  name,
int  side_num 
)
inline

Definition at line 36 of file persist_var.cpp.

Member Function Documentation

◆ description()

virtual std::string persist_choice::description ( ) const
inlinevirtual

Reimplemented from mp_sync::user_choice.

Definition at line 53 of file persist_var.cpp.

References _().

◆ is_visible()

virtual bool persist_choice::is_visible ( ) const
inlinevirtual

whether the choice is visible for the user like an advancement choice a non-visible choice is for example get_global_variable

Reimplemented from mp_sync::user_choice.

Definition at line 60 of file persist_var.cpp.

◆ query_user()

virtual config persist_choice::query_user ( int  ) const
inlinevirtual

Implements mp_sync::user_choice.

Definition at line 41 of file persist_var.cpp.

References config::add_child(), persist_context::get_var(), and side.

◆ random_choice()

virtual config persist_choice::random_choice ( int  ) const
inlinevirtual

Implements mp_sync::user_choice.

Definition at line 49 of file persist_var.cpp.

Member Data Documentation

◆ ctx

const persist_context& persist_choice::ctx

◆ side

int persist_choice::side

◆ var_name

std::string persist_choice::var_name

Definition at line 34 of file persist_var.cpp.


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