18#if !defined(XALAN_VARIABLESSTACK_HEADER_GUARD)
19#define XALAN_VARIABLESSTACK_HEADER_GUARD
50class ElemTemplateElement;
52class StylesheetExecutionContext;
266 m_currentStackFrameIndex =
size_type(m_stack.size());
283 return m_currentStackFrameIndex;
294 return m_globalStackFrameIndex;
489 enum { eDefaultStackSize = 100 };
493 class CommitPushParams
504 m_variablesStack = 0;
509 VariablesStack* m_variablesStack;
511 size_type m_stackSize;
514 friend class CommitPushParams;
548 assert(m_stack.empty() ==
false);
550 return m_stack.back();
553 friend class CommitPushElementFrame;
554 friend class EnsurePop;
556 friend class SetAndRestoreForceGlobalSearch;
577 bool m_globalStackFrameMarked;
#define XALAN_XSLT_EXPORT
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
virtual ~InvalidStackContextException()
InvalidStackContextException(XalanDOMString &theResult)
virtual const XalanDOMChar * getType() const
Retrieve type of exception.
void operator()(const ParamsVectorType::value_type &theEntry) const
PushParamFunctor(VariablesStack &theVariablesStack)
const ElemTemplateElement * getElement() const
Retrieve the ElemTemplateElem where frame begins.
const XalanQName * getName() const
Retrieve object name.
eType getType() const
Determine type of stack entry.
~StackEntry()
Destructor...
const ElemVariable * getVariable() const
Retrieve object's XObject pointer.
void setValue(const XObjectPtr &theValue)
Retrieve object's XObject pointer.
StackEntry(const StackEntry &theSource)
Copy constructor...
StackEntry & operator=(const StackEntry &theRHS)
StackEntry(const XalanQName *name, const XObjectPtr &val, bool isParam=false)
Construct a variable that is already evaluated.
eType
Enumeration for types of stack entries, one of context state, context marker, element marker,...
const XObjectPtr & getValue() const
Retrieve object's XObject pointer.
StackEntry()
Construct a context marker.
StackEntry(const ElemTemplateElement *elem)
Construct an element frame marker.
StackEntry(const XalanQName *name, const ElemVariable *var, bool isParam=false)
Construct a variable that has not been evaluated yet.
bool operator==(const StackEntry &theRHS) const
Defines a class to keep track of a stack for macro arguments.
XalanVector< const ElemTemplateElement * > ElemTemplateElementStackType
XalanVector< ParamsVectorEntry > ParamsVectorType
XalanVector< StackEntry > VariableStackStackType
void pushVariable(const XalanQName &name, const ElemVariable *var, const ElemTemplateElement *e)
Push a named variable onto the processor variable stack.
void pushParams(const ParamsVectorType &theParams)
Push the provided objects as parameters.
void popElementFrame()
Pop a frame marker for an element.
size_type getGlobalStackFrameIndex() const
Get the top of the global stack frame.
void pushContextMarker()
Push a context marker onto the stack to let us know when to stop searching for a var.
void pushElementFrame(const ElemTemplateElement *elem)
Push a frame marker for an element.
void unmarkGlobalStackFrame()
Clear the marking of the global stack frame.
void start()
Mark the top of the stack.
void popContextMarker()
Pop the current context from the current context stack.
const XObjectPtr getVariable(const XalanQName &qname, StylesheetExecutionContext &executionContext, bool &fNameFound)
Given a name, find the corresponding XObject.
VariablesStack(MemoryManager &theManager)
Constructor for a variable stack.
void pushVariable(const XalanQName &name, const XObjectPtr &val, const ElemTemplateElement *e)
Push a named variable onto the processor variable stack.
size_type getCurrentStackFrameIndex() const
Get the top of the stack frame from where a search for a variable or param should take place.
void markGlobalStackFrame()
Mark the top of the global stack frame.
size_type getStackSize() const
XalanVector< const ElemVariable * > RecursionGuardStackType
void reset()
Reset the stack.
void resetParams()
Reset all params in the current stack frame.
const XObjectPtr getParamVariable(const XalanQName &qname, StylesheetExecutionContext &executionContext, bool &fNameFound)
Given a name, return a string representing the value, but don't look in the global space.
void setCurrentStackFrameIndex(size_type currentStackFrameIndex=~0u)
Set the top of the stack frame from where a search for a variable or param should take place.
Class to hold XObjectPtr return types.
Class to represent a qualified name.
ParamsVectorEntry(const XalanQName *qname, const ElemVariable *variable)
const XalanQName * m_qname
ParamsVectorEntry(const XalanQName *qname, const XObjectPtr value)
const ElemVariable * m_variable