#include <parser/debug_validator/Element_Tree.h>
Inheritance diagram for ACEXML_Element_Tree_List_Node:
Public Types | |
SEQUENCE | |
CHOICE | |
enum | LIST_TYPE { SEQUENCE, CHOICE } |
Public Member Functions | |
ACEXML_Element_Tree_List_Node (void) | |
Default constructor. | |
virtual | ~ACEXML_Element_Tree_List_Node (void) |
Destructor. | |
int | insert (ACEXML_Element_Tree_Node *node) |
Insert a new ACEXML_Element_Tree_Node into the list. | |
LIST_TYPE | get (void) |
Get/set the type of list. | |
int | set (LIST_TYPE type) |
virtual void | dump () |
Displaying the content. | |
Public Attributes | |
ACE_ALLOC_HOOK_DECLARE | |
Protected Attributes | |
LIST_TYPE | type_ |
ACEXML_Element_Tree_Node * | head_ |
ACEXML_Element_Tree_Node * | tail_ |
ACEXML_Element_Tree_List_Node * | pop_next_ |
Friends | |
class | ACEXML_Element_Tree_List_Stack |
Definition at line 91 of file Element_Tree.h.
ACEXML_INLINE ACEXML_Element_Tree_List_Node::ACEXML_Element_Tree_List_Node | ( | void | ) |
ACEXML_Element_Tree_List_Node::~ACEXML_Element_Tree_List_Node | ( | void | ) | [virtual] |
Destructor.
Definition at line 24 of file Element_Tree.cpp.
00025 { 00026 delete this->head_; 00027 }
void ACEXML_Element_Tree_List_Node::dump | ( | ) | [virtual] |
Displaying the content.
Implements ACEXML_Element_Tree_Node.
Definition at line 45 of file Element_Tree.cpp.
References ACE_TEXT, ACEXML_Element_Tree_Node::dump(), head_, ACEXML_Element_Tree_Node::next(), SEQUENCE, and type_.
00046 { 00047 ACEXML_Element_Tree_Node *ptr = this->head_; 00048 const ACEXML_Char *separator = (this->type_ == SEQUENCE) ? ACE_TEXT(" , ") : ACE_TEXT(" | "); 00049 00050 cout << "("; 00051 00052 if (ptr != 0) 00053 { 00054 ptr->dump (); 00055 ptr = ptr->next (); 00056 00057 while (ptr != 0) 00058 { 00059 cout << separator; 00060 ptr->dump (); 00061 ptr->next (); 00062 } 00063 } 00064 00065 cout << ")"; 00066 }
ACEXML_INLINE ACEXML_Element_Tree_List_Node::LIST_TYPE ACEXML_Element_Tree_List_Node::get | ( | void | ) |
Get/set the type of list.
Definition at line 45 of file Element_Tree.inl.
References type_.
00046 { 00047 return this->type_; 00048 }
int ACEXML_Element_Tree_List_Node::insert | ( | ACEXML_Element_Tree_Node * | node | ) |
Insert a new ACEXML_Element_Tree_Node into the list.
Definition at line 30 of file Element_Tree.cpp.
References head_, ACEXML_Element_Tree_Node::next(), and tail_.
Referenced by ACEXML_Debug_Element_Builder::insertElement(), ACEXML_Debug_Element_Builder::insertMixedElement(), and ACEXML_Debug_Element_Builder::startChildGroup().
00031 { 00032 if (this->head_ == 0) 00033 { 00034 this->tail_ = this->head_ = node; 00035 } 00036 else 00037 { 00038 this->tail_->next (node); 00039 this->tail_ = node; 00040 } 00041 return 0; 00042 }
ACEXML_INLINE int ACEXML_Element_Tree_List_Node::set | ( | LIST_TYPE | type | ) |
Definition at line 51 of file Element_Tree.inl.
References type_.
Referenced by ACEXML_Debug_Element_Builder::setChoice(), and ACEXML_Debug_Element_Builder::setSequence().
00052 { 00053 this->type_ = type; 00054 return 0; 00055 }
friend class ACEXML_Element_Tree_List_Stack [friend] |
Definition at line 95 of file Element_Tree.h.
Definition at line 125 of file Element_Tree.h.
Referenced by ACEXML_Element_Tree_List_Stack::pop(), and ACEXML_Element_Tree_List_Stack::push().
LIST_TYPE ACEXML_Element_Tree_List_Node::type_ [protected] |