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

content_children Class Reference

implements children content validator More...

#include <xmlmodel.h>

Inheritance diagram for content_children:

content_interface

List of all members.

Public Member Functions

 content_children (const dfa_token *parent, byte_allocator &tmp_allocator)
 constructor
virtual void validate (const xml_element &el)
 validates element

Private Member Functions

content_nodebuild_children_tree (const dfa_token *parent)
 builds children tree
size_t post_tree_build_init (content_node *nodeCur, size_t curIndex)
 initializes current node by index
void calc_follow_list (content_node *curNode)
 calculates follow-up list
void build_dfa (const dfa_token *parent)
 constructs DFA
void make_def_state_list (_vector< size_t > &x) const
 creates default state list

Private Attributes

byte_allocator_tmp_allocator
 temporary allocator
_vector< content_leaf * > _leafList
 list of content leaves
_vector< dfaRule_leafListType
 list of DFA rules
_vector< _bitset_followList
 list of state
size_t _leafCount
 number of leaves
size_t _EOCPos
 end of content flag
bool _emptyOk
 flag if empty content is allowed
_vector< const elementDecl * > _elemMap
 list of element declarations
_vector< dfaRule_elemMapType
 list of DFA rules for elements
size_t _elemMapSize
 size of element list
_vector< leaf_type_leafNameTypeVector
 list of leaf types
_vector< _vector< size_t > > _transTable
 transaction table
size_t _transTableSize
 size of transaction table
_vector< bool > _finalStateFlags
 list of final states


Detailed Description

implements children content validator

Definition at line 290 of file xmlmodel.h.


Constructor & Destructor Documentation

content_children::content_children ( const dfa_token parent,
byte_allocator tmp_allocator 
)

constructor

Parameters:
parent  parent DFA token
tmp_allocator  temporary allocator

Definition at line 242 of file xmlmodel.cpp.

References build_dfa().


Member Function Documentation

content_node * content_children::build_children_tree ( const dfa_token parent  )  [private]

builds children tree

Parameters:
parent  parent DFA token

Definition at line 252 of file xmlmodel.cpp.

References dfa_token::_decl, dfa_token::_first, dfa_token::_last, _leafCount, dfa_token::_rule, _tmp_allocator, byte_allocator::allocate(), DFA_ANY, DFA_ASTERISK, DFA_CHOICE, DFA_LEAF, DFA_PLUS, DFA_QUESTION, and DFA_SEQUENCE.

Referenced by build_dfa().

size_t content_children::post_tree_build_init ( content_node nodeCur,
size_t  curIndex 
) [private]

initializes current node by index

Parameters:
nodeCur  pointer to the content node
curIndex  index

Definition at line 282 of file xmlmodel.cpp.

References _leafCount, _leafList, _leafListType, _tmp_allocator, byte_allocator::allocate(), DFA_ANY, DFA_ASTERISK, DFA_CHOICE, DFA_LEAF, DFA_PLUS, DFA_QUESTION, DFA_SEQUENCE, content_node::get_rule(), and content_node::init().

Referenced by build_dfa().

void content_children::calc_follow_list ( content_node curNode  )  [private]

calculates follow-up list

Parameters:
curNode  pointer to the content node

Definition at line 330 of file xmlmodel.cpp.

References _followList, _leafCount, DFA_ASTERISK, DFA_CHOICE, DFA_PLUS, DFA_QUESTION, DFA_SEQUENCE, base_bitset::get(), content_node::get_firstPos(), content_node::get_lastPos(), and content_node::get_rule().

Referenced by build_dfa().

void content_children::make_def_state_list ( _vector< size_t > &  x  )  const [inline, private]

creates default state list

Parameters:
x  [out] state list

Definition at line 142 of file xmlmodel.hpp.

References _elemMapSize, _tmp_allocator, and _vector< T, A >::resize().

Referenced by build_dfa().


Member Data Documentation

temporary allocator

Definition at line 327 of file xmlmodel.h.

Referenced by build_children_tree(), build_dfa(), make_def_state_list(), and post_tree_build_init().

list of content leaves

Definition at line 328 of file xmlmodel.h.

Referenced by build_dfa(), and post_tree_build_init().

list of DFA rules

Definition at line 329 of file xmlmodel.h.

Referenced by build_dfa(), and post_tree_build_init().

list of state

Definition at line 330 of file xmlmodel.h.

Referenced by build_dfa(), and calc_follow_list().

size_t content_children::_leafCount [private]

number of leaves

Definition at line 331 of file xmlmodel.h.

Referenced by build_children_tree(), build_dfa(), calc_follow_list(), and post_tree_build_init().

size_t content_children::_EOCPos [private]

end of content flag

Definition at line 332 of file xmlmodel.h.

Referenced by build_dfa().

flag if empty content is allowed

Definition at line 333 of file xmlmodel.h.

Referenced by build_dfa(), and validate().

list of element declarations

Definition at line 335 of file xmlmodel.h.

Referenced by build_dfa(), and validate().

list of DFA rules for elements

Definition at line 336 of file xmlmodel.h.

Referenced by build_dfa().

size of element list

Definition at line 337 of file xmlmodel.h.

Referenced by build_dfa(), make_def_state_list(), and validate().

list of leaf types

Definition at line 338 of file xmlmodel.h.

Referenced by build_dfa().

transaction table

Definition at line 339 of file xmlmodel.h.

Referenced by build_dfa(), and validate().

size of transaction table

Definition at line 340 of file xmlmodel.h.

Referenced by build_dfa().

list of final states

Definition at line 341 of file xmlmodel.h.

Referenced by build_dfa(), and validate().


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


© Copyright Terimber 2003-.