The Battle for Wesnoth  1.15.2+dev
Public Member Functions | List of all members
mp_sync::user_choice Struct Referenceabstract

Interface for querying local choices. More...

#include <synced_user_choice.hpp>

Inheritance diagram for mp_sync::user_choice:
Inheritance graph

Public Member Functions

virtual ~user_choice ()
 
virtual config query_user (int side) const =0
 
virtual config random_choice (int side) const =0
 
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...
 
virtual std::string description () const
 

Detailed Description

Interface for querying local choices.

It has to support querying the user and making a random choice

Definition at line 31 of file synced_user_choice.hpp.

Constructor & Destructor Documentation

◆ ~user_choice()

virtual mp_sync::user_choice::~user_choice ( )
inlinevirtual

Definition at line 33 of file synced_user_choice.hpp.

References query_user(), and random_choice().

Member Function Documentation

◆ description()

virtual std::string mp_sync::user_choice::description ( ) const
inlinevirtual

◆ is_visible()

virtual bool mp_sync::user_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 in persist_choice.

Definition at line 38 of file synced_user_choice.hpp.

Referenced by mp_sync::get_user_choice().

◆ query_user()

virtual config mp_sync::user_choice::query_user ( int  side) const
pure virtual

◆ random_choice()

virtual config mp_sync::user_choice::random_choice ( int  side) const
pure virtual

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