#include <property.h>
Inheritance diagram for Odyssey::PropertyBase:
Public Types | |
typedef std::map< String, Variable > | AttributeMap |
typedef MapContainerIterator< AttributeMap > | AttributeIterator |
typedef ConstMapContainerIterator< AttributeMap > | ConstAttributeIterator |
Public Member Functions | |
virtual | ~PropertyBase () |
virtual const type_info & | getTypeInfo () const =0 |
Returns the type information for the held type. | |
Model * | getModel () const |
Returns the owner Model for this Property. | |
void | clearChanged () |
Clears the change state. | |
bool | isChanged () const |
Returns true if this Property has been changed. | |
void | lock () |
Locks the property from being written to. | |
void | unlock () |
Unlocks the property for writing. | |
bool | isLocked () const |
Returns true if the property is locked against writing. | |
bool | containsAttribute (const String &name) const |
Returns true of this property contains an Attribute with the given name. | |
void | setAttribute (const String &name, const Variable &attr) |
Sets the attribute value with the given name. | |
Variable | getAttribute (const String &name) const |
Returns the attribute value with the given name. | |
AttributeIterator | getAttributeIterator () |
Returns an iterator over the attributes. | |
ConstAttributeIterator | getAttributeIterator () const |
Returns an iterator over the attributes. | |
void | addListener (PropertyListener *listener) |
Adds a new listener for notifications. | |
void | removeListener (PropertyListener *listener) |
Removes the given listener from this property. | |
void | clearListeners () |
Removes all of the listeners for this property. | |
void | notifyListeners () |
Send notifications to each listener. | |
void | notifyListeners (PropertyListener *listener) |
Send notifications to each listener but the specified one. | |
void | linkProperty (PropertyBase *prop) |
Links the given property to this one. | |
void | linkProperty (PropertyBase *prop, PropertyLinkPtr link) |
Links the given property to this one. | |
void | unlinkProperty (PropertyBase *prop) |
Removes a previously-linked property. | |
void | clearLinkedProperties () |
Removes all of the linked properties. | |
void | _syncLinkedProperties () |
Syncs the linked properties with this one. | |
virtual void | _fromAny (const Any &) |
Internal function for conversion from an Any. | |
virtual Any | _toAny () const |
Internal function for conversion to an Any. | |
virtual void | _fromString (const Odyssey::String &) |
Internal function for conversion from a String. | |
virtual Odyssey::String | _toString () const |
Internal function for conversion to a String. | |
virtual void | _fromAny (size_t, const Any &) |
Internal function for conversion from an Any. | |
virtual Any | _toAny (size_t) const |
Internal function for conversion to an Any. | |
virtual void | _fromString (size_t, const Odyssey::String &) |
Internal function for conversion from a String. | |
virtual Odyssey::String | _toString (size_t) const |
Internal function for conversion to a String. | |
virtual void | _fromAny (const String &, const Any &) |
Internal function for conversion from an Any. | |
virtual Any | _toAny (const String &) const |
Internal function for conversion to an Any. | |
virtual void | _fromString (const String &, const Odyssey::String &) |
Internal function for conversion from a String. | |
virtual Odyssey::String | _toString (const String &) const |
Internal function for conversion to a String. | |
PropertyProxy | createProxy () |
Creates a new proxy object for this property. | |
virtual Variable | var () const |
Returns a variable representation of this property's data. | |
virtual Variable | var (size_t) const |
Returns a variable representation of this property's data. | |
virtual Variable | var (const Odyssey::String &) const |
Returns a variable representation of this property's data. | |
virtual PropertyValueIteratorPtr | createValueIterator () const |
Creates a new iterator for the values in the property. | |
Protected Types | |
typedef std::map< PropertyBase *, PropertyLinkPtr > | LinkMap |
Protected Member Functions | |
PropertyBase () | |
void | setChanged () |
Protected Attributes | |
bool | _locked |
AttributeMap | _attributes |
LinkMap | _links |
Friends | |
class | Model |
This is the base class for all Property types in Odyssey. It provides generic data conversions (similar to the holders for variables), as well as behavior to track change state, attributes, and listeners.
|
|
|
|
|
|
|
|
|
|
|
|
|
Internal function for conversion from an Any.
Reimplemented in Odyssey::MapProperty< TypeT, TraitsT, MapTraitsT >, and Odyssey::MapProperty< TypeT, TraitsT >. |
|
Internal function for conversion from an Any.
Reimplemented in Odyssey::VectorProperty< TypeT, TraitsT, VectorTraitsT >, and Odyssey::VectorProperty< TypeT, TraitsT >. |
|
Internal function for conversion from an Any.
Reimplemented in Odyssey::MapProperty< TypeT, TraitsT, MapTraitsT >, Odyssey::Property< TypeT, TraitsT >, Odyssey::VectorProperty< TypeT, TraitsT, VectorTraitsT >, Odyssey::MapProperty< TypeT, TraitsT >, and Odyssey::VectorProperty< TypeT, TraitsT >. |
|
Internal function for conversion from a String.
Reimplemented in Odyssey::MapProperty< TypeT, TraitsT, MapTraitsT >, and Odyssey::MapProperty< TypeT, TraitsT >. |
|
Internal function for conversion from a String.
Reimplemented in Odyssey::VectorProperty< TypeT, TraitsT, VectorTraitsT >, and Odyssey::VectorProperty< TypeT, TraitsT >. |
|
Internal function for conversion from a String.
Reimplemented in Odyssey::Property< TypeT, TraitsT >. |
|
Syncs the linked properties with this one.
|
|
Internal function for conversion to an Any.
Reimplemented in Odyssey::MapProperty< TypeT, TraitsT, MapTraitsT >, and Odyssey::MapProperty< TypeT, TraitsT >. |
|
Internal function for conversion to an Any.
Reimplemented in Odyssey::VectorProperty< TypeT, TraitsT, VectorTraitsT >, and Odyssey::VectorProperty< TypeT, TraitsT >. |
|
Internal function for conversion to an Any.
Reimplemented in Odyssey::MapProperty< TypeT, TraitsT, MapTraitsT >, Odyssey::Property< TypeT, TraitsT >, Odyssey::VectorProperty< TypeT, TraitsT, VectorTraitsT >, Odyssey::MapProperty< TypeT, TraitsT >, and Odyssey::VectorProperty< TypeT, TraitsT >. |
|
Internal function for conversion to a String.
Reimplemented in Odyssey::MapProperty< TypeT, TraitsT, MapTraitsT >, and Odyssey::MapProperty< TypeT, TraitsT >. |
|
Internal function for conversion to a String.
Reimplemented in Odyssey::VectorProperty< TypeT, TraitsT, VectorTraitsT >, and Odyssey::VectorProperty< TypeT, TraitsT >. |
|
Internal function for conversion to a String.
Reimplemented in Odyssey::Property< TypeT, TraitsT >. |
|
Adds a new listener for notifications.
|
|
Clears the change state. This function will set the change state back to false. This means that no matter what, this Property will be flagged as unchanged. |
|
Removes all of the linked properties.
|
|
Removes all of the listeners for this property.
|
|
Returns true of this property contains an Attribute with the given name.
|
|
Creates a new proxy object for this property. This function will generate a proxy which can be used for remote (i.e. not direct) access to this property. The Proxy provides more convenient interfaces for the property's behaviors. |
|
Creates a new iterator for the values in the property. This function creates a new value iterator to access the value(s) that are stored in this property. The iterator will be defined by Property implementations. Reimplemented in Odyssey::MapProperty< TypeT, TraitsT, MapTraitsT >, Odyssey::Property< TypeT, TraitsT >, Odyssey::VectorProperty< TypeT, TraitsT, VectorTraitsT >, Odyssey::MapProperty< TypeT, TraitsT >, and Odyssey::VectorProperty< TypeT, TraitsT >. |
|
Returns the attribute value with the given name.
|
|
Returns an iterator over the attributes.
|
|
Returns an iterator over the attributes.
|
|
Returns the owner Model for this Property.
|
|
Returns the type information for the held type.
Implemented in Odyssey::MapProperty< TypeT, TraitsT, MapTraitsT >, Odyssey::Property< TypeT, TraitsT >, Odyssey::VectorProperty< TypeT, TraitsT, VectorTraitsT >, Odyssey::MapProperty< TypeT, TraitsT >, and Odyssey::VectorProperty< TypeT, TraitsT >. |
|
Returns true if this Property has been changed.
|
|
Returns true if the property is locked against writing.
|
|
Links the given property to this one. This function will link a property to this one. It allows for you to assign a filter and a mutator to this link. This lets you control when and how the update happpens.
|
|
Links the given property to this one. This function links a new property to this one. Whenever this property is changed, the links properties are automatically synced.
|
|
Locks the property from being written to.
|
|
Send notifications to each listener but the specified one.
|
|
Send notifications to each listener.
|
|
Removes the given listener from this property.
|
|
Sets the attribute value with the given name.
|
|
|
|
Removes a previously-linked property.
|
|
Unlocks the property for writing.
|
|
Returns a variable representation of this property's data.
Reimplemented in Odyssey::MapProperty< TypeT, TraitsT, MapTraitsT >, and Odyssey::MapProperty< TypeT, TraitsT >. |
|
Returns a variable representation of this property's data.
Reimplemented in Odyssey::VectorProperty< TypeT, TraitsT, VectorTraitsT >, and Odyssey::VectorProperty< TypeT, TraitsT >. |
|
Returns a variable representation of this property's data.
Reimplemented in Odyssey::MapProperty< TypeT, TraitsT, MapTraitsT >, Odyssey::Property< TypeT, TraitsT >, Odyssey::VectorProperty< TypeT, TraitsT, VectorTraitsT >, Odyssey::MapProperty< TypeT, TraitsT >, and Odyssey::VectorProperty< TypeT, TraitsT >. |
|
|
|
|
|
|
|
|