FDO API Reference Feature Data Objects
Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

FdoStack< OBJ, EXC > Class Template Reference

#include <Stack.h>

Inherits FdoCollection< OBJ, EXC >< OBJ, EXC >.

Inheritance diagram for FdoStack< OBJ, EXC >:

[legend]
List of all members.

Detailed Description

template<class OBJ, class EXC>
class FdoStack< OBJ, EXC >

DOXYGEN-IGNORE FdoStack is an abstract template for a Stack ADT. This class is not yet part of the FDOCommon API. However, doc comments have been added since it might be added to the API in the future. All doc comments will need to change to if this happens.

Definition at line 33 of file Stack.h.


Public Member Functions

FDO_API_COMMON FdoInt32 AddRef ()
 Increase the reference count.
virtual void Clear ()
 Removes all items from the stack.
virtual FdoBoolean IsEmpty () const
 Checks if the stack is empty.
virtual OBJ * Peek (void) const
 Gets the top item on the stack without popping it.
virtual OBJ * Pop (void)
 Pops the top item off the stack. The previous top item becomes the top item. An exception is thrown if the stack is empty.
virtual void Push (OBJ *value)
 Pushes the given item onto the stack.
FDO_API_COMMON FdoInt32 Release ()
 Decrease the reference count.

Protected Member Functions

virtual FDO_API_COMMON OBJ * Peek (int level) const
 Gets an item at a given position in the stack. This function is protected so that FdoStack implementors can decide whether to expose it or restrict access to the top element only.

Member Function Documentation

template<class OBJ, class EXC>
FDO_API_COMMON FdoInt32 FdoStack< OBJ, EXC >::AddRef  )  [inline, virtual]
 

Increase the reference count.

Returns:
Returns the new reference count (value for debugging use only).

Reimplemented from FdoIDisposable.

Definition at line 120 of file Stack.h.

template<class OBJ, class EXC>
virtual void FdoStack< OBJ, EXC >::Clear  )  [inline, virtual]
 

Removes all items from the stack.

Returns:
Returns nothing

Reimplemented from FdoCollection< OBJ, EXC >.

Definition at line 82 of file Stack.h.

template<class OBJ, class EXC>
virtual FdoBoolean FdoStack< OBJ, EXC >::IsEmpty  )  const [inline, virtual]
 

Checks if the stack is empty.

Returns:
Returns true if the stack is empty

Definition at line 43 of file Stack.h.

Referenced by FdoStack< StackElement, FdoXmlException >::Peek(), and FdoStack< StackElement, FdoXmlException >::Pop().

template<class OBJ, class EXC>
virtual FDO_API_COMMON OBJ* FdoStack< OBJ, EXC >::Peek int  level  )  const [inline, protected, virtual]
 

Gets an item at a given position in the stack. This function is protected so that FdoStack implementors can decide whether to expose it or restrict access to the top element only.

Parameters:
level Input Get the element at this level. If 0 then the top element is returned. If 1 then the element just below the top element is returned, and so on.
Returns:
Returns the requested item. Returns NULL if the stack is empty or level is out of range (less than 0 or greater or equal to the number of elements in the stack

Definition at line 146 of file Stack.h.

template<class OBJ, class EXC>
virtual OBJ* FdoStack< OBJ, EXC >::Peek void   )  const [inline, virtual]
 

Gets the top item on the stack without popping it.

Returns:
Returns the top item. Returns NULL if the stack is empty

Definition at line 54 of file Stack.h.

Referenced by FdoStack< StackElement, FdoXmlException >::Pop().

template<class OBJ, class EXC>
virtual OBJ* FdoStack< OBJ, EXC >::Pop void   )  [inline, virtual]
 

Pops the top item off the stack. The previous top item becomes the top item. An exception is thrown if the stack is empty.

Parameters:
value Input value
Returns:
Returns nothing

Definition at line 97 of file Stack.h.

template<class OBJ, class EXC>
virtual void FdoStack< OBJ, EXC >::Push OBJ *  value  )  [inline, virtual]
 

Pushes the given item onto the stack.

Parameters:
value Input the item to push. This item becomes the top item.
Returns:
Returns nothing

Definition at line 71 of file Stack.h.

template<class OBJ, class EXC>
FDO_API_COMMON FdoInt32 FdoStack< OBJ, EXC >::Release  )  [inline, virtual]
 

Decrease the reference count.

Returns:
Returns the new reference count (value for debugging use only).

Reimplemented from FdoIDisposable.

Definition at line 128 of file Stack.h.


The documentation for this class was generated from the following file:
Comments or suggestions? Send us feedback.