Merge pull request #2216 from jwillemsen/jwi-cxxversionchecks
[ACE_TAO.git] / ACE / ACEXML / parser / debug_validator / Element_Tree.cpp
blobd98812167aaac5d085c2e82fb4a2db0e2fa08f10
1 #include "ACEXML/parser/debug_validator/Element_Tree.h"
3 #if !defined (__ACEXML_INLINE__)
4 # include "ACEXML/parser/debug_validator/Element_Tree.inl"
5 #endif /* __ACEXML_INLINE__ */
7 ACEXML_Element_Tree_Node::~ACEXML_Element_Tree_Node ()
9 delete this->next_;
12 ACE_ALLOC_HOOK_DEFINE (ACEXML_Element_Tree_Node)
14 void
15 ACEXML_Element_Tree_Name_Node::dump ()
17 cout << this->name_;
20 ACE_ALLOC_HOOK_DEFINE (ACEXML_Element_Tree_Name_Node)
22 ACEXML_Element_Tree_List_Node::~ACEXML_Element_Tree_List_Node ()
24 delete this->head_;
27 int
28 ACEXML_Element_Tree_List_Node::insert (ACEXML_Element_Tree_Node *node)
30 if (this->head_ == 0)
32 this->tail_ = this->head_ = node;
34 else
36 this->tail_->next (node);
37 this->tail_ = node;
39 return 0;
42 void
43 ACEXML_Element_Tree_List_Node::dump ()
45 ACEXML_Element_Tree_Node *ptr = this->head_;
46 const ACEXML_Char *separator = (this->type_ == SEQUENCE) ? ACE_TEXT(" , ") : ACE_TEXT(" | ");
48 cout << "(";
50 if (ptr != 0)
52 ptr->dump ();
53 ptr = ptr->next ();
55 while (ptr != 0)
57 cout << separator;
58 ptr->dump ();
59 ptr->next ();
63 cout << ")";
66 ACE_ALLOC_HOOK_DEFINE (ACEXML_Element_Tree_List_Node)
69 ACE_ALLOC_HOOK_DEFINE (ACEXML_Element_Tree_List_Stack)