#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 () |
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 |
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 174 of file simple_wml.hpp.
simple_wml::document::document | ( | ) |
simple_wml::document::document | ( | char * | buf, | |
INIT_BUFFER_CONTROL | control = INIT_TAKE_OWNERSHIP | |||
) | [explicit] |
Definition at line 705 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 716 of file simple_wml.cpp.
References attach_list(), simple_wml::INIT_COMPRESSED, output_, output_compressed(), and root_.
simple_wml::document::document | ( | string_span | compressed_buf | ) | [explicit] |
Definition at line 730 of file simple_wml.cpp.
References attach_list(), simple_wml::string_span::begin(), buffers_, output_, root_, and simple_wml::uncompress_buffer().
simple_wml::document::~document | ( | ) |
Definition at line 750 of file simple_wml.cpp.
References buffers_, simple_wml::debug_delete(), detach_list(), and root_.
simple_wml::document::document | ( | const document & | ) | [private] |
const char * simple_wml::document::dup_string | ( | const char * | str | ) |
Definition at line 762 of file simple_wml.cpp.
References buffers_.
Referenced by simple_wml::node::set_attr_dup(), and simple_wml::node::set_attr_dup_key_and_value().
node& simple_wml::document::root | ( | ) | [inline] |
Definition at line 183 of file simple_wml.hpp.
References generate_root(), and root_.
Referenced by game::add_player(), attr(), child(), server::delete_game(), game::describe_slots(), game::is_on_team(), game::load_next_scenario(), make_add_diff(), make_change_diff(), make_delete_diff(), game::notify_new_host(), operator[](), server::process_data(), server::process_data_game(), server::process_data_lobby(), server::process_login(), game::process_message(), game::process_turn(), server::process_whisper(), game::remove_player(), server::run(), game::send_change_controller(), server::send_error(), server::send_error_dup(), game::send_observerjoins(), game::send_observerquit(), game::send_server_message(), game::send_user_list(), set_attr(), set_attr_dup(), game::start_game(), game::take_side(), game::transfer_ai_sides(), game::transfer_side_control(), server::update_game_in_lobby(), and game::update_side_data().
const node& simple_wml::document::root | ( | ) | const [inline] |
const char * simple_wml::document::output | ( | ) |
Definition at line 771 of file simple_wml.cpp.
References buf, buffers_, compressed_buf_, simple_wml::string_span::empty(), simple_wml::node::is_dirty(), simple_wml::node::output(), output_, simple_wml::node::output_size(), root_, and simple_wml::uncompress_buffer().
Referenced by clone(), output_compressed(), server::process_data_game(), and game::process_turn().
string_span simple_wml::document::output_compressed | ( | ) |
Definition at line 808 of file simple_wml.cpp.
References simple_wml::string_span::begin(), buffers_, simple_wml::compress_buffer(), compressed_buf_, simple_wml::string_span::empty(), simple_wml::node::is_dirty(), output(), and root_.
Referenced by game::add_player(), game::ban_user(), compress(), document(), game::notify_new_host(), proxy::received_data(), game::send_data(), game::send_data_observers(), game::send_data_team(), send_doc(), server::send_error(), server::send_error_dup(), game::send_history(), game::send_observerjoins(), game::send_to_one(), game::take_side(), and game::transfer_ai_sides().
void simple_wml::document::compress | ( | ) |
Definition at line 822 of file simple_wml.cpp.
References simple_wml::string_span::begin(), buffers_, compressed_buf_, simple_wml::debug_delete(), output_, output_compressed(), and root_.
Referenced by game::record_data(), and game::send_history().
document * simple_wml::document::clone | ( | ) |
Definition at line 855 of file simple_wml.cpp.
References buf, document(), and output().
Referenced by game::process_turn().
const string_span& simple_wml::document::operator[] | ( | const char * | key | ) | const [inline] |
const string_span& simple_wml::document::attr | ( | const char * | key | ) | const [inline] |
node* simple_wml::document::child | ( | const char * | name | ) | [inline] |
Definition at line 201 of file simple_wml.hpp.
References simple_wml::node::child(), and root().
Referenced by server::delete_game(), game::level_init(), server::process_data_game(), server::process_data_lobby(), server::process_login(), and game::set_termination_reason().
const node* simple_wml::document::child | ( | const char * | name | ) | const [inline] |
node& simple_wml::document::set_attr | ( | const char * | key, | |
const char * | value | |||
) | [inline] |
node& simple_wml::document::set_attr_dup | ( | const char * | key, | |
const char * | value | |||
) | [inline] |
Definition at line 213 of file simple_wml.hpp.
References root(), and simple_wml::node::set_attr_dup().
void simple_wml::document::take_ownership_of_buffer | ( | char * | buffer | ) | [inline] |
Definition at line 217 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().
void simple_wml::document::swap | ( | document & | o | ) |
Definition at line 862 of file simple_wml.cpp.
References buffers_, compressed_buf_, output_, root_, and simple_wml::node::set_doc().
Referenced by server::process_data_game().
void simple_wml::document::clear | ( | void | ) |
Definition at line 873 of file simple_wml.cpp.
References buffers_, compressed_buf_, simple_wml::debug_delete(), output_, and root_.
Referenced by server::process_data_game().
std::string simple_wml::document::stats | ( | ) | [static] |
Definition at line 917 of file simple_wml.cpp.
References simple_wml::head_doc, and next_.
Referenced by server::process_command().
void simple_wml::document::generate_root | ( | ) | [private] |
Definition at line 841 of file simple_wml.cpp.
References buffers_, compressed_buf_, simple_wml::string_span::empty(), output_, root_, and simple_wml::uncompress_buffer().
Referenced by root().
void simple_wml::document::operator= | ( | const document & | ) | [private] |
void simple_wml::document::attach_list | ( | ) | [private] |
Definition at line 890 of file simple_wml.cpp.
References simple_wml::head_doc, next_, and prev_.
Referenced by document().
void simple_wml::document::detach_list | ( | ) | [private] |
Definition at line 901 of file simple_wml.cpp.
References simple_wml::head_doc, next_, and prev_.
Referenced by ~document().
Definition at line 231 of file simple_wml.hpp.
Referenced by clear(), compress(), generate_root(), output(), output_compressed(), and swap().
const char* simple_wml::document::output_ [private] |
Definition at line 232 of file simple_wml.hpp.
Referenced by clear(), compress(), document(), generate_root(), output(), and swap().
std::vector<char*> simple_wml::document::buffers_ [private] |
Definition at line 233 of file simple_wml.hpp.
Referenced by clear(), compress(), document(), dup_string(), generate_root(), output(), output_compressed(), swap(), take_ownership_of_buffer(), and ~document().
node* simple_wml::document::root_ [private] |
Definition at line 234 of file simple_wml.hpp.
Referenced by clear(), compress(), document(), generate_root(), output(), output_compressed(), root(), swap(), and ~document().
document* simple_wml::document::prev_ [private] |
document* simple_wml::document::next_ [private] |
Definition at line 240 of file simple_wml.hpp.
Referenced by attach_list(), detach_list(), and stats().
Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |