IStack (interface)

Usage

Linkage:

-lopenxds_adt

To use the interface:

#include <openxds.adt/IStack.h>

using namespace openxds::adt;

Method Summary

ReturnsMethod-nameParametersThrows
void push E* element
E* pop NoSuchElementException*
E& top NoSuchElementException*
bool isEmpty
long size

Methods


put

void push( E* element );

Parameters

element, to be pushed onto the top of the stack.


pop

E* pop() throw (NoSuchElementException*);

Returns

The top element from the stack.

Throws

NoSuchElementException, if the stack is empty.


top

E& top() throw (NoSuchElementException*);

Returns

A reference to the top element on the stack.

Throws

NoSuchElementException, if the stack is empty.


isEmpty

bool isEmpty();

Returns

TRUE, if the map is empty; otherwise FALSE.


size

long size();

Returns

The number of key/element mappings in the map.