RuntimeFieldAccessor

An accessor that erases returned property's type.

ImplSpec: The accessor will simply upcast any property field to Object if they are rooted in Object class, otherwise it will allocate a Placeholder!FieldType for returned value and return it erased up to Object class. As such it is advised to use an allocator that will dispose automatically it's contents once they are not required. The accessor itself is not responsible for deallocation of placeholders that it returned. As a consequence no components should point to placeholders allocated by this accessor.

Constructors

this
this(PropertyAccessor!(ComponentType, FieldType, KeyType) accessor)

Constructor for runtime field accessor.

Members

Functions

access
Object access(ComponentType component, KeyType path)

Get a property out of component

accessor
typeof(this) accessor(PropertyAccessor!(ComponentType, FieldType, KeyType) accessor)

Set accessor

accessor
inout(PropertyAccessor!(ComponentType, FieldType, KeyType)) accessor()

Get accessor

componentType
TypeInfo componentType(ComponentType component)

Identify the type of supported component.

has
bool has(ComponentType component, KeyType path)

Check if requested property is present in component.

Mixins

__anonymous
mixin AllocatorAwareMixin!(typeof(this))
Undocumented in source.

Meta