Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

ACEXML_Element_Tree_List_Node Class Reference

An abstract base class for describing a node list in a DTD child element definition. More...

#include "parser/debug_validator/Element_Tree.h"

Inheritance diagram for ACEXML_Element_Tree_List_Node:

Inheritance graph
[legend]
Collaboration diagram for ACEXML_Element_Tree_List_Node:

Collaboration graph
[legend]
List of all members.

Public Types

enum  LIST_TYPE { SEQUENCE, CHOICE }

Public Methods

 ACEXML_Element_Tree_List_Node (void)
 Default constructor. More...

virtual ~ACEXML_Element_Tree_List_Node (void)
 Destructor. More...

int insert (ACEXML_Element_Tree_Node *node)
 Insert a new ACEXML_Element_Tree_Node into the list. More...

LIST_TYPE get (void)
 Get/set the type of list. More...

int set (LIST_TYPE type)
virtual void dump ()
 Displaying the content. More...


Public Attributes

 ACE_ALLOC_HOOK_DECLARE

Protected Attributes

LIST_TYPE type_
ACEXML_Element_Tree_Nodehead_
ACEXML_Element_Tree_Nodetail_
ACEXML_Element_Tree_List_Node * pop_next_

Friends

class ACEXML_Element_Tree_List_Stack

Detailed Description

An abstract base class for describing a node list in a DTD child element definition.

See also:
ACEXML_Element_Tree_Node, ACEXML_Element_Tree_Name_Node

Definition at line 91 of file Element_Tree.h.


Member Enumeration Documentation

enum ACEXML_Element_Tree_List_Node::LIST_TYPE
 

Enumeration values:
SEQUENCE 
CHOICE 

Definition at line 97 of file Element_Tree.h.

Referenced by set.

00097                {
00098     SEQUENCE,
00099     CHOICE
00100   } LIST_TYPE;


Constructor & Destructor Documentation

ACEXML_INLINE ACEXML_Element_Tree_List_Node::ACEXML_Element_Tree_List_Node void   
 

Default constructor.

Definition at line 36 of file Element_Tree.i.

00037   : type_ (SEQUENCE),
00038     head_ (0),
00039     tail_ (0),
00040     pop_next_ (0)
00041 {
00042 }

ACEXML_Element_Tree_List_Node::~ACEXML_Element_Tree_List_Node void    [virtual]
 

Destructor.

Definition at line 24 of file Element_Tree.cpp.

References head_.

00025 {
00026   delete this->head_;
00027 }


Member Function Documentation

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_Char, 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.i.

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::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.i.

References LIST_TYPE, and type_.

Referenced by ACEXML_Debug_Element_Builder::setChoice, and ACEXML_Debug_Element_Builder::setSequence.

00052 {
00053   this->type_ = type;
00054   return 0;
00055 }


Friends And Related Function Documentation

friend class ACEXML_Element_Tree_List_Stack [friend]
 

Definition at line 95 of file Element_Tree.h.


Member Data Documentation

ACEXML_Element_Tree_List_Node::ACE_ALLOC_HOOK_DECLARE
 

Reimplemented from ACEXML_Element_Tree_Node.

Definition at line 117 of file Element_Tree.h.

ACEXML_Element_Tree_Node* ACEXML_Element_Tree_List_Node::head_ [protected]
 

Definition at line 121 of file Element_Tree.h.

Referenced by dump, insert, and ~ACEXML_Element_Tree_List_Node.

ACEXML_Element_Tree_List_Node* ACEXML_Element_Tree_List_Node::pop_next_ [protected]
 

Definition at line 125 of file Element_Tree.h.

Referenced by ACEXML_Element_Tree_List_Stack::pop, and ACEXML_Element_Tree_List_Stack::push.

ACEXML_Element_Tree_Node* ACEXML_Element_Tree_List_Node::tail_ [protected]
 

Definition at line 123 of file Element_Tree.h.

Referenced by insert.

LIST_TYPE ACEXML_Element_Tree_List_Node::type_ [protected]
 

Definition at line 119 of file Element_Tree.h.

Referenced by dump, get, and set.


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 13:26:46 2003 for ACEXML by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002