]> sigrok.org Git - libsigrok.git/blobdiff - bindings/cxx/enums.py
Fix various -Wundefined-var-template clang warnings.
[libsigrok.git] / bindings / cxx / enums.py
index 32ef6bc175f5eaa57ee4e6f683d236de25051974..3711334e74f740135a94f58ef70e78e7a8570268 100644 (file)
@@ -40,6 +40,7 @@ mapping = dict([
     ('sr_unit', ('Unit', 'Unit of measurement')),
     ('sr_mqflag', ('QuantityFlag', 'Flag applied to measured quantity')),
     ('sr_configkey', ('ConfigKey', 'Configuration key')),
+    ('sr_configcap', ('Capability', 'Configuration capability')),
     ('sr_datatype', ('DataType', 'Configuration data type')),
     ('sr_channeltype', ('ChannelType', 'Channel type')),
     ('sr_trigger_matches', ('TriggerMatchType', 'Trigger match type')),
@@ -79,6 +80,8 @@ print("namespace sigrok {", file=header)
 
 # Template for beginning of class declaration and public members.
 header_public_template = """
+template<> const SR_API std::map<const enum {enumname}, const {classname} * const> EnumValue<{classname}, enum {enumname}>::_values;
+
 /** {brief} */
 class SR_API {classname} : public EnumValue<{classname}, enum {enumname}>
 {{