DirtyGetter

Generates a getter for a field that can be marked as dirty. Calls updateFunc if is dirty.

  1. template DirtyGetter(alias field, alias updateFunc, AccessModifier access = AccessModifier.Public, string name = field.stringof[1 .. $])
    template DirtyGetter (
    alias field
    alias updateFunc
    AccessModifier access = AccessModifier.Public
    string name = field.stringof[1 .. $]
    ) if (
    is(typeof(field) : IDirtyable)
    ) {
    enum DirtyGetter;
    }
  2. template DirtyGetter(alias field, alias updateFunc, AccessModifier access = AccessModifier.Public, string name = field.stringof[1 .. $])

Parameters

field

The field to generate the property for.

updateFunc

The function to call when the function is dirty.

access

The access modifier for the getter function.

name

The name of the property functions. Defaults to the field name minus the first character. Meant for fields that start with underscores.

Meta