15 #ifndef SIMPLE_WML_HPP_INCLUDED
16 #define SIMPLE_WML_HPP_INCLUDED
51 const char* i1 =
str_;
53 while(i1 != i2 && *o && *i1 == *o) {
58 return i1 == i2 && *o == 0;
77 for(
int n = 0;
n <
len; ++
n) {
97 bool to_bool(
bool default_value=
false)
const;
128 bool has_attr(
const char* key)
const;
204 : child_map_index(static_cast<unsigned short>(child_map_index)),
205 child_list_index(static_cast<unsigned short>(child_list_index))
void remove_ordered_child(int child_map_index, int child_list_index)
node & add_child(const char *name)
const char * const_iterator
string_span compressed_buf_
std::vector< attribute > attribute_list
string_span output_compressed(bool bzip2=false)
node & set_attr(const char *key, const char *value)
std::ostream & operator<<(std::ostream &o, const string_span &s)
GLint GLint GLsizei GLsizei GLsizei depth
void apply_diff(const node &diff)
std::string to_string() const
void shift_buffers(ptrdiff_t offset)
void output(char *&buf, CACHE_STATUS status=DO_NOT_MODIFY_CACHE)
node(document &doc, node *parent)
void insert_ordered_child(int child_map_index, int child_list_index)
string_span output_cache_
static child_map::const_iterator find_in_map(const child_map &m, const string_span &attr)
std::vector< char * > buffers_
std::pair< string_span, child_list > child_pair
unsigned short child_list_index
int nattributes_recursive() const
node & set_attr_int(const char *key, int value)
const char * dup_string(const char *str)
node & set_attr(const char *key, const char *value)
node & add_child_at(const char *name, size_t index)
int get_children(const string_span &name)
const string_span & first_child() const
bool operator!=(const std::string &o) const
node & set_attr_dup(const char *key, const char *value)
string_span(const char *str, int size)
std::vector< child_pair > child_map
void insert_ordered_child_list(int child_map_index)
node * child(const char *name)
const node * child(const char *name) const
node * child(const char *name)
node_pos(int child_map_index, int child_list_index)
string_span(const char *begin, const char *end)
void remove_child(const char *name, size_t index)
GLsizei const GLfloat * value
bool operator<(const string_span &o) const
bool has_attr(const char *key) const
GLenum GLuint GLsizei const char * buf
void remove_ordered_child_list(int child_map_index)
bool operator==(const char *o) const
void operator=(const document &)
bool operator==(const std::string &o) const
unsigned short child_map_index
const node & root() const
const string_span & operator[](const char *key) const
static std::string stats()
node & set_attr_dup(const char *key, const char *value)
std::vector< node * > child_list
static void msg(const char *act, debug_info &i, const char *to="", const char *result="")
void copy_into(node &n) const
const child_list & children(const char *name) const
bool to_bool(bool default_value=false) const
const char * begin() const
GLuint const GLchar * name
const string_span & operator[](const char *key) const
bool operator!=(const string_span &o) const
void check_ordered_children() const
string_span(const char *str)
std::pair< string_span, string_span > attribute
bool operator!=(const char *o) const
Base class for all the errors encountered by the engine.
bool operator==(const string_span &o) const
void set_doc(document *doc)
const node::child_list & children(const char *name) const
std::vector< node_pos > ordered_children_
const string_span & attr(const char *key) const
void operator=(const node &)
GLsizei const GLcharARB ** string
void take_ownership_of_buffer(char *buffer)
const string_span & attr(const char *key) const
std::string node_to_string(const node &n)