The OpenD Programming Language

getSetters

template getSetters (
T
string member
) {}

Return Value

list of the setter properties.

Note: The implementation ignores templates.

Examples

struct I
{
    int f;

    void gi(double ) @property {}
    void gi(uint ) @property {}
}

struct S
{
    int d;

    I i;
    alias i this;

    int gm() @property {return 0;}
    int gc() const @property {return 0;}
    void gs(int) @property {}
}

static assert(getSetters!(S, "gi").length == 2);
static assert(getSetters!(S, "gs").length == 1);
static assert(getSetters!(S, "gc").length == 0);
static assert(getSetters!(S, "gm").length == 0);
static assert(getSetters!(S, "d").length == 0);
static assert(getSetters!(S, "f").length == 0);

Meta