X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=bindings%2Fswig%2Ftemplates.i;h=1baaf0fe3a6ca93861e689baa57b37602e067094;hb=ddeaa49d431f3cb79a4d3e9f07fcc636797944ca;hp=bbb3619cbc4db653d76abb048560160cedb9f802;hpb=c7855def613435e18c1424ce87ffda8a42f1c53f;p=libsigrok.git diff --git a/bindings/swig/templates.i b/bindings/swig/templates.i index bbb3619c..1baaf0fe 100644 --- a/bindings/swig/templates.i +++ b/bindings/swig/templates.i @@ -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 set {}; +} +#else +%include "std_set.i" +#endif %template(StringMap) std::map; @@ -53,9 +60,22 @@ using namespace std; for the map instantiation from compiling. */ %template(ConfigVector) std::vector; + %template(ConfigMap) std::map; +%template(ConfigSet) + std::set; + +/* 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; + +%template(CapabilitySet) + std::set; + %template(OptionVector) std::vector >; %template(OptionMap)