Developer Documentation
RAVL, Recognition And Vision Library
USER HOME PAGE CLASS LIST CONTENTS
Ravl - Core - Stacks - BlkStackC<class DataT>
 

  PUBLIC
BlkStackC::BlkStackC(int)
BlkStackC::~BlkStackC(void)
BlkStackC::Top(void)
BlkStackC::Top(void) const
BlkStackC::IsEmpty(void) const
BlkStackC::Push(const DataT &)
BlkStackC::Pop(void)
BlkStackC::DelTop(void)
BlkStackC::DelFirst(void)
BlkStackC::InsFirst(const DataT &)
BlkStackC::Insert(const DataT &)
BlkStackC::Empty(void)
BlkStackC::PushBlk(int)
BlkStackC::PopBlk(void)

   BlkStackC<class DataT>   
 
Block stack.
 
include "Ravl/BlkStack.hh"
Created:26/08/2001 
Source file:Ravl/Core/Container/Misc/BlkStack.hh
User Level:Advanced
Library:RavlCore
In Scope:RavlN

Comments:
This is a small object

This is designed to handle simple data types efficiently. It has some draw backs however, there is no garantee when the data held on the stack will have its destructor called, nor are there any garantees in what order they well happen. If this is a problem use StackC instead as it handles these cases properly.

Child Classes:
SBlkC
Variables:
DataT * top;
Current top of stack.

DataT * eob;
End of block guard

DataT * bob;
Begining of block guard.

SBlkC * topBlk;

SBlkC * lastBlk;
Last block allocated.

Methods:
BlkStackC(int sizeEst = 32)
Constructor.
Give an estimate of the maximum size of the stack.

~BlkStackC()
Destructor.

DataT & Top()
Access top of stack.

const DataT & Top() const
Access top of stack.

bool IsEmpty() const
Test if stack is empty.

void Push(const DataT & data)
Push item onto stack.

DataT & Pop()
Pop item from stack.

void DelTop()
Remove an element from the top of the stack.
Same as Pop(), but no value returned. This is slightly faster than Pop

void DelFirst()
Remove an element from the top of the stack.
Same as Pop(), but no value returned. This may be faster then Pop

void InsFirst(const DataT & d)
Push element onto stack.
Same as Push().

void Insert(const DataT & d)
Push element onto stack.
Same as Push().

void Empty()
Empty stack of all contents.

SBlkC * PushBlk(int sizeEst)
Push a new block onto the stack.

bool PopBlk()
Pop a block from the stack.


Maintainer:Charles Galambos, Created: 26/08/2001, Documentation by CxxDoc: Tue Aug 13 09:59:30 2002