widl-nan
Version:
Auto generate native C++ addon source code by parsing Web IDL definition
29 lines (21 loc) • 512 B
Plain Text
{{
{{~ getStaticPropertyMembers(it) :p:i }}
{{
{{
var propertyType = idlType2CxxPropertyReturnType(p.idlType, it.refTypeMap);
var ptrStr = '';
var addrStr = '';
if (isInterface(p.idlType, it.refTypeMap)) {
ptrStr = '*';
addrStr = '&';
}
}}
static {{=propertyType}}{{=ptrStr}} get_{{=p.name}}() {
return {{=addrStr}}{{=p.name}}_;
}
{{? ! p.readonly }}
static void set_{{=p.name}}(const {{=propertyType}}& new_value) {
{{=p.name}}_ = new_value;
}
{{?}}
{{~}}