summaryrefslogtreecommitdiff
path: root/ACE/ACEXML/parser/debug_validator/Element_Tree.cpp
diff options
context:
space:
mode:
authorWilliam R. Otte <wotte@dre.vanderbilt.edu>2006-07-24 15:50:30 +0000
committerWilliam R. Otte <wotte@dre.vanderbilt.edu>2006-07-24 15:50:30 +0000
commitc44379cc7d9c7aa113989237ab0f56db12aa5219 (patch)
tree66a84b20d47f2269d8bdc6e0323f338763424d3a /ACE/ACEXML/parser/debug_validator/Element_Tree.cpp
parent3aff90f4a822fcf5d902bbfbcc9fa931d6191a8c (diff)
downloadATCD-c44379cc7d9c7aa113989237ab0f56db12aa5219.tar.gz
Repo restructuring
Diffstat (limited to 'ACE/ACEXML/parser/debug_validator/Element_Tree.cpp')
-rw-r--r--ACE/ACEXML/parser/debug_validator/Element_Tree.cpp72
1 files changed, 72 insertions, 0 deletions
diff --git a/ACE/ACEXML/parser/debug_validator/Element_Tree.cpp b/ACE/ACEXML/parser/debug_validator/Element_Tree.cpp
new file mode 100644
index 00000000000..e9275061b52
--- /dev/null
+++ b/ACE/ACEXML/parser/debug_validator/Element_Tree.cpp
@@ -0,0 +1,72 @@
+// $Id$
+
+#include "ACEXML/parser/debug_validator/Element_Tree.h"
+
+#if !defined (__ACEXML_INLINE__)
+# include "ACEXML/parser/debug_validator/Element_Tree.i"
+#endif /* __ACEXML_INLINE__ */
+
+ACEXML_Element_Tree_Node::~ACEXML_Element_Tree_Node ()
+{
+ delete this->next_;
+}
+
+ACE_ALLOC_HOOK_DEFINE (ACEXML_Element_Tree_Node)
+
+void
+ACEXML_Element_Tree_Name_Node::dump ()
+{
+ cout << this->name_;
+}
+
+ACE_ALLOC_HOOK_DEFINE (ACEXML_Element_Tree_Name_Node)
+
+ACEXML_Element_Tree_List_Node::~ACEXML_Element_Tree_List_Node (void)
+{
+ delete this->head_;
+}
+
+int
+ACEXML_Element_Tree_List_Node::insert (ACEXML_Element_Tree_Node *node)
+{
+ if (this->head_ == 0)
+ {
+ this->tail_ = this->head_ = node;
+ }
+ else
+ {
+ this->tail_->next (node);
+ this->tail_ = node;
+ }
+ return 0;
+}
+
+void
+ACEXML_Element_Tree_List_Node::dump (void)
+{
+ ACEXML_Element_Tree_Node *ptr = this->head_;
+ const ACEXML_Char *separator = (this->type_ == SEQUENCE) ? ACE_TEXT(" , ") : ACE_TEXT(" | ");
+
+ cout << "(";
+
+ if (ptr != 0)
+ {
+ ptr->dump ();
+ ptr = ptr->next ();
+
+ while (ptr != 0)
+ {
+ cout << separator;
+ ptr->dump ();
+ ptr->next ();
+ }
+ }
+
+ cout << ")";
+}
+
+ACE_ALLOC_HOOK_DEFINE (ACEXML_Element_Tree_List_Node)
+
+
+
+ACE_ALLOC_HOOK_DEFINE (ACEXML_Element_Tree_List_Stack)