#include <stack.hh>
Inheritance diagram for lestes::std::stack< T, Container >:

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_list > | reflection_get () const |
| virtual ptr< object::field_list_list > | field_values_get () const |
| virtual void | gc_mark (void) |
| Marks the keystone. | |
| bool | empty () const |
| size_type | size () const |
| value_type & | top () |
| const value_type & | top () 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_list > | reflection |
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.
Definition at line 65 of file stack.hh.
| typedef Container::value_type lestes::std::stack< T, Container >::value_type |
| typedef Container::size_type lestes::std::stack< T, Container >::size_type |
| typedef Container lestes::std::stack< T, Container >::container_type |
| typedef Container::const_reverse_iterator lestes::std::stack< T, Container >::const_iterator |
| typedef Container::reverse_iterator lestes::std::stack< T, Container >::iterator |
| typedef Container::const_iterator lestes::std::stack< T, Container >::const_reverse_iterator |
| typedef Container::iterator lestes::std::stack< T, Container >::reverse_iterator |
| lestes::std::stack< T, Container >::stack | ( | ptr< Container > | container | ) | [inline, protected] |
| static ptr< stack < T > > lestes::std::stack< T, Container >::create | ( | ptr< Container > | container = Container::create() |
) | [inline, static] |
| ptr< object::reflection_list > lestes::std::stack< T, C >::reflection_get | ( | ) | const [inline, virtual] |
Reimplemented from lestes::std::object.
Definition at line 125 of file stack.hh.
References lestes::std::class_reflection::create(), lestes::std::list< T >::create(), lestes::std::stack< T, Container >::reflection, and lestes::std::object::reflection_get().
00126 { 00127 if (!reflection) { 00128 typedef class_reflection::field_metadata md; 00129 typedef class_reflection::field_metadata_list mdlist; 00130 ptr<mdlist> mdl = mdlist::create(); 00131 mdl->push_back( md::create( "c", "Collection < T >" ) ); 00132 reflection = reflection_list::create( object::reflection_get() ); 00133 reflection->push_back( class_reflection::create( "stack_of_T", mdl ) ); 00134 } 00135 return reflection; 00136 }
| ptr< object::field_list_list > lestes::std::stack< T, C >::field_values_get | ( | ) | const [inline, virtual] |
Reimplemented from lestes::std::object.
Definition at line 139 of file stack.hh.
References lestes::std::stack< T, Container >::c, lestes::std::list< T >::create(), and lestes::std::object::field_values_get().
00140 { 00141 ptr<field_list_list> result = object::field_values_get(); 00142 result->push_back( value_list::create() ); 00143 result->back()->push_back( c ); 00144 return result; 00145 }
| 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.
Definition at line 86 of file stack.hh.
00087 { c.gc_mark(); return object::gc_mark(); }
| bool lestes::std::stack< T, Container >::empty | ( | ) | const [inline] |
| size_type lestes::std::stack< T, Container >::size | ( | ) | const [inline] |
| value_type& lestes::std::stack< T, Container >::top | ( | ) | [inline] |
| const value_type& lestes::std::stack< T, Container >::top | ( | ) | const [inline] |
| void lestes::std::stack< T, Container >::push | ( | const value_type & | x | ) | [inline] |
| void lestes::std::stack< T, Container >::pop | ( | ) | [inline] |
| const_iterator lestes::std::stack< T, Container >::begin | ( | ) | const [inline] |
| iterator lestes::std::stack< T, Container >::begin | ( | ) | [inline] |
| const_iterator lestes::std::stack< T, Container >::end | ( | ) | const [inline] |
| iterator lestes::std::stack< T, Container >::end | ( | ) | [inline] |
| const_reverse_iterator lestes::std::stack< T, Container >::rbegin | ( | ) | const [inline] |
| reverse_iterator lestes::std::stack< T, Container >::rbegin | ( | ) | [inline] |
| const_reverse_iterator lestes::std::stack< T, Container >::rend | ( | ) | const [inline] |
| reverse_iterator lestes::std::stack< T, Container >::rend | ( | ) | [inline] |
srp< Container > lestes::std::stack< T, Container >::c [protected] |
Definition at line 78 of file stack.hh.
Referenced by lestes::std::stack< T, Container >::field_values_get().
ptr< object::reflection_list > lestes::std::stack< T, C >::reflection [inline, static, private] |
Reimplemented from lestes::std::object.
Definition at line 82 of file stack.hh.
Referenced by lestes::std::stack< T, Container >::reflection_get().
1.5.1-20070107