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 174 of file simple_wml.hpp.


Constructor & Destructor Documentation

simple_wml::document::document (  ) 

Definition at line 699 of file simple_wml.cpp.

References attach_list().

Referenced by clone().

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 
)

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

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]


Member Function Documentation

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

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

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

Definition at line 184 of file simple_wml.hpp.

References generate_root(), and root_.

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

string_span simple_wml::document::output_compressed (  ) 

void simple_wml::document::compress (  ) 

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]

Definition at line 193 of file simple_wml.hpp.

References root().

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

Definition at line 197 of file simple_wml.hpp.

References root().

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

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

Definition at line 205 of file simple_wml.hpp.

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

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

Definition at line 209 of file simple_wml.hpp.

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

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]

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]

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().


Member Data Documentation

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 239 of file simple_wml.hpp.

Referenced by attach_list(), and detach_list().

Definition at line 240 of file simple_wml.hpp.

Referenced by attach_list(), detach_list(), and stats().


The documentation for this class was generated from the following files:

Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs