lestes::std::stack< T, Container > Class Template Reference

Collectible stack of entities. More...

#include <stack.hh>

Inheritance diagram for lestes::std::stack< T, Container >:

Inheritance graph
[legend]
List of all members.

Public Types

typedef Container::value_type value_type
typedef Container::size_type size_type
typedef Container container_type
typedef Container::const_reverse_iterator const_iterator
typedef Container::reverse_iterator iterator
typedef Container::const_iterator const_reverse_iterator
typedef Container::iterator reverse_iterator

Public Member Functions

virtual ptr< object::reflection_listreflection_get () const
virtual ptr< object::field_list_listfield_values_get () const
virtual void gc_mark (void)
 Marks the keystone.
bool empty () const
size_type size () const
value_typetop ()
const value_typetop () const
void push (const value_type &x)
void pop ()
const_iterator begin () const
iterator begin ()
const_iterator end () const
iterator end ()
const_reverse_iterator rbegin () const
reverse_iterator rbegin ()
const_reverse_iterator rend () const
reverse_iterator rend ()

Static Public Member Functions

static ptr< stack< T > > create (ptr< Container > container=Container::create())

Protected Member Functions

 stack (ptr< Container > container)

Protected Attributes

srp< Container > c

Static Private Attributes

static ptr< object::reflection_listreflection

Detailed Description

template<class T, class Container = list<T>>
class lestes::std::stack< T, Container >

Collectible stack of entities.

An analogon for STL stack class tailored to be compatible with our garbage collector. Includes namely marking routine and factory method.

In addition to std::stack an iterator is provided. The sense of the iteration is reversed with respect to the underlying container. Thus the ``normal'' iteration starts at the stack top, which is the back of the underlying container.


Member Typedef Documentation

template<class T, class Container = list<T>>
typedef Container::value_type lestes::std::stack< T, Container >::value_type

template<class T, class Container = list<T>>
typedef Container::size_type lestes::std::stack< T, Container >::size_type

template<class T, class Container = list<T>>
typedef Container lestes::std::stack< T, Container >::container_type

template<class T, class Container = list<T>>
typedef Container::const_reverse_iterator lestes::std::stack< T, Container >::const_iterator

template<class T, class Container = list<T>>
typedef Container::reverse_iterator lestes::std::stack< T, Container >::iterator

template<class T, class Container = list<T>>
typedef Container::const_iterator lestes::std::stack< T, Container >::const_reverse_iterator

template<class T, class Container = list<T>>
typedef Container::iterator lestes::std::stack< T, Container >::reverse_iterator


Constructor & Destructor Documentation

template<class T, class Container = list<T>>
lestes::std::stack< T, Container >::stack ( ptr< Container >  container  )  [inline, protected]


Member Function Documentation

template<class T, class Container = list<T>>
static ptr< stack < T > > lestes::std::stack< T, Container >::create ( ptr< Container >  container = Container::create()  )  [inline, static]

template<typename T, typename C>
ptr< object::reflection_list > lestes::std::stack< T, C >::reflection_get (  )  const [inline, virtual]

Reimplemented from lestes::std::object.

template<typename T, typename C>
ptr< object::field_list_list > lestes::std::stack< T, C >::field_values_get (  )  const [inline, virtual]

Reimplemented from lestes::std::object.

template<class T, class Container = list<T>>
virtual void lestes::std::stack< T, Container >::gc_mark ( void   )  [inline, virtual]

Marks the keystone.

Marks all directly reachable parts of the class. The method must be overriden for each inherited class. It should contain abc.gc_mark() for each field abc of the inherited class and call to gc_mark() of the direct ancestor of the class. Does nothing for keystone, only stops processing of ancestors.

Reimplemented from lestes::std::mem::keystone.

template<class T, class Container = list<T>>
bool lestes::std::stack< T, Container >::empty (  )  const [inline]

template<class T, class Container = list<T>>
size_type lestes::std::stack< T, Container >::size (  )  const [inline]

template<class T, class Container = list<T>>
value_type& lestes::std::stack< T, Container >::top (  )  [inline]

template<class T, class Container = list<T>>
const value_type& lestes::std::stack< T, Container >::top (  )  const [inline]

template<class T, class Container = list<T>>
void lestes::std::stack< T, Container >::push ( const value_type x  )  [inline]

template<class T, class Container = list<T>>
void lestes::std::stack< T, Container >::pop (  )  [inline]

template<class T, class Container = list<T>>
const_iterator lestes::std::stack< T, Container >::begin (  )  const [inline]

template<class T, class Container = list<T>>
iterator lestes::std::stack< T, Container >::begin (  )  [inline]

template<class T, class Container = list<T>>
const_iterator lestes::std::stack< T, Container >::end (  )  const [inline]

template<class T, class Container = list<T>>
iterator lestes::std::stack< T, Container >::end (  )  [inline]

template<class T, class Container = list<T>>
const_reverse_iterator lestes::std::stack< T, Container >::rbegin (  )  const [inline]

template<class T, class Container = list<T>>
reverse_iterator lestes::std::stack< T, Container >::rbegin (  )  [inline]

template<class T, class Container = list<T>>
const_reverse_iterator lestes::std::stack< T, Container >::rend (  )  const [inline]

template<class T, class Container = list<T>>
reverse_iterator lestes::std::stack< T, Container >::rend (  )  [inline]


Member Data Documentation

template<class T, class Container = list<T>>
srp< Container > lestes::std::stack< T, Container >::c [protected]

template<class T, class Container = list<T>>
ptr< object::reflection_list > lestes::std::stack< T, C >::reflection [inline, static, private]

Reimplemented from lestes::std::object.


The documentation for this class was generated from the following file:
Generated on Mon Feb 12 18:50:09 2007 for lestes by doxygen 1.5.1-20070107