HiBONRecord

HiBON Helper template to implement constructor and toHiBON member functions

@safe
mixin template HiBONRecord (
string CTOR = ""
) {
enum HAS_TYPE;
enum NO_DEFAULT_CTOR;
}

Mixed In Members

From mixin HiBONRecordType

recordName
string recordName()

Get the record type name set by @recordType("name")

From mixin HiBONKeys

_keys
string[] _keys()

Examples

@recodeType("TEST") // Set the HiBONRecord type name
 struct Test {
 @label("$X") uint x;     // The member in HiBON is "$X"
 string name;             // The member in HiBON is "name"
 @label("num") int num;   // The member in HiBON is "num" and is optional
 @optional  string text;  // optional hibon member 
 @exclude bool dummy;   // This parameter is not included in the HiBON
 }

CTOR = is used for constructor

struct TestCtor {
uint x;
HiBONRecord!("TEST2",
q{
this(uint x) {
this.x=x;
}
}
);
}