|
Public Types |
typedef std::vector< Model * > | ChildList |
typedef ContainerIterator<
ChildList > | ChildIterator |
typedef ConstContainerIterator<
ChildList > | ConstChildIterator |
typedef std::set< ModelListener * > | ListenerSet |
Public Member Functions |
| Model () |
| Constructs an empty, unnamed Model.
|
virtual | ~Model () |
void | setName (const String &name) |
| Sets the name for this Model.
|
const String & | getName () const |
| Returns the name of the Model.
|
Model * | getParent () const |
| Returns the parent, or 0 if there is none.
|
void | clearChanged () |
| Clear the Model of its changed status.
|
bool | isChanged () const |
| Returns true if the Model has been modified.
|
void | linkModel (Model *model) |
| Links the given Model's properties to this one's.
|
void | linkModel (ModelPtr model) |
| Links the given model's properties to this one's.
|
void | unlinkModel (Model *model) |
| Unlinks the given model's properties to this one's.
|
void | unlinkModel (ModelPtr model) |
| Unlinks the given model's properties to this one's.
|
String | getPropertyName (PropertyBase *prop) const |
| Does a lookup for the name of the given Property.
|
bool | containsProperty (const String &name) const |
| Returns true of the givened named property is a member of this model.
|
PropertyProxy | getProperty (const String &name) |
| Returns a proxy to the named property.
|
PropertyIterator | getPropertyIterator () const |
| Returns an iterator over the contained properties.
|
void | linkProperty (const String &root, const PropertyProxy &leaf) |
| Links two properties together so the second is always in sync with the first.
|
void | linkProperty (const String &root, const String &leaf) |
| Links two internal properties together so the second is always in sync with the first.
|
void | linkProperty (const String &root, const PropertyProxy &leaf, PropertyLinkPtr link) |
| Links two properties together so the second is always in sync with the first.
|
void | linkProperty (const String &root, const String &leaf, PropertyLinkPtr link) |
| Links two internal properties together so the second is always in sync with the first.
|
void | unlinkProperty (const String &root, const PropertyProxy &leaf) |
| Removes a link between two properties.
|
void | unlinkProperty (const String &root, const String &leaf) |
| Removes a link between two internal properties.
|
void | clearLinkedProperties (const String &name) |
| Removes all links held by the given root property.
|
ModelPtr | createChild (const String &name) |
| Create a new empty Model with the given name in the ModelManager.
|
ModelPtr | createChild (const String &typeID, const String &name) |
| Creates anew Model with the given typeid and the given name in the ModelManager.
|
size_t | addChild (Model *model) |
| Adds a new child model to this model.
|
size_t | addChild (const String &name) |
| Adds a new child with the given name.
|
size_t | addChild (size_t index) |
| Adds a new child at the given index.
|
void | removeChild (Model *model) |
| Removes the given child.
|
void | removeChild (size_t index) |
| Removes the given child.
|
bool | containsChild (const String &name) const |
| Returns true if this model has a child with the given name.
|
Model * | getChild (size_t index) const |
| Return a child at the given (internal) index.
|
void | clearChildren () |
| Removes all children from this model.
|
size_t | getChildCount () const |
| Returns the number of children in this Model.
|
ChildIterator | getChildIterator () |
| Returns an iterator over the Model's children.
|
ConstChildIterator | getChildIterator () const |
| Returns an iterator over the Model's children.
|
void | addListener (ModelListener *listener) |
void | removeListener (ModelListener *listener) |
void | clearListeners () |
void | notifyListeners () |
void | notifyListeners (ModelListener *listener) |
virtual bool | onAdding (Manager< ModelPtr > &) const |
virtual bool | onRemoving (Manager< ModelPtr > &) const |
Protected Types |
typedef std::map< String,
PropertyBase * > | PropertyMap |
Protected Member Functions |
void | registerProperty (const String &name, PropertyBase &prop) |
void | incChangeState () |
void | decChangeState () |
Protected Attributes |
String | _name |
Model * | _parent |
PropertyMap | _properties |
ChildList | _children |
std::set< Model * > | _set |
ListenerSet | _listeners |
Friends |
class | ModelManager |
class | PropertyBase |
Classes |
class | PropertyIterator |