The Battle for Wesnoth  1.15.1+dev
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
playturn_network_adapter Class Reference

#include <playturn_network_adapter.hpp>

Public Types

typedef std::function< bool(config &)> source_type
 

Public Member Functions

 playturn_network_adapter (source_type source)
 
 ~playturn_network_adapter ()
 
bool read (config &dst)
 
bool is_at_end ()
 
void set_source (source_type source)
 
void push_front (config &&cfg)
 

Static Public Member Functions

static source_type get_source_from_config (config &src)
 

Private Member Functions

void read_from_network ()
 

Private Attributes

source_type network_reader_
 
std::list< configdata_
 
std::list< configdata_front_
 
config::all_children_iterator next_
 
unsigned int next_command_num_
 

Detailed Description

Definition at line 23 of file playturn_network_adapter.hpp.

Member Typedef Documentation

◆ source_type

typedef std::function<bool(config&)> playturn_network_adapter::source_type

Definition at line 26 of file playturn_network_adapter.hpp.

Constructor & Destructor Documentation

◆ playturn_network_adapter()

playturn_network_adapter::playturn_network_adapter ( source_type  source)

Definition at line 127 of file playturn_network_adapter.cpp.

References data_, data_front_, next_, and next_command_num_.

◆ ~playturn_network_adapter()

playturn_network_adapter::~playturn_network_adapter ( )

Definition at line 139 of file playturn_network_adapter.cpp.

References is_at_end(), and LOG_NW.

Member Function Documentation

◆ get_source_from_config()

playturn_network_adapter::source_type playturn_network_adapter::get_source_from_config ( config src)
static

Definition at line 169 of file playturn_network_adapter.cpp.

References read_config().

Referenced by playmp_controller::wait_for_upload().

◆ is_at_end()

bool playturn_network_adapter::is_at_end ( )

Definition at line 62 of file playturn_network_adapter.cpp.

References data_, and next_.

Referenced by read(), and ~playturn_network_adapter().

◆ push_front()

void playturn_network_adapter::push_front ( config &&  cfg)

Definition at line 69 of file playturn_network_adapter.cpp.

References data_front_.

Referenced by playmp_controller::process_network_data().

◆ read()

bool playturn_network_adapter::read ( config dst)

◆ read_from_network()

void playturn_network_adapter::read_from_network ( )
private

◆ set_source()

void playturn_network_adapter::set_source ( source_type  source)

Definition at line 149 of file playturn_network_adapter.cpp.

References network_reader_.

Referenced by playmp_controller::wait_for_upload().

Member Data Documentation

◆ data_

std::list<config> playturn_network_adapter::data_
private

◆ data_front_

std::list<config> playturn_network_adapter::data_front_
private

Definition at line 54 of file playturn_network_adapter.hpp.

Referenced by playturn_network_adapter(), push_front(), and read().

◆ network_reader_

source_type playturn_network_adapter::network_reader_
private

Definition at line 45 of file playturn_network_adapter.hpp.

Referenced by read_from_network(), and set_source().

◆ next_

config::all_children_iterator playturn_network_adapter::next_
private

Definition at line 56 of file playturn_network_adapter.hpp.

Referenced by is_at_end(), playturn_network_adapter(), and read().

◆ next_command_num_

unsigned int playturn_network_adapter::next_command_num_
private

Definition at line 59 of file playturn_network_adapter.hpp.

Referenced by playturn_network_adapter(), and read().


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