isValidEntity

Indicates whether an entity is valid. A valid entity extends Entity, is not abstract, has an empty constructor and no duplicated members.

bool
isValidEntity
(
T
)
()

Examples

static struct Invalid0 {}

static class Invalid1 {}

static abstract class Invalid2 {}

static class Invalid3 : Entity {

	override string tableName() { return "test"; }

	this(int i) {}

}

static class Invalid4 : Entity {

	override string tableName() { return "test"; }

	String test;

	@Name("test")
	String test0;

}

static assert(!isValidEntity!Invalid0);
static assert(!isValidEntity!Invalid1);
static assert(!isValidEntity!Invalid2);
static assert(!isValidEntity!Invalid3);
static assert(!isValidEntity!Invalid4);

Meta