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>

Collaboration diagram for ACEXML_Namespace_Context_Stack:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ACEXML_Namespace_Context_Stack (void)
 Default constructor.

 ~ACEXML_Namespace_Context_Stack (void)
 Destructor.

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

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


Private Attributes

ACE_Unbounded_Stack< ACEXML_NS_CONTEXT * > stack_
 Internal stack structure to hold namespace context.


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 62 of file NamespaceSupport.h.


Constructor & Destructor Documentation

ACEXML_Namespace_Context_Stack::ACEXML_Namespace_Context_Stack void   ) 
 

Default constructor.

Definition at line 17 of file NamespaceSupport.cpp.

00018 {
00019 }

ACEXML_Namespace_Context_Stack::~ACEXML_Namespace_Context_Stack void   ) 
 

Destructor.

Definition at line 21 of file NamespaceSupport.cpp.

00022 {
00023   // Clean up stuff.
00024 }


Member Function Documentation

ACEXML_NS_CONTEXT * ACEXML_Namespace_Context_Stack::pop void   ) 
 

Pop the old namespace when exiting a namespace scope.

Definition at line 33 of file NamespaceSupport.cpp.

References ACE_ERROR, ACEXML_NS_CONTEXT, LM_ERROR, ACE_Unbounded_Stack< ACEXML_NS_CONTEXT * >::pop(), and ACE_Unbounded_Stack< ACEXML_NS_CONTEXT * >::size().

Referenced by ACEXML_NamespaceSupport::popContext().

00034 {
00035   if (this->stack_.size() <= 0)
00036     return 0;
00037 
00038   ACEXML_NS_CONTEXT* temp = 0;
00039   int retval = this->stack_.pop (temp);
00040   if (retval != 0)
00041     {
00042       ACE_ERROR ((LM_ERROR, "Unable to pop Namespace context from stack\n"));
00043       return 0;
00044     }
00045   return temp;
00046 }

int ACEXML_Namespace_Context_Stack::push ACEXML_NS_CONTEXT old  ) 
 

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

Definition at line 27 of file NamespaceSupport.cpp.

References ACEXML_NS_CONTEXT, and ACE_Unbounded_Stack< ACEXML_NS_CONTEXT * >::push().

Referenced by ACEXML_NamespaceSupport::pushContext().

00028 {
00029   return (this->stack_.push (nsc) < 0);
00030 }


Member Data Documentation

ACE_Unbounded_Stack<ACEXML_NS_CONTEXT*> ACEXML_Namespace_Context_Stack::stack_ [private]
 

Internal stack structure to hold namespace context.

Definition at line 79 of file NamespaceSupport.h.


The documentation for this class was generated from the following files:
Generated on Thu Nov 9 11:48:01 2006 for ACEXML by doxygen 1.3.6