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

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(), ctx, persist_context::get_var(), side, and var_name.

◆ 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

Definition at line 33 of file persist_var.cpp.

Referenced by query_user().

◆ side

int persist_choice::side

Definition at line 35 of file persist_var.cpp.

Referenced by query_user().

◆ var_name

std::string persist_choice::var_name

Definition at line 34 of file persist_var.cpp.

Referenced by query_user().


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