Thread portable class


Gate portable class


Timer class


Pool class


Terimber 2.0


About C++


Downloads Products & Services Support Clients Open Source About



Home / Open source / Terimber 2.0

xml_container Class Reference

class with children elements More...

#include <sxml.h>

Inheritance diagram for xml_container:

xml_tree_node xml_node xml_document xml_element

List of all members.

Public Member Functions

 xml_container (const namedNodeDecl *decl, xml_tree_node *parent)
 constructor
void clear ()
 clears content
xml_forceinline xml_tree_nodeadd_node (xml_tree_node *node)
 adds node to the end of children list
xml_forceinline xml_tree_nodeappend_node (xml_tree_node *after, xml_tree_node *node)
 adds node after specified node
xml_forceinline xml_tree_nodeinsert_node (xml_tree_node *before, xml_tree_node *node)
 adds node before specified node
xml_forceinline xml_tree_noderemove_node (xml_tree_node *node)
 removes node from the children list
xml_forceinline bool has_children () const
 checks if node has children
xml_forceinline bool is_container () const
 checks if node is a container

Static Public Member Functions

static xml_forceinline const
xml_container
cast_to_container (const xml_tree_node *x)
 type cast to the const container
static xml_forceinline
xml_container
cast_to_container (xml_tree_node *x)
 type cast to the container

Public Attributes

xml_tree_node_first_child
 pointer to the first child
xml_tree_node_last_child
 pointer to the last child


Detailed Description

class with children elements

Definition at line 140 of file sxml.h.


Constructor & Destructor Documentation

xml_container::xml_container ( const namedNodeDecl decl,
xml_tree_node parent 
)

constructor

Parameters:
decl  pointer to the node declaration
parent  pointer to the parent node

Definition at line 113 of file sxml.cpp.


Member Function Documentation

void xml_container::clear (  ) 

clears content

Reimplemented from xml_tree_node.

Reimplemented in xml_element, and xml_document.

Definition at line 119 of file sxml.cpp.

References _first_child, _last_child, and xml_tree_node::clear().

Referenced by xml_element::clear(), and xml_document::clear().

xml_forceinline xml_tree_node * xml_container::append_node ( xml_tree_node after,
xml_tree_node node 
)

adds node after specified node

Parameters:
after  sibling node
node  node pointer

Definition at line 107 of file sxml.hpp.

References _last_child, xml_tree_node::_left, and xml_tree_node::_right.

Referenced by xml_document::add_cdata(), xml_document::add_comment(), xml_document::add_element(), xml_document::add_pi(), and xml_document::add_text().

xml_forceinline xml_tree_node * xml_container::insert_node ( xml_tree_node before,
xml_tree_node node 
)

adds node before specified node

Parameters:
before  sibling node
node  node pointer

Definition at line 120 of file sxml.hpp.

References _first_child, xml_tree_node::_left, and xml_tree_node::_right.

Referenced by xml_document::add_cdata(), xml_document::add_comment(), xml_document::add_element(), xml_document::add_pi(), and xml_document::add_text().

xml_forceinline xml_tree_node * xml_container::remove_node ( xml_tree_node node  ) 

removes node from the children list

Parameters:
node  node pointer

Definition at line 130 of file sxml.hpp.

References _first_child, _last_child, xml_tree_node::_left, xml_tree_node::_parent, and xml_tree_node::_right.

Referenced by xml_designer_impl::remove_node().

xml_forceinline bool xml_container::has_children (  )  const

xml_forceinline bool xml_container::is_container (  )  const

checks if node is a container

Definition at line 154 of file sxml.hpp.

References xml_node::_decl, DOCUMENT_NODE, ELEMENT_NODE, and nodeDecl::get_type().

xml_forceinline const xml_container * xml_container::cast_to_container ( const xml_tree_node x  )  [static]

type cast to the const container

Parameters:
x  pointer to the tree node

Definition at line 171 of file sxml.hpp.

References xml_node::_decl, DOCUMENT_NODE, ELEMENT_NODE, and nodeDecl::get_type().

Referenced by xml_designer_impl::has_children(), xml_designer_impl::remove_node(), xml_designer_impl::select_first_child(), and xml_designer_impl::select_last_child().

xml_forceinline xml_container * xml_container::cast_to_container ( xml_tree_node x  )  [static]

type cast to the container

Parameters:
x  pointer to the tree node

Definition at line 193 of file sxml.hpp.

References xml_node::_decl, DOCUMENT_NODE, ELEMENT_NODE, and nodeDecl::get_type().


Member Data Documentation

pointer to the last child

Definition at line 195 of file sxml.h.

Referenced by add_node(), append_node(), clear(), remove_node(), and xml_designer_impl::select_last_child().


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


© Copyright Terimber 2003-.