X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=bindings%2Fswig%2Fclasses.i;h=b87bbe1b06a33c3566c19e62a188fcb45078536c;hb=d0fa4ac1e786490b47b9f4284ad045f65d1e058d;hp=309bd34057f78eed5fd3b376b1b4571224176baa;hpb=ee9953ef12514d833c6719777dfc285d56c0ffc1;p=libsigrok.git diff --git a/bindings/swig/classes.i b/bindings/swig/classes.i index 309bd340..b87bbe1b 100644 --- a/bindings/swig/classes.i +++ b/bindings/swig/classes.i @@ -19,16 +19,7 @@ #pragma SWIG nowarn=325,401 -%{ -#include -using namespace std; -%} - %include "typemaps.i" -%include "std_string.i" -%include "std_vector.i" -%include "std_map.i" -%include "std_shared_ptr.i" %include "exception.i" %{ @@ -85,59 +76,13 @@ template< class T > class enable_shared_from_this; %shared_ptr(sigrok::TriggerMatch); %shared_ptr(sigrok::UserDevice); -%template(StringMap) std::map; - -%template(DriverMap) - std::map >; -%template(InputFormatMap) - std::map >; -%template(OutputFormatMap) - std::map >; - -%template(HardwareDeviceVector) - std::vector >; - -%template(DeviceVector) - std::vector >; - -%template(ChannelVector) - std::vector >; - -%template(ChannelGroupMap) - std::map >; - -/* Workaround for SWIG bug. The vector template instantiation - isn't needed but somehow fixes a bug that stops the wrapper - for the map instantiation from compiling. */ -%template(ConfigVector) - std::vector; -%template(ConfigMap) - std::map; - -%template(OptionVector) - std::vector >; -%template(OptionMap) - std::map >; - -%template(VariantVector) - std::vector; -%template(VariantMap) - std::map; - -%template(QuantityFlagVector) - std::vector; - -%template(TriggerStageVector) - std::vector >; - -%template(TriggerMatchVector) - std::vector >; - #define SR_API #define SR_PRIV %ignore sigrok::DatafeedCallbackData; +#ifndef SWIGJAVA + #define SWIG_ATTRIBUTE_TEMPLATE %include "attribute.i" @@ -266,6 +211,8 @@ typedef std::map %attribute(sigrok::Analog, const sigrok::Unit *, unit, unit); %attributevector(Analog, std::vector, mq_flags, mq_flags); +#endif + %include %include "swig/enums.i"