#include <simple_wml.hpp>
Public Member Functions | |
document () | |
document (char *buf, INIT_BUFFER_CONTROL control=INIT_TAKE_OWNERSHIP) | |
document (const char *buf, INIT_STATE state) | |
document (string_span compressed_buf) | |
~document () | |
const char * | dup_string (const char *str) |
node & | root () |
const node & | root () const |
const char * | output () |
string_span | output_compressed (bool bzip2=false) |
void | compress () |
document * | clone () |
const string_span & | operator[] (const char *key) const |
const string_span & | attr (const char *key) const |
node * | child (const char *name) |
const node * | child (const char *name) const |
const node::child_list & | children (const char *name) const |
node & | set_attr (const char *key, const char *value) |
node & | set_attr_dup (const char *key, const char *value) |
void | take_ownership_of_buffer (char *buffer) |
void | swap (document &o) |
void | clear () |
Static Public Member Functions | |
static std::string | stats () |
Private Member Functions | |
void | generate_root () |
document (const document &) | |
void | operator= (const document &) |
void | attach_list () |
void | detach_list () |
Private Attributes | |
string_span | compressed_buf_ |
const char * | output_ |
std::vector< char * > | buffers_ |
node * | root_ |
document * | prev_ |
document * | next_ |
Definition at line 230 of file simple_wml.hpp.
simple_wml::document::document | ( | ) |
|
explicit |
Definition at line 949 of file simple_wml.cpp.
References attach_list(), buffers_, simple_wml::INIT_TAKE_OWNERSHIP, and root_.
simple_wml::document::document | ( | const char * | buf, |
INIT_STATE | state | ||
) |
Definition at line 966 of file simple_wml.cpp.
References attach_list(), simple_wml::INIT_COMPRESSED, output_, output_compressed(), and root_.
|
explicit |
Definition at line 984 of file simple_wml.cpp.
References attach_list(), simple_wml::string_span::begin(), buffers_, output_, and root_.
simple_wml::document::~document | ( | ) |
Definition at line 1007 of file simple_wml.cpp.
References buffers_, detach_list(), i, and root_.
|
private |
|
private |
Definition at line 1154 of file simple_wml.cpp.
Referenced by document().
|
inline |
Definition at line 253 of file simple_wml.hpp.
References root().
Referenced by wesnothd::server::handle_player_in_game().
|
inline |
Definition at line 257 of file simple_wml.hpp.
References simple_wml::node::child(), and root().
Referenced by wesnothd::async_send_error(), wesnothd::async_send_warning(), wesnothd::server::cleanup_game(), wesnothd::server::handle_join_game(), wesnothd::server::handle_player_in_game(), wesnothd::game::level_init(), wesnothd::make_add_diff(), wesnothd::make_change_diff(), wesnothd::make_delete_diff(), wesnothd::game::process_change_turns_wml(), wesnothd::game::process_whiteboard(), wesnothd::game::save_replay(), and wesnothd::server::update_game_in_lobby().
|
inline |
Definition at line 261 of file simple_wml.hpp.
References simple_wml::node::child(), and root().
|
inline |
Definition at line 265 of file simple_wml.hpp.
References simple_wml::node::children(), and root().
Referenced by wesnothd::server::handle_player_in_game().
void simple_wml::document::clear | ( | ) |
Definition at line 1137 of file simple_wml.cpp.
References buffers_, compressed_buf_, i, output_, and root_.
Referenced by wesnothd::server::handle_player_in_game().
document * simple_wml::document::clone | ( | ) |
Definition at line 1119 of file simple_wml.cpp.
References document(), and output().
Referenced by wesnothd::async_send_doc(), wesnothd::game::change_controller(), wesnothd::game::process_turn(), and wesnothd::send_to_player().
void simple_wml::document::compress | ( | ) |
Definition at line 1086 of file simple_wml.cpp.
References simple_wml::string_span::begin(), buffers_, compressed_buf_, i, output_, output_compressed(), and root_.
Referenced by wesnothd::game::record_data(), and wesnothd::game::send_history().
|
private |
Definition at line 1165 of file simple_wml.cpp.
Referenced by ~document().
const char * simple_wml::document::dup_string | ( | const char * | str | ) |
Definition at line 1019 of file simple_wml.cpp.
References buffers_.
Referenced by simple_wml::node::set_attr_dup().
|
private |
Definition at line 1105 of file simple_wml.cpp.
References buffers_, compressed_buf_, simple_wml::string_span::empty(), output_, and root_.
Referenced by root().
|
inline |
Definition at line 249 of file simple_wml.hpp.
References root().
const char * simple_wml::document::output | ( | ) |
Definition at line 1028 of file simple_wml.cpp.
References buffers_, compressed_buf_, e, simple_wml::string_span::empty(), ERR_SWML, error(), i, simple_wml::node::is_dirty(), simple_wml::node::output(), output_, simple_wml::node::output_size(), simple_wml::node::REFRESH_CACHE, and root_.
Referenced by clone(), wesnothd::server::handle_player_in_game(), output_compressed(), and wesnothd::game::save_replay().
string_span simple_wml::document::output_compressed | ( | bool | bzip2 = false | ) |
Definition at line 1072 of file simple_wml.cpp.
References simple_wml::string_span::begin(), buffers_, compressed_buf_, simple_wml::string_span::empty(), simple_wml::node::is_dirty(), output(), and root_.
Referenced by compress(), and document().
|
inline |
Definition at line 239 of file simple_wml.hpp.
References generate_root(), and root_.
Referenced by wesnothd::server::add_player(), wesnothd::game::add_player(), wesnothd::server::adminmsg_handler(), wesnothd::game::allow_observers(), wesnothd::async_send_error(), wesnothd::async_send_warning(), attr(), wesnothd::game::change_controller(), child(), children(), wesnothd::server::create_game(), wesnothd::server::delete_game(), wesnothd::game::get_sides_list(), wesnothd::game::handle_controller_choice(), wesnothd::server::handle_create_game(), wesnothd::server::handle_join_game(), wesnothd::server::handle_login(), wesnothd::server::handle_message(), wesnothd::server::handle_nickserv(), wesnothd::server::handle_player_in_game(), wesnothd::game::handle_random_choice(), wesnothd::server::handle_whisper(), wesnothd::game::load_next_scenario(), wesnothd::make_add_diff(), wesnothd::make_change_diff(), wesnothd::make_delete_diff(), wesnothd::game::notify_new_host(), operator[](), wesnothd::server::pm_handler(), wesnothd::room_manager::process_message(), wesnothd::game::process_message(), wesnothd::room_manager::process_room_join(), wesnothd::room_manager::process_room_part(), wesnothd::room_manager::process_room_query(), wesnothd::game::process_turn(), wesnothd::server::read_version(), wesnothd::game::registered_users_only(), wesnothd::server::remove_player(), wesnothd::game::remove_player(), wesnothd::game::save_replay(), wesnothd::game::send_observerjoins(), wesnothd::game::send_observerquit(), wesnothd::send_server_message(), wesnothd::room::send_server_message(), wesnothd::game::send_server_message(), wesnothd::game::send_taken_side(), wesnothd::game::send_user_list(), set_attr(), set_attr_dup(), wesnothd::game::start_game(), wesnothd::game::take_side(), wesnothd::game::transfer_side_control(), and wesnothd::room_manager::unstore_player_rooms().
|
inline |
Definition at line 240 of file simple_wml.hpp.
References generate_root(), and root_.
|
inline |
Definition at line 269 of file simple_wml.hpp.
References root(), and simple_wml::node::set_attr().
Referenced by wesnothd::server::read_version().
|
inline |
Definition at line 273 of file simple_wml.hpp.
References root(), and simple_wml::node::set_attr_dup().
Referenced by wesnothd::game::save_replay().
|
static |
Definition at line 1181 of file simple_wml.cpp.
References d.
Referenced by wesnothd::server::wml_handler().
Definition at line 1126 of file simple_wml.cpp.
References buffers_, compressed_buf_, output_, root_, simple_wml::node::set_doc(), and swap().
Referenced by wesnothd::server::handle_player_in_game().
|
inline |
Definition at line 277 of file simple_wml.hpp.
References buffers_.
Referenced by simple_wml::node::apply_diff(), simple_wml::node::copy_into(), and simple_wml::node::set_attr_dup().
|
private |
Definition at line 293 of file simple_wml.hpp.
Referenced by clear(), compress(), document(), dup_string(), generate_root(), output(), output_compressed(), swap(), take_ownership_of_buffer(), and ~document().
|
private |
Definition at line 291 of file simple_wml.hpp.
Referenced by clear(), compress(), generate_root(), output(), output_compressed(), and swap().
|
private |
Definition at line 300 of file simple_wml.hpp.
Referenced by attach_list(), and detach_list().
|
private |
Definition at line 292 of file simple_wml.hpp.
Referenced by clear(), compress(), document(), generate_root(), output(), and swap().
|
private |
Definition at line 299 of file simple_wml.hpp.
Referenced by attach_list(), and detach_list().
|
private |
Definition at line 294 of file simple_wml.hpp.
Referenced by clear(), compress(), document(), generate_root(), output(), output_compressed(), root(), swap(), and ~document().