]> sigrok.org Git - libsigrok.git/blobdiff - bindings/swig/templates.i
scpi-dmm: Gracefully handle meters that lack OPC command.
[libsigrok.git] / bindings / swig / templates.i
index bbb3619cbc4db653d76abb048560160cedb9f802..1baaf0fe3a6ca93861e689baa57b37602e067094 100644 (file)
@@ -26,6 +26,13 @@ using namespace std;
 %include "std_shared_ptr.i"
 %include "std_vector.i"
 %include "std_map.i"
+#ifdef SWIGJAVA
+namespace std {
+  template <class _Key> class set {};
+}
+#else
+%include "std_set.i"
+#endif
 
 %template(StringMap) std::map<std::string, std::string>;
 
@@ -53,9 +60,22 @@ using namespace std;
    for the map instantiation from compiling. */
 %template(ConfigVector)
     std::vector<const sigrok::ConfigKey *>;
+
 %template(ConfigMap)
     std::map<const sigrok::ConfigKey *, Glib::VariantBase>;
 
+%template(ConfigSet)
+    std::set<const sigrok::ConfigKey *>;
+
+/* Workaround for SWIG bug. The vector template instantiation
+   isn't needed but somehow fixes a bug that stops the wrapper
+   for the set instantiation from compiling. */
+%template(CapabilityVector)
+    std::vector<const sigrok::Capability *>;
+
+%template(CapabilitySet)
+    std::set<const sigrok::Capability *>;
+
 %template(OptionVector)
     std::vector<std::shared_ptr<sigrok::Option> >;
 %template(OptionMap)