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

ACEXML_Namespace_Context_Stack Class Reference

ACEXML_Namespace_Context_Stack implements a simple stack that ACEXML_NamespaceSupport uses to keep track of namespace scopes. More...

#include "ACEXML/common/NamespaceSupport.h"

List of all members.

Public Methods

 ACEXML_Namespace_Context_Stack (void)
 Default constructor. More...

 ~ACEXML_Namespace_Context_Stack (void)
 Destructor. More...

int push (ACEXML_NS_CONTEXT *old)
 Push the old namespace before entering into a new namespace scope. More...

ACEXML_NS_CONTEXTpop (void)
 Pop the old namespace when exiting a namespace scope. More...


Private Attributes

NS_Node_Thead_
 Anchor point for head of stack. More...


Detailed Description

ACEXML_Namespace_Context_Stack implements a simple stack that ACEXML_NamespaceSupport uses to keep track of namespace scopes.

See also:
ACEXML_NamespaceSupport

Definition at line 60 of file NamespaceSupport.h.


Constructor & Destructor Documentation

ACEXML_Namespace_Context_Stack::ACEXML_Namespace_Context_Stack void   
 

Default constructor.

Definition at line 23 of file NamespaceSupport.cpp.

00024   : head_ (0)
00025 {
00026 }

ACEXML_Namespace_Context_Stack::~ACEXML_Namespace_Context_Stack void   
 

Destructor.

Definition at line 28 of file NamespaceSupport.cpp.

00029 {
00030   // Clean up stuff.
00031 }


Member Function Documentation

ACEXML_NS_CONTEXT * ACEXML_Namespace_Context_Stack::pop void   
 

Pop the old namespace when exiting a namespace scope.

Definition at line 47 of file NamespaceSupport.cpp.

References head_, ACEXML_Namespace_Context_Stack::NS_Node_T::item_, and ACEXML_Namespace_Context_Stack::NS_Node_T::next_.

Referenced by ACEXML_NamespaceSupport::popContext.

00048 {
00049   if (this->head_ != 0)
00050     {
00051       struct NS_Node_T *temp = this->head_;
00052       this->head_ = temp->next_;
00053 
00054       ACEXML_NS_CONTEXT* retv = temp->item_;
00055       delete temp;
00056       return retv;
00057     }
00058   return 0;
00059 }

int ACEXML_Namespace_Context_Stack::push ACEXML_NS_CONTEXT   old
 

Push the old namespace before entering into a new namespace scope.

Definition at line 34 of file NamespaceSupport.cpp.

References ACE_NEW_RETURN, and head_.

Referenced by ACEXML_NamespaceSupport::pushContext.

00035 {
00036   struct NS_Node_T *temp = 0;
00037   ACE_NEW_RETURN (temp, struct NS_Node_T, -1);
00038 
00039   temp->item_ = nsc;
00040   temp->next_ = this->head_;
00041 
00042   this->head_ = temp;
00043   return 0;
00044 }


Member Data Documentation

NS_Node_T* ACEXML_Namespace_Context_Stack::head_ [private]
 

Anchor point for head of stack.

Definition at line 83 of file NamespaceSupport.h.

Referenced by pop, and push.


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