papyrus logo

Papyrus::DrawableSet Class Reference

Provides an implementation of a set that stores drawables and emits signals when drawables are added, removed, changed, et. More...

#include <drawableset.h>

Inheritance diagram for Papyrus::DrawableSet:
Inheritance graph

List of all members.

Public Types

typedef PapyrusPointer
< DrawableSet
typedef std::set
< Drawable::pointer
typedef Drawables::iterator iterator
typedef Drawables::reverse_iterator reverse_iterator
typedef Drawables::const_iterator const_iterator

Public Member Functions

 DrawableSet (pointer to_copy=pointer())
virtual ~DrawableSet ()
const Drawablesdrawables ()
virtual void set_drawables (pointer drawables)
virtual void set_drawables (const DrawableSet &drawables)
virtual void add (Drawable::pointer drawable)
virtual void remove (Drawable::pointer drawable)
virtual void clear ()
virtual bool has (Drawable::pointer drawable) const
virtual size_t size () const
virtual iterator begin ()
virtual const_iterator begin () const
virtual iterator end ()
virtual const_iterator end () const
virtual reverse_iterator rbegin ()
virtual const_reverse_iterator rbegin () const
virtual reverse_iterator rend ()
virtual const_reverse_iterator rend () const
virtual bool empty () const
Region extents ()
virtual void link (DrawableSet::pointer s)
 Links this set to the parameter set causing this set to add/remove items as the other set adds/removes items.
virtual void unlink (DrawableSet::pointer s)
 Unlinks the other set from this set.

Protected Member Functions

void on_linked_set_drawable_added (Drawable::pointer added)
void on_linked_set_drawable_removed (Drawable::pointer removed)

Protected Attributes

Drawables m_drawables
std::map< DrawableSet::pointer,
sigc::connection > 
std::map< DrawableSet::pointer,
sigc::connection > 

Detailed Description

Provides an implementation of a set that stores drawables and emits signals when drawables are added, removed, changed, et.


Rick L Vinyard Jr <>

Member Typedef Documentation

typedef Drawables::const_iterator Papyrus::DrawableSet::const_iterator
typedef Drawables::const_reverse_iterator Papyrus::DrawableSet::const_reverse_iterator
typedef Drawables::iterator Papyrus::DrawableSet::iterator
typedef PapyrusPointer<DrawableSet> Papyrus::DrawableSet::pointer
typedef Drawables::reverse_iterator Papyrus::DrawableSet::reverse_iterator

Constructor & Destructor Documentation

Papyrus::DrawableSet::DrawableSet ( pointer  to_copy = pointer()  ) 

References m_drawables.

Papyrus::DrawableSet::~DrawableSet (  )  [virtual]

References clear().

Member Function Documentation

void Papyrus::DrawableSet::add ( Drawable::pointer  drawable  )  [virtual]
DrawableSet::const_iterator Papyrus::DrawableSet::begin (  )  const [virtual]

References m_drawables.

DrawableSet::iterator Papyrus::DrawableSet::begin (  )  [virtual]

References m_drawables.

void Papyrus::DrawableSet::clear (  )  [virtual]
const DrawableSet::Drawables & Papyrus::DrawableSet::drawables (  ) 

References m_drawables.

bool Papyrus::DrawableSet::empty (  )  const [virtual]

Implements Papyrus::DrawableContainer.

References m_drawables.

DrawableSet::const_iterator Papyrus::DrawableSet::end (  )  const [virtual]

References m_drawables.

DrawableSet::iterator Papyrus::DrawableSet::end (  )  [virtual]

References m_drawables.

Region Papyrus::DrawableSet::extents (  ) 
bool Papyrus::DrawableSet::has ( Drawable::pointer  drawable  )  const [virtual]
void Papyrus::DrawableSet::link ( DrawableSet::pointer  s  )  [virtual]

Links this set to the parameter set causing this set to add/remove items as the other set adds/removes items.

This is not a bi-directional link. The other set will not be modified if items are added to this set.

References add(), m_linked_added_conn_map, m_linked_removed_conn_map, on_linked_set_drawable_added(), and on_linked_set_drawable_removed().

void Papyrus::DrawableSet::on_linked_set_drawable_added ( Drawable::pointer  added  )  [protected]

References add().

Referenced by link().

void Papyrus::DrawableSet::on_linked_set_drawable_removed ( Drawable::pointer  removed  )  [protected]

Referenced by link().

DrawableSet::const_reverse_iterator Papyrus::DrawableSet::rbegin (  )  const [virtual]

References m_drawables.

DrawableSet::reverse_iterator Papyrus::DrawableSet::rbegin (  )  [virtual]

References m_drawables.

void Papyrus::DrawableSet::remove ( Drawable::pointer  drawable  )  [virtual]
DrawableSet::const_reverse_iterator Papyrus::DrawableSet::rend (  )  const [virtual]

References m_drawables.

DrawableSet::reverse_iterator Papyrus::DrawableSet::rend (  )  [virtual]

References m_drawables.

void Papyrus::DrawableSet::set_drawables ( const DrawableSet drawables  )  [virtual]
void Papyrus::DrawableSet::set_drawables ( pointer  drawables  )  [virtual]
size_t Papyrus::DrawableSet::size (  )  const [virtual]
void Papyrus::DrawableSet::unlink ( DrawableSet::pointer  s  )  [virtual]

Unlinks the other set from this set.

References m_linked_added_conn_map, and m_linked_removed_conn_map.

Member Data Documentation

std::map< DrawableSet::pointer, sigc::connection > Papyrus::DrawableSet::m_linked_added_conn_map [protected]

Referenced by link(), and unlink().

std::map< DrawableSet::pointer, sigc::connection > Papyrus::DrawableSet::m_linked_removed_conn_map [protected]

Referenced by link(), and unlink().

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

Generated on Fri Apr 16 12:41:06 2010 for papyrus by doxygen 1.6.1