iz.properties

The iz property descriptor system.

Members

Aliases

GenericDescriptor
alias GenericDescriptor = PropDescriptor!int

Used as a generic property descriptor when Rtti are used to detect the target type.

GetSet
alias GetSet = SetGet

designed to annotate a field used as a property without accessors.

PropHints
alias PropHints = EnumSet!(PropHint, Set8)

PropHints can be used to set the hints attributed to a property, using the UDA syntax: @PropHints(...).

Classes

PropertyBinder
class PropertyBinder(T, bool RttiCheck = false)

A PropertyBinder synchronizes the value of several variables between themselves.

Enums

Get
enum Get

designed to annotate a property getter, e.g @Get

HideGet
enum HideGet

designed to cancel the effect of @Set and @Get in the ancestor classes.

HideSet
enum HideSet

designed to cancel the effect of @Set and @Get in the ancestor classes.

PropHint
enum PropHint

Enumerates the property hints.

Set
enum Set

designed to annotate a property setter, e.g @Set

SetGet
enum SetGet

designed to annotate a field used as a property without accessors.

Functions

areBindable
bool areBindable(PropDescriptor!S* source, PropDescriptor!T* target)

Returns true if two property descriptors are bindable. To be bindable, the property name must be identical but also their types. Type checking is based on RTTI and neither source nor target needs to be passed with the correct type.

bindPublications
void bindPublications(auto ref S src, auto ref T trg)

Binds two property publishers.

destructOwnedPublishers
void destructOwnedPublishers(PropertyPublisher pub)

Destructs the PropertyPublishers that are published and owned by an object.

findPublisher
PropertyPublisher findPublisher(PropertyPublisher pub, string accessChain)

Finds a sub-publisher in an object's publications tree.

genPropFromField
string genPropFromField()

When mixed in an agregate this generates a property. This property is detectable by a PropertyPublisher.

getThis
void* getThis(ref T t)

Allows to get the original this of a struct, for example when passed from a ref getter function.

isPropertyPublisher
bool isPropertyPublisher()
bool isPropertyPublisher(Object o)

Returns true if the argument is a property publisher.

setTargetObjectOwner
void setTargetObjectOwner(PropDescriptor!Object* descriptor, T t)

Constrains the target of a PropDescriptor!Object to be owned by a particular object.

targetObjectOwnedBy
bool targetObjectOwnedBy(PropDescriptor!Object* descriptor, T t)

Returns true if the target of a PropDescriptor!Object is owned by another object.

Interfaces

PropertyPublisher
interface PropertyPublisher

The PropertyPublisher interface allows a class to publish a collection of properties described using the PropDescriptor format.

Mixin templates

PropertyPublisherImpl
mixin template PropertyPublisherImpl()

Default implementation of a PropertyPublisher.

Structs

PropDescriptor
struct PropDescriptor(T)

Describes a property declared in an aggregate.

Meta