papyrus logo

Papyrus::Object Class Reference

Base object that provides a common concept of a string identifier and a signal emitted when the object is changed. More...

#include <object.h>

Inheritance diagram for Papyrus::Object:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual ~Object ()
const Glib::ustring & id () const
void set_id (const Glib::ustring &i)
virtual void set (const AttributeValueMap &avmap)
sigc::signal< void > & signal_changed ()
sigc::signal< void > & signal_id_changed ()

Protected Member Functions

 Object (const Glib::ustring &id=Glib::ustring())
 Object (const AttributeValueMap &avmap)
AttributeValueMap::const_iterator find_attribute (const AttributeValueMap &avmap, const Glib::ustring &attribute)
 Finds an attribute in the Attribute-Value map using caseless comparisons.

Protected Attributes

Glib::ustring m_id
sigc::signal< void > m_signal_changed
sigc::signal< void > m_signal_id_changed

Detailed Description

Base object that provides a common concept of a string identifier and a signal emitted when the object is changed.

The meaning of 'changed' is dependent upon the interpretation of derived types.

Author:
Rick L Vinyard Jr

Constructor & Destructor Documentation

Papyrus::Object::Object ( const Glib::ustring &  id = Glib::ustring()  )  [inline, protected]
Papyrus::Object::Object ( const AttributeValueMap avmap  )  [inline, protected]
virtual Papyrus::Object::~Object (  )  [inline, virtual]

Member Function Documentation

AttributeValueMap::const_iterator Papyrus::Object::find_attribute ( const AttributeValueMap avmap,
const Glib::ustring &  attribute 
) [inline, protected]

Finds an attribute in the Attribute-Value map using caseless comparisons.

This is an O(n) operation, so looking up multiple attributes may be much slower than just iterating through the map once.

References Papyrus::strcaseeq().

Referenced by set().

const Glib::ustring& Papyrus::Object::id (  )  const [inline]

References m_id.

Referenced by Papyrus::Group::has().

virtual void Papyrus::Object::set ( const AttributeValueMap avmap  )  [inline, virtual]
void Papyrus::Object::set_id ( const Glib::ustring &  i  )  [inline]

References m_id, and m_signal_id_changed.

Referenced by set().

sigc::signal<void>& Papyrus::Object::signal_changed (  )  [inline]
sigc::signal<void>& Papyrus::Object::signal_id_changed (  )  [inline]

References m_signal_id_changed.


Member Data Documentation

Glib::ustring Papyrus::Object::m_id [protected]

Referenced by id(), and set_id().

sigc::signal<void> Papyrus::Object::m_signal_changed [protected]
sigc::signal<void> Papyrus::Object::m_signal_id_changed [protected]

Referenced by set_id(), and signal_id_changed().


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

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