The Battle for Wesnoth  1.19.0+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 ()
bool is_ancestor (const config &other_replay) const
 checks whether the parameter is an earlier state in the same "savegame gamestate branch" More...

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 18 of file replay_recorder_base.cpp.

◆ ~replay_recorder_base()

replay_recorder_base::~replay_recorder_base ( void  )

Definition at line 27 of file replay_recorder_base.cpp.

Member Function Documentation

◆ add_child()

config & replay_recorder_base::add_child ( )

Definition at line 55 of file replay_recorder_base.cpp.

References commands_, pos_, and size().

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

◆ append_config() [1/2]

void replay_recorder_base::append_config ( config data)

Clears the passed config.

Definition at line 109 of file replay_recorder_base.cpp.

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

◆ append_config() [2/2]

void replay_recorder_base::append_config ( const config data)

Definition at line 97 of file replay_recorder_base.cpp.

References commands_, data, and upload_log_.

Referenced by saved_game::set_data().

◆ delete_upcoming_commands()

void replay_recorder_base::delete_upcoming_commands ( )

Definition at line 142 of file replay_recorder_base.cpp.

References commands_, and pos_.

Referenced by replay::delete_upcoming_commands().

◆ 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 71 of file replay_recorder_base.cpp.

References upload_log_.

Referenced by replay::add_log_data().

◆ insert_command()

config & replay_recorder_base::insert_command ( int  index)

◆ is_ancestor()

bool replay_recorder_base::is_ancestor ( const config other_replay) const

checks whether the parameter is an earlier state in the same "savegame gamestate branch"

Definition at line 147 of file replay_recorder_base.cpp.

References config::child_range(), commands_, and utf8::index().

◆ remove_command()

void replay_recorder_base::remove_command ( int  index)

Definition at line 76 of file replay_recorder_base.cpp.

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

Referenced by replay::remove_command().

◆ 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 28 of file replay_recorder_base.hpp.

References swap().

Referenced by swap().

◆ swap() [2/2]

void replay_recorder_base::swap ( replay_recorder_base other)

Definition at line 32 of file replay_recorder_base.cpp.

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

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

◆ write() [1/2]

void replay_recorder_base::write ( config out) const

Definition at line 134 of file replay_recorder_base.cpp.

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

◆ write() [2/2]

void replay_recorder_base::write ( config_writer out) const

Member Data Documentation

◆ commands_

boost::ptr_vector<config> replay_recorder_base::commands_

◆ pos_

int replay_recorder_base::pos_

◆ upload_log_

config replay_recorder_base::upload_log_

Definition at line 61 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: