The OpenD Programming Language

serdeGetAnnotationMembersOut

template serdeGetAnnotationMembersOut (
T
) {
static if(isAggregateType!T)
enum string[] serdeGetAnnotationMembersOut;
static if(!(isAggregateType!T))
enum string[] serdeGetAnnotationMembersOut;
}

Examples

struct S
{
    double data;

    @serdeAnnotation
    string a;
    @serdeAnnotation @serdeIgnoreIn
    string b;
    @serdeAnnotation @serdeIgnoreOut
    string c;
    @serdeAnnotation @serdeIgnore
    string d;
    @serdeAnnotation enum string e = "e";
    static @serdeAnnotation string f() @safe pure nothrow @nogc @property {
        return "f";
    }
}

static assert(serdeGetAnnotationMembersOut!int == []);
static assert(serdeGetAnnotationMembersOut!S == ["a", "b", "f"]);

Meta