#include <stack.hpp>


Definition at line 48 of file stack.hpp.
Public Member Functions | |
| virtual bool | contains_index (const I &) const =0 |
| virtual bool | is_empty () const |
| Returns true if the collection is empty. | |
| virtual T & | item (const I &index)=0 |
| virtual const T & | item (const I &index) const =0 |
| simple_stack & | operator= (const simple_stack &s) |
| T & | operator[] (const I &index) |
| const T & | operator[] (const I &index) const |
| simple_stack (const simple_stack &s) | |
| simple_stack () | |
| virtual | ~simple_stack () |
Other Useful Functions | |
| virtual void | append (const iterable< T, IBase > &) |
| Append all members of a collection to this one. | |
| virtual iterator | find_value (const T &) |
| virtual const_iterator | find_value (const T &) const |
| A generic find function that iterates over the collection to find a particular value. | |
Iterable Implementation | |
| virtual void | append (const T &) |
| Add an item to the end of the collection. | |
| virtual void | insert (const iterator &i, const T &item) |
| Insert an item before the one specified by the iterator. | |
| virtual void | remove (const iterator &i) |
| Remove the item specified by the iterator. | |
Countable Implementation | |
| virtual void | clear () |
| Clears the contents of the collection. | |
| virtual gsgl::index_t | size () const |
| A generic count function that iterates over the collection. | |
Indexable Implementation | |
| virtual bool | contains_index (const gsgl::index_t &index) const |
| virtual T & | item (const gsgl::index_t &index) |
| virtual const T & | item (const gsgl::index_t &index) const |
Array Functionality | |
| void | insert (const T &item, const typename index_t &index) |
| T * | ptr () |
| const T * | ptr () const |
| void | remove (const typename index_t &index) |
Iterators | |
| iterator | iter () |
| const_iterator | iter () const |
simple_stack Functionality | |
| void | pop () |
| void | push (const T &item) |
| T & | top () |
| const T & | top () const |
Protected Member Functions | |
| void * | allocate (const gsgl::index_t &num_bytes) |
| void | copy (void *dest, void *src, const gsgl::index_t &num_bytes) |
| void | deallocate (void *) |
| void | move (void *dest, void *src, const gsgl::index_t &num_bytes) |
| void * | reallocate (void *, const gsgl::index_t &num_bytes) |
| void | resize (const gsgl::index_t &new_num_elements) |
| void | set (void *dest, const unsigned char &val, const gsgl::index_t &num_bytes) |
| simple_stack | ( | ) | [inline] |
| simple_stack | ( | const simple_stack< T > & | s | ) | [inline] |
| ~simple_stack | ( | ) | [inline, virtual] |
| void * allocate | ( | const gsgl::index_t & | num_bytes | ) | [protected, inherited] |
| void append | ( | const T & | ) | [inline, virtual, inherited] |
Add an item to the end of the collection.
Implements iterable.
Definition at line 193 of file array.hpp.
References simple_array::data, simple_array::num_elements, and simple_array::resize().
Referenced by stellar_db::add_star_name(), string::append(), vehicle::calculate_inertia_tensor(), string::clear(), treebox::clear_tree_nodes(), shader_base::compile(), config_record::from_stream(), string_impl::get_c_string(), string_impl::get_p_string(), mesh_file::load_obj_file(), simple_stack::push(), string::string(), and string_impl::string_impl().
| virtual void clear | ( | ) | [inline, virtual, inherited] |
Clears the contents of the collection.
Implements countable.
Definition at line 97 of file array.hpp.
Referenced by string::clear(), pqueue::clear(), config_record::from_stream(), string_impl::get_c_string(), and string_impl::get_p_string().
| virtual bool contains_index | ( | const I & | ) | const [pure virtual, inherited] |
Implemented in dictionary.
| virtual bool contains_index | ( | const gsgl::index_t & | index | ) | const [inline, virtual, inherited] |
| void copy | ( | void * | dest, | |
| void * | src, | |||
| const gsgl::index_t & | num_bytes | |||
| ) | [protected, inherited] |
| void deallocate | ( | void * | ptr | ) | [protected, inherited] |
| iterable< T, IBase >::const_iterator find_value | ( | const T & | item | ) | const [inline, virtual, inherited] |
A generic find function that iterates over the collection to find a particular value.
Definition at line 153 of file iterable.hpp.
References iterable::const_iterator::is_valid().
Referenced by gsgl::data::global_unregister_resource_aux().
| void insert | ( | const T & | item, | |
| const typename index_t & | index | |||
| ) | [inherited] |
| void insert | ( | const iterator & | , | |
| const T & | ||||
| ) | [inline, virtual, inherited] |
Insert an item before the one specified by the iterator.
Implements iterable.
Definition at line 201 of file array.hpp.
Referenced by string::insert(), and pqueue::push().
| virtual bool is_empty | ( | ) | const [inline, virtual, inherited] |
Returns true if the collection is empty.
Definition at line 59 of file countable.hpp.
Referenced by application::application(), broker_creator::broker_creator(), config_variable< gsgl::platform::color >::config_variable(), file::file(), font_impl::font_impl(), config_record::from_stream(), application::get_config_overrides(), node::get_name(), brokered_object::get_type_name(), event_map::load_keyboard_events(), application::load_scenery(), model_part::model_part(), package::package(), physics_frame::physics_frame(), solar_system::solar_system(), stellar_db::stellar_db(), and vehicle::vehicle().
| virtual T& item | ( | const I & | index | ) | [pure virtual, inherited] |
Implemented in dictionary.
| virtual const T& item | ( | const I & | index | ) | const [pure virtual, inherited] |
Implemented in dictionary.
Referenced by indexable< gsgl::data::log_target *, unsigned int >::operator[]().
| T & item | ( | const gsgl::index_t & | index | ) | [inline, virtual, inherited] |
Definition at line 225 of file array.hpp.
References simple_array::data, simple_array::num_elements, and simple_array::resize().
| const T & item | ( | const gsgl::index_t & | index | ) | const [inline, virtual, inherited] |
Definition at line 215 of file array.hpp.
References simple_array::data, and simple_array::num_elements.
Referenced by string::item(), and simple_stack::top().
| iterator iter | ( | ) | [inline, inherited] |
Definition at line 101 of file iterable.hpp.
| const_iterator iter | ( | ) | const [inline, inherited] |
Definition at line 100 of file iterable.hpp.
Referenced by config_variable::assign_from_string(), treebox::clear_tree_nodes(), keplerian_element_propagator::get_array(), config_record::get_child(), satellite_element_propagator::get_elements(), application::load_scenery(), list::operator==(), dictionary::operator==(), config_record::override_with(), vector::parse(), transform::parse(), application::remove_viewpoint_nodes(), config_record::to_stream(), vector::vector(), application::~application(), and cache::~cache().
| void move | ( | void * | dest, | |
| void * | src, | |||
| const gsgl::index_t & | num_bytes | |||
| ) | [protected, inherited] |
| simple_stack< T > & operator= | ( | const simple_stack< T > & | s | ) | [inline] |
| T& operator[] | ( | const I & | index | ) | [inline, inherited] |
Definition at line 58 of file indexable.hpp.
| const T& operator[] | ( | const I & | index | ) | const [inline, inherited] |
Definition at line 57 of file indexable.hpp.
| void pop | ( | ) | [inline] |
Definition at line 126 of file stack.hpp.
References simple_array::resize(), and simple_array::size().
| const T* ptr | ( | ) | const [inline, inherited] |
Definition at line 120 of file array.hpp.
Referenced by string::append(), shader_base::compile(), config_record::from_stream(), string_impl::get_c_string(), string_impl::get_p_string(), string_impl::get_w_string(), string::make_lower(), string::make_upper(), string::string(), string_impl::string_impl(), string::substring(), and string::to_bool().
| void push | ( | const T & | item | ) | [inline] |
| void * reallocate | ( | void * | ptr, | |
| const gsgl::index_t & | num_bytes | |||
| ) | [protected, inherited] |
| void remove | ( | const typename index_t & | index | ) | [inherited] |
| void remove | ( | const iterator & | ) | [inline, virtual, inherited] |
Remove the item specified by the iterator.
Implements iterable.
Definition at line 208 of file array.hpp.
Referenced by pqueue::pop(), string::remove(), and pqueue::remove().
| void resize | ( | const gsgl::index_t & | new_num_elements | ) | [inline, protected, inherited] |
Definition at line 258 of file array.hpp.
References simple_array::capacity, simple_array::data, simple_array::num_elements, and array_base::reallocate().
Referenced by simple_array::append(), simple_array< gsgl::data::dictionary< T, I >::dict_node * >::clear(), simple_array::item(), and simple_stack::pop().
| void set | ( | void * | dest, | |
| const unsigned char & | val, | |||
| const gsgl::index_t & | num_bytes | |||
| ) | [protected, inherited] |
| virtual gsgl::index_t size | ( | ) | const [inline, virtual, inherited] |
A generic count function that iterates over the collection.
Reimplemented from iterable.
Definition at line 96 of file array.hpp.
Referenced by string::append(), vehicle::calculate_inertia_tensor(), shader_base::compile(), stellar_db::draw(), spherical_quadtree::get_new_vertex_index(), node_relative_path::initialize(), simple_stack::pop(), string::size(), pqueue::size(), simple_stack::top(), and stellar_db::~stellar_db().
| T & top | ( | ) | [inline] |
Definition at line 109 of file stack.hpp.
References simple_array::item(), and simple_array::size().
| const T & top | ( | ) | const [inline] |
1.5.5