PropertyBinder

A PropertyBinder synchronizes the value of several variables between themselves.

The access to the variables is done via the PropDescriptor format, hence a PropertyBinder stores a list of PropDescriptor with the same types.

Constructors

this
this()

Destructor

A destructor is present on this object, but not explicitly documented in the source.

Members

Functions

addBinding
ptrdiff_t addBinding(ref PropDescriptor!T prop, bool isSource = false)

Adds a property to the list. If the binder is not local then aProp should neither be a local descriptor, otherwise the descritpor reference will become invalid.

change
void change(T value)

Triggers the setter of each property. This method is usually called at the end of a setter method (in the master/source setter).

items
ContiguousList!(PropDescriptor!T*) items()

Provides an access to the property descriptors for additional List operations. Note that the items whose life-time is managed should not be modified.

newBinding
PropDescriptor!T* newBinding()

Adds a new property to the list. The life-time of the new descriptor is handled internally.

removeBinding
void removeBinding(size_t index)

Removes the aIndex-nth property from the list. The item is freed if it has been allocated by newBinding. source might be invalidated if it matches the item.

source
void source(ref PropDescriptor!T src)

Sets the property used as source in updateFromSource().

source
PropDescriptor!T* source()

Returns the property used as source in _updateFromSource().

updateFromSource
void updateFromSource()

Calls change() using the value of source.

Meta