Classes | Namespaces

_src_base_stack.hh File Reference

Stack template class. More...

Go to the source code of this file.

Classes

class  base::Stack< T >
 Stack template class. More...

Namespaces

namespace  base
 

Library of base code.



Detailed Description

Stack template class.

LastChangedDate:
2011-04-23 21:07:07 -0400 (Sat, 23 Apr 2011)
Author:
Jim E. Brooks http://www.palomino3d.org
Remarks:
A test was written for this.
 *
 * IMPORTANT:
 * ----------
 * Caller must never call Pop() if stack is empty.
 * Doing so is UNSAFE/UNDEFINED.
 *
 * Interface:
 * ----------
 * Push()
 * Pop()      pops and returns last item pushed
 * GetCount()
 * IfEmpty()
 *
 * Design notes:
 * -------------
 * Stack is based on a STL deque.  In the old design,
 * it was based on Dlist, but that incurred excessive
 * memory allocation for every Dlink.
 * As Stack's type is Stack<T>, not Stack<T*> nor Stack<shptr<T>>,
 * the return type of Stack::Pop() is T (not T*) which prevents returning NULL.
 *
 * 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Palomino Flight Simulator documents generated by doxygen 1.7.1 on Tue May 15 2012 22:40:10