The Battle for Wesnoth  1.19.2+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 () const
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 24 of file playturn_network_adapter.hpp.

Member Typedef Documentation

◆ source_type

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

Definition at line 27 of file playturn_network_adapter.hpp.

Constructor & Destructor Documentation

◆ playturn_network_adapter()

playturn_network_adapter::playturn_network_adapter ( source_type  source)

Definition at line 130 of file playturn_network_adapter.cpp.

◆ ~playturn_network_adapter()

playturn_network_adapter::~playturn_network_adapter ( )

Definition at line 142 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)

Definition at line 172 of file playturn_network_adapter.cpp.

References read_config().

◆ is_at_end()

bool playturn_network_adapter::is_at_end ( ) const

Definition at line 65 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 72 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 ( )

◆ set_source()

void playturn_network_adapter::set_source ( source_type  source)

Definition at line 152 of file playturn_network_adapter.cpp.

References network_reader_.

Member Data Documentation

◆ data_

std::list<config> playturn_network_adapter::data_

Definition at line 53 of file playturn_network_adapter.hpp.

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

◆ data_front_

std::list<config> playturn_network_adapter::data_front_

Definition at line 55 of file playturn_network_adapter.hpp.

Referenced by push_front(), and read().

◆ network_reader_

source_type playturn_network_adapter::network_reader_

Definition at line 46 of file playturn_network_adapter.hpp.

Referenced by read_from_network(), and set_source().

◆ next_

config::all_children_iterator playturn_network_adapter::next_

Definition at line 57 of file playturn_network_adapter.hpp.

Referenced by is_at_end(), and read().

◆ next_command_num_

unsigned int playturn_network_adapter::next_command_num_

Definition at line 60 of file playturn_network_adapter.hpp.

Referenced by read().

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