The Battle for Wesnoth  1.15.1+dev
Public Member Functions | Protected Attributes | List of all members
replay_recorder_base Class Reference

#include <replay_recorder_base.hpp>

Public Member Functions

 replay_recorder_base ()
 
 ~replay_recorder_base ()
 
void swap (replay_recorder_base &other)
 
void swap (replay_recorder_base &&other)
 
int get_pos () const
 
int size () const
 
configget_command_at (int pos)
 
configadd_child ()
 
configget_upload_log ()
 
void remove_command (int index)
 
configinsert_command (int index)
 
void set_to_end ()
 
void set_pos (int pos)
 
void append_config (const config &data)
 
void append_config (config &data)
 Clears the passed config. More...
 
void write (config_writer &out) const
 
void write (config &out) const
 
void delete_upcoming_commands ()
 

Protected Attributes

config upload_log_
 
boost::ptr_vector< configcommands_
 
int pos_
 

Detailed Description

Definition at line 21 of file replay_recorder_base.hpp.

Constructor & Destructor Documentation

◆ replay_recorder_base()

replay_recorder_base::replay_recorder_base ( void  )

Definition at line 17 of file replay_recorder_base.cpp.

◆ ~replay_recorder_base()

replay_recorder_base::~replay_recorder_base ( void  )

Definition at line 26 of file replay_recorder_base.cpp.

Member Function Documentation

◆ add_child()

config & replay_recorder_base::add_child ( )

Definition at line 54 of file replay_recorder_base.cpp.

References commands_, pos_, and size().

Referenced by replay::add_command(), replay::redo(), and swap().

◆ append_config() [1/2]

void replay_recorder_base::append_config ( const config data)

Definition at line 96 of file replay_recorder_base.cpp.

References config::child(), config::child_range(), commands_, and upload_log_.

Referenced by saved_game::set_data(), and swap().

◆ append_config() [2/2]

void replay_recorder_base::append_config ( config data)

Clears the passed config.

Definition at line 108 of file replay_recorder_base.cpp.

References config::child(), config::child_range(), commands_, config::swap(), and upload_log_.

◆ delete_upcoming_commands()

void replay_recorder_base::delete_upcoming_commands ( )

Definition at line 139 of file replay_recorder_base.cpp.

References commands_, and pos_.

Referenced by replay::delete_upcoming_commands(), and swap().

◆ get_command_at()

config & replay_recorder_base::get_command_at ( int  pos)

◆ get_pos()

int replay_recorder_base::get_pos ( ) const

◆ get_upload_log()

config & replay_recorder_base::get_upload_log ( )

Definition at line 70 of file replay_recorder_base.cpp.

References upload_log_.

Referenced by replay::add_log_data(), and swap().

◆ insert_command()

config & replay_recorder_base::insert_command ( int  index)

◆ remove_command()

void replay_recorder_base::remove_command ( int  index)

Definition at line 75 of file replay_recorder_base.cpp.

References commands_, utf8::index(), pos_, and size().

Referenced by replay::remove_command(), and swap().

◆ set_pos()

void replay_recorder_base::set_pos ( int  pos)

◆ set_to_end()

void replay_recorder_base::set_to_end ( )

◆ size()

int replay_recorder_base::size ( ) const

◆ swap() [1/2]

void replay_recorder_base::swap ( replay_recorder_base other)

Definition at line 31 of file replay_recorder_base.cpp.

References commands_, pos_, swap(), config::swap(), and upload_log_.

Referenced by saved_game::clear(), saved_game::swap(), and swap().

◆ swap() [2/2]

void replay_recorder_base::swap ( replay_recorder_base &&  other)
inline

◆ write() [1/2]

void replay_recorder_base::write ( config_writer out) const

◆ write() [2/2]

void replay_recorder_base::write ( config out) const

Definition at line 131 of file replay_recorder_base.cpp.

References config::add_child(), commands_, i, pos_, and upload_log_.

Member Data Documentation

◆ commands_

boost::ptr_vector<config> replay_recorder_base::commands_
protected

◆ pos_

int replay_recorder_base::pos_
protected

◆ upload_log_

config replay_recorder_base::upload_log_
protected

Definition at line 57 of file replay_recorder_base.hpp.

Referenced by append_config(), get_upload_log(), swap(), and write().


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