iterable Class Template Reference

#include <iterable.hpp>

Inherits countable.

Inherited by dictionary< float, wchar_t >, dictionary< gsgl::data::broker_creator *, gsgl::string >, dictionary< gsgl::data::dictionary< int, int >, int >, dictionary< gsgl::platform::texture *, wchar_t >, dictionary< gsgl::scenegraph::material_impl *, gsgl::string >, dictionary< gsgl::scenegraph::mesh *, gsgl::string >, dictionary< gsgl::string, gsgl::string >, dictionary< T *, gsgl::string >, dictionary< unsigned int, gsgl::string >, dictionary, list, pqueue, simple_array, string, list< gsgl::data::config_record >, list< gsgl::data::log_target * >, list< gsgl::data_object * >, list< gsgl::framework::package * >, list< gsgl::framework::pkg_library * >, list< gsgl::framework::pkg_scenery * >, list< gsgl::framework::pkg_vehicle * >, list< gsgl::framework::tabbox::tab_rec >, list< gsgl::framework::treebox_node * >, list< gsgl::io::directory >, list< gsgl::io::file >, list< gsgl::platform::shader_base * >, list< gsgl::platform::vertex_buffer * >, list< gsgl::scenegraph::node * >, list< gsgl::string >, pqueue< gsgl::scenegraph::light *, float >, pqueue< gsgl::scenegraph::node *, float >, simple_array< char >, simple_array< float >, simple_array< gsgl::data::dictionary< T, I >::dict_node * >, simple_array< gsgl::data::pair * >, simple_array< gsgl::framework::treebox_node * >, simple_array< gsgl::framework::widget * >, simple_array< gsgl::physics::vehicle_module * >, simple_array< gsgl::platform::buffer_pool::bucket * >, simple_array< gsgl::platform::buffer_pool::object_record >, simple_array< gsgl::scenegraph::light * >, simple_array< gsgl::scenegraph::model * >, simple_array< gsgl::scenegraph::model_part * >, simple_array< gsgl::scenegraph::node * >, simple_array< gsgl::scenegraph::submesh * >, simple_array< gsgl::string * >, simple_array< I >, simple_array< unsigned char >, simple_array< unsigned int >, and simple_array< wchar_t >.

Collaboration diagram for iterable:

Collaboration graph
[legend]

List of all members.


Detailed Description

template<typename T, typename IBase>
class gsgl::data::iterable< T, IBase >

A collection whose elements may be iterated over from beginning to end.

Items in the collection must implement operator==(). Iterators must implement the following functions: is_valid(), operator*() and operator++(), as well as the usual copy constructor and assignment operator.

Definition at line 50 of file iterable.hpp.


Public Member Functions

virtual void clear ()=0
 Clears the contents of the collection.
virtual bool is_empty () const
 Returns true if the collection is empty.
 iterable ()
virtual ~iterable ()
Other Useful Functions
virtual void append (const T &)=0
 Add an item to the end of the collection.
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.
virtual void insert (const iterator &, const T &)=0
 Insert an item before the one specified by the iterator.
virtual void remove (const iterator &)=0
 Remove the item specified by the iterator.
Iterators
iterator iter ()
const_iterator iter () const
Countable Implementation
virtual gsgl::index_t size () const
 A generic count function that iterates over the collection.

Classes

class  const_iterator
class  iterator

Constructor & Destructor Documentation

iterable (  )  [inline]

Definition at line 123 of file iterable.hpp.

~iterable (  )  [inline, virtual]

Definition at line 129 of file iterable.hpp.


Member Function Documentation

virtual void append ( const T &   )  [pure virtual]

Add an item to the end of the collection.

Implemented in simple_array, dictionary, list, and pqueue.

void append ( const iterable< T, IBase > &  a  )  [inline, virtual]

Append all members of a collection to this one.

Definition at line 145 of file iterable.hpp.

virtual void clear (  )  [pure virtual, inherited]

Clears the contents of the collection.

Implemented in simple_array, dictionary, list, pqueue, string, simple_array< gsgl::string * >, simple_array< gsgl::platform::buffer_pool::bucket * >, simple_array< gsgl::framework::treebox_node * >, simple_array< float >, simple_array< gsgl::scenegraph::model_part * >, simple_array< unsigned int >, simple_array< gsgl::framework::widget * >, simple_array< gsgl::scenegraph::light * >, simple_array< gsgl::physics::vehicle_module * >, simple_array< unsigned char >, simple_array< gsgl::scenegraph::model * >, simple_array< wchar_t >, simple_array< gsgl::scenegraph::node * >, simple_array< char >, simple_array< gsgl::scenegraph::submesh * >, simple_array< gsgl::data::pair * >, simple_array< I >, simple_array< gsgl::platform::buffer_pool::object_record >, simple_array< gsgl::data::dictionary< T, I >::dict_node * >, dictionary< T *, gsgl::string >, dictionary< gsgl::scenegraph::mesh *, gsgl::string >, dictionary< gsgl::platform::texture *, wchar_t >, dictionary< gsgl::scenegraph::material_impl *, gsgl::string >, dictionary< gsgl::data::dictionary< int, int >, int >, dictionary< unsigned int, gsgl::string >, dictionary< gsgl::string, gsgl::string >, dictionary< gsgl::data::broker_creator *, gsgl::string >, dictionary< float, wchar_t >, list< gsgl::framework::treebox_node * >, list< gsgl::data::log_target * >, list< gsgl::io::file >, list< gsgl::string >, list< gsgl::framework::pkg_scenery * >, list< gsgl::platform::shader_base * >, list< gsgl::framework::pkg_library * >, list< gsgl::data::config_record >, list< gsgl::data_object * >, list< gsgl::io::directory >, list< gsgl::scenegraph::node * >, list< gsgl::platform::vertex_buffer * >, list< gsgl::framework::tabbox::tab_rec >, list< gsgl::framework::pkg_vehicle * >, list< gsgl::framework::package * >, pqueue< gsgl::scenegraph::light *, float >, and pqueue< gsgl::scenegraph::node *, float >.

iterable< T, IBase >::iterator find_value ( const T &  item  )  [inline, virtual]

Definition at line 168 of file iterable.hpp.

References iterable::iterator::is_valid().

iterable< T, IBase >::const_iterator find_value ( const T &  item  )  const [inline, virtual]

A generic find function that iterates over the collection to find a particular value.

Note:
Not efficient; should be overridden if possible.

Definition at line 153 of file iterable.hpp.

References iterable::const_iterator::is_valid().

Referenced by gsgl::data::global_unregister_resource_aux().

virtual void insert ( const iterator ,
const T &   
) [pure virtual]

Insert an item before the one specified by the iterator.

Implemented in simple_array, dictionary, list, and pqueue.

virtual bool is_empty (  )  const [inline, virtual, inherited]

iterator iter (  )  [inline]

Returns:
An iterator pointing to the first item in the collection.

Definition at line 101 of file iterable.hpp.

const_iterator iter (  )  const [inline]

virtual void remove ( const iterator  )  [pure virtual]

Remove the item specified by the iterator.

Implemented in simple_array, dictionary, list, pqueue, string, simple_array< gsgl::string * >, simple_array< gsgl::platform::buffer_pool::bucket * >, simple_array< gsgl::framework::treebox_node * >, simple_array< float >, simple_array< gsgl::scenegraph::model_part * >, simple_array< unsigned int >, simple_array< gsgl::framework::widget * >, simple_array< gsgl::scenegraph::light * >, simple_array< gsgl::physics::vehicle_module * >, simple_array< unsigned char >, simple_array< gsgl::scenegraph::model * >, simple_array< wchar_t >, simple_array< gsgl::scenegraph::node * >, simple_array< char >, simple_array< gsgl::scenegraph::submesh * >, simple_array< gsgl::data::pair * >, simple_array< I >, simple_array< gsgl::platform::buffer_pool::object_record >, simple_array< gsgl::data::dictionary< T, I >::dict_node * >, dictionary< T *, gsgl::string >, dictionary< gsgl::scenegraph::mesh *, gsgl::string >, dictionary< gsgl::platform::texture *, wchar_t >, dictionary< gsgl::scenegraph::material_impl *, gsgl::string >, dictionary< gsgl::data::dictionary< int, int >, int >, dictionary< unsigned int, gsgl::string >, dictionary< gsgl::string, gsgl::string >, dictionary< gsgl::data::broker_creator *, gsgl::string >, dictionary< float, wchar_t >, list< gsgl::framework::treebox_node * >, list< gsgl::data::log_target * >, list< gsgl::io::file >, list< gsgl::string >, list< gsgl::framework::pkg_scenery * >, list< gsgl::platform::shader_base * >, list< gsgl::framework::pkg_library * >, list< gsgl::data::config_record >, list< gsgl::data_object * >, list< gsgl::io::directory >, list< gsgl::scenegraph::node * >, list< gsgl::platform::vertex_buffer * >, list< gsgl::framework::tabbox::tab_rec >, list< gsgl::framework::pkg_vehicle * >, list< gsgl::framework::package * >, pqueue< gsgl::scenegraph::light *, float >, and pqueue< gsgl::scenegraph::node *, float >.

gsgl::index_t size (  )  const [inline, virtual]

A generic count function that iterates over the collection.

Note:
Not very efficient; should be overridden if possible.

Implements countable.

Reimplemented in simple_array, list, pqueue, string, simple_array< gsgl::string * >, simple_array< gsgl::platform::buffer_pool::bucket * >, simple_array< gsgl::framework::treebox_node * >, simple_array< float >, simple_array< gsgl::scenegraph::model_part * >, simple_array< unsigned int >, simple_array< gsgl::framework::widget * >, simple_array< gsgl::scenegraph::light * >, simple_array< gsgl::physics::vehicle_module * >, simple_array< unsigned char >, simple_array< gsgl::scenegraph::model * >, simple_array< wchar_t >, simple_array< gsgl::scenegraph::node * >, simple_array< char >, simple_array< gsgl::scenegraph::submesh * >, simple_array< gsgl::data::pair * >, simple_array< I >, simple_array< gsgl::platform::buffer_pool::object_record >, simple_array< gsgl::data::dictionary< T, I >::dict_node * >, list< gsgl::framework::treebox_node * >, list< gsgl::data::log_target * >, list< gsgl::io::file >, list< gsgl::string >, list< gsgl::framework::pkg_scenery * >, list< gsgl::platform::shader_base * >, list< gsgl::framework::pkg_library * >, list< gsgl::data::config_record >, list< gsgl::data_object * >, list< gsgl::io::directory >, list< gsgl::scenegraph::node * >, list< gsgl::platform::vertex_buffer * >, list< gsgl::framework::tabbox::tab_rec >, list< gsgl::framework::pkg_vehicle * >, list< gsgl::framework::package * >, pqueue< gsgl::scenegraph::light *, float >, and pqueue< gsgl::scenegraph::node *, float >.

Definition at line 135 of file iterable.hpp.


The documentation for this class was generated from the following file:

Generated on Sat Mar 1 13:50:05 2008 for Periapsis Project by  doxygen 1.5.5