staticStack Class Template Reference
[Fixed index range containers]

Implements a fixed index range stack. More...

#include <staticStack.h>

Inheritance diagram for staticStack:

goblinQueue indexSet managedObject managedObject goblinRootObject goblinRootObject

Public Types

enum  TOptInsert {
  INSERT_NO_THROW = 0,
  INSERT_TWICE_THROW = 1
}

Public Member Functions

 staticStack (TItem nn, goblinController &thisContext) throw ()
 staticStack (staticStack< TItem, TKey > &S) throw ()
 ~staticStack () throw ()
unsigned long Size () const throw ()
unsigned long Allocated () const throw ()
char * Display () const throw ()
void Insert (TItem w, TKey alpha, staticStack::TOptInsert mode) throw (ERRange,ERCheck)
void Insert (TItem w, staticStack::TOptInsert mode) throw (ERRange,ERCheck)
void Insert (TItem w, TKey alpha=0) throw (ERRange,ERCheck)
TItem Delete () throw (ERRejected)
void ChangeKey (TItem w, TKey alpha) throw (ERRange,ERRejected)
TItem Peek () const throw (ERRejected)
bool Empty () const throw ()
void Init () throw ()
TItem Cardinality () const throw ()
bool IsMember (TItem i) const throw (ERRange)
TItem First () const throw ()
TItem Successor (const TItem i) const throw (ERRange)

Detailed Description

template<class TItem, class TKey = TFloat>
class staticStack< TItem, TKey >

Implements a fixed index range stack.


Member Enumeration Documentation

enum TOptInsert
 

Strategy for repeated queue insertions.

Enumerator:
INSERT_NO_THROW  Do not complain when inserting elements twice.
INSERT_TWICE_THROW  Complain if an element is inserted twice.


Constructor & Destructor Documentation

staticStack (  TItem  nn,
goblinController &  thisContext
)  throw ()
 

staticStack (  staticStack< TItem, TKey > &  S  )  throw ()
 

~staticStack (   )  throw ()
 


Member Function Documentation

unsigned long Allocated (   )  const throw ()
 

Reimplemented from managedObject.

TItem Cardinality (   )  const throw () [virtual]
 

Query the current queue cardinality.

Returns:
The queue cardinality

Implements goblinQueue.

void ChangeKey (  TItem  w,
TKey  alpha
)  throw (ERRange,ERRejected) [virtual]
 

Insert an index into the queue.

Parameters:
w An element index
alpha A new priority for this element

Implements goblinQueue.

TItem Delete (   )  throw (ERRejected) [virtual]
 

Delete an element from the queue.

Returns:
The index of the deleted element

Implements goblinQueue.

char * Display (   )  const throw () [virtual]
 

Unconditional display of data objects.

Reimplemented from indexSet.

bool Empty (   )  const throw () [virtual]
 

Check if the queue is empty.

Return values:
true The queue is empty

Implements goblinQueue.

TItem First (   )  const throw () [virtual]
 

Query the smallest index in an index set.

Returns:
The smallest index contained by this set

Reimplemented from indexSet.

void Init (   )  throw () [virtual]
 

Delete all elements from the queue efficently.

Implements goblinQueue.

void Insert (  TItem  w,
TKey  alpha = 0
)  throw (ERRange,ERCheck) [virtual]
 

Insert an index into the queue.

Parameters:
w The index to be inserted
alpha The priority of the inserted index

Implements goblinQueue.

void Insert (  TItem  w,
staticStack< TItem, TKey >::TOptInsert  mode
)  throw (ERRange,ERCheck)
 

void Insert (  TItem  w,
TKey  alpha,
staticStack< TItem, TKey >::TOptInsert  mode
)  throw (ERRange,ERCheck)
 

bool IsMember (  TItem  i  )  const throw (ERRange) [virtual]
 

Test for indet set membership.

Parameters:
i An index to test for indet set membership
Return values:
true The indexed element is contained by this set

Implements indexSet.

TItem Peek (   )  const throw (ERRejected) [virtual]
 

Query what is coming next on the queue.

Returns:
The index of the element to be deleted next

Implements goblinQueue.

unsigned long Size (   )  const throw () [virtual]
 

Implements goblinQueue.

TItem Successor (  const TItem  i  )  const throw (ERRange) [virtual]
 

Enumeration of the indices contained in a set.

Returns:
The least upper bound index contained by this set

Reimplemented from indexSet.