64 assert(pos <=
size());
99 if(
const auto upload_log =
data.optional_child(
"upload_log"))
103 for(
const config& command :
data.child_range(
"command"))
111 if(
auto upload_log =
data.optional_child(
"upload_log"))
115 for(
config& command :
data.child_range(
"command"))
118 new_config->
swap(command);
149 auto other_commands = other_replay.
child_range(
"command");
150 if(other_commands.size() >
commands_.size()) {
Class for writing a config out to a file in pieces.
void write_child(const std::string &key, const config &cfg)
A config object defines a single node in a WML file, with access to child nodes.
child_itors child_range(config_key_type key)
config & add_child(config_key_type key)
void write(config_writer &out) const
void append_config(const config &data)
void delete_upcoming_commands()
config & get_upload_log()
void swap(replay_recorder_base &other)
bool is_ancestor(const config &other_replay) const
checks whether the parameter is an earlier state in the same "savegame gamestate branch"
config & get_command_at(int pos)
config & insert_command(int index)
boost::ptr_vector< config > commands_
void remove_command(int index)
std::size_t index(std::string_view str, const std::size_t index)
Codepoint index corresponding to the nth character in a UTF-8 string.
void swap(replay_recorder_base &lhs, replay_recorder_base &rhs)
Implement non-member swap function for std::swap (calls replay_recorder_base::swap).