Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes

simple_wml::document Class Reference

#include <simple_wml.hpp>

Collaboration diagram for simple_wml::document:
Collaboration graph
[legend]

List of all members.

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)
noderoot ()
const noderoot () const
const char * output ()
string_span output_compressed ()
void compress ()
documentclone ()
const string_spanoperator[] (const char *key) const
const string_spanattr (const char *key) const
nodechild (const char *name)
const nodechild (const char *name) const
nodeset_attr (const char *key, const char *value)
nodeset_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_
noderoot_
documentprev_
documentnext_

Detailed Description

Definition at line 210 of file simple_wml.hpp.


Constructor & Destructor Documentation

simple_wml::document::document (  ) 

Definition at line 909 of file simple_wml.cpp.

References attach_list().

Referenced by clone().

Here is the call graph for this function:

Here is the caller graph for this function:

simple_wml::document::document ( char *  buf,
INIT_BUFFER_CONTROL  control = INIT_TAKE_OWNERSHIP 
) [explicit]

Definition at line 920 of file simple_wml.cpp.

References attach_list(), buffers_, simple_wml::INIT_TAKE_OWNERSHIP, and root_.

Here is the call graph for this function:

simple_wml::document::document ( const char *  buf,
INIT_STATE  state 
)

Definition at line 937 of file simple_wml.cpp.

References attach_list(), simple_wml::INIT_COMPRESSED, output_, output_compressed(), and root_.

Here is the call graph for this function:

simple_wml::document::document ( string_span  compressed_buf  )  [explicit]

Definition at line 955 of file simple_wml.cpp.

References attach_list(), simple_wml::string_span::begin(), buffers_, output_, and root_.

Here is the call graph for this function:

simple_wml::document::~document (  ) 

Definition at line 978 of file simple_wml.cpp.

References buffers_, detach_list(), and root_.

Here is the call graph for this function:

simple_wml::document::document ( const document  )  [private]

Member Function Documentation

void simple_wml::document::attach_list (  )  [private]

Definition at line 1125 of file simple_wml.cpp.

References next_, and prev_.

Referenced by document().

Here is the caller graph for this function:

const string_span& simple_wml::document::attr ( const char *  key  )  const [inline]

Definition at line 233 of file simple_wml.hpp.

References root().

Here is the call graph for this function:

node* simple_wml::document::child ( const char *  name  )  [inline]
const node* simple_wml::document::child ( const char *  name  )  const [inline]

Definition at line 241 of file simple_wml.hpp.

References simple_wml::node::child(), and root().

Here is the call graph for this function:

void simple_wml::document::clear (  ) 

Definition at line 1108 of file simple_wml.cpp.

References buffers_, compressed_buf_, output_, and root_.

Referenced by server::process_data_game().

Here is the caller graph for this function:

document * simple_wml::document::clone (  ) 

Definition at line 1090 of file simple_wml.cpp.

References document(), and output().

Referenced by wesnothd::game::process_turn().

Here is the call graph for this function:

Here is the caller graph for this function:

void simple_wml::document::compress (  ) 

Definition at line 1057 of file simple_wml.cpp.

References simple_wml::string_span::begin(), buffers_, compressed_buf_, output_, output_compressed(), and root_.

Referenced by wesnothd::game::record_data(), and wesnothd::game::send_history().

Here is the call graph for this function:

Here is the caller graph for this function:

void simple_wml::document::detach_list (  )  [private]

Definition at line 1136 of file simple_wml.cpp.

References next_, and prev_.

Referenced by ~document().

Here is the caller graph for this function:

const char * simple_wml::document::dup_string ( const char *  str  ) 

Definition at line 990 of file simple_wml.cpp.

References buffers_.

Referenced by simple_wml::node::set_attr_dup().

Here is the caller graph for this function:

void simple_wml::document::generate_root (  )  [private]

Definition at line 1076 of file simple_wml.cpp.

References buffers_, compressed_buf_, simple_wml::string_span::empty(), output_, and root_.

Referenced by root().

Here is the call graph for this function:

Here is the caller graph for this function:

void simple_wml::document::operator= ( const document  )  [private]
const string_span& simple_wml::document::operator[] ( const char *  key  )  const [inline]

Definition at line 229 of file simple_wml.hpp.

References root().

Here is the call graph for this function:

const char * simple_wml::document::output (  ) 
string_span simple_wml::document::output_compressed (  ) 

Definition at line 1043 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(), document(), and wesnothd::game::send_history().

Here is the call graph for this function:

Here is the caller graph for this function:

const node& simple_wml::document::root (  )  const [inline]

Definition at line 220 of file simple_wml.hpp.

References generate_root(), and root_.

Here is the call graph for this function:

node& simple_wml::document::root (  )  [inline]
node& simple_wml::document::set_attr ( const char *  key,
const char *  value 
) [inline]

Definition at line 245 of file simple_wml.hpp.

References root(), and simple_wml::node::set_attr().

Here is the call graph for this function:

node& simple_wml::document::set_attr_dup ( const char *  key,
const char *  value 
) [inline]

Definition at line 249 of file simple_wml.hpp.

References root(), and simple_wml::node::set_attr_dup().

Here is the call graph for this function:

std::string simple_wml::document::stats (  )  [static]

Definition at line 1152 of file simple_wml.cpp.

References simple_wml::string_span::size().

Referenced by server::wml_handler().

Here is the call graph for this function:

Here is the caller graph for this function:

void simple_wml::document::swap ( document o  ) 

Definition at line 1097 of file simple_wml.cpp.

References buffers_, compressed_buf_, output_, root_, and simple_wml::node::set_doc().

Referenced by server::process_data_game().

Here is the call graph for this function:

Here is the caller graph for this function:

void simple_wml::document::take_ownership_of_buffer ( char *  buffer  )  [inline]

Definition at line 253 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().

Here is the caller graph for this function:


Member Data Documentation

std::vector<char*> simple_wml::document::buffers_ [private]

Definition at line 267 of file simple_wml.hpp.

Referenced by clear(), compress(), generate_root(), output(), output_compressed(), and swap().

Definition at line 276 of file simple_wml.hpp.

Referenced by attach_list(), and detach_list().

const char* simple_wml::document::output_ [private]

Definition at line 268 of file simple_wml.hpp.

Referenced by clear(), compress(), document(), generate_root(), output(), and swap().

Definition at line 275 of file simple_wml.hpp.

Referenced by attach_list(), and detach_list().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Thu May 24 2012 01:25:56 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs