X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=bindings%2Fswig%2Fclasses.i;h=b87bbe1b06a33c3566c19e62a188fcb45078536c;hb=d0fa4ac1e786490b47b9f4284ad045f65d1e058d;hp=8f57e4186de996061f5bfc654051052b1fea53a8;hpb=782b16447b25ce31d41764ae91681a6aa4f3fe0d;p=libsigrok.git diff --git a/bindings/swig/classes.i b/bindings/swig/classes.i index 8f57e418..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" %{ @@ -66,7 +57,6 @@ template< class T > class enable_shared_from_this; %shared_ptr(sigrok::HardwareDevice); %shared_ptr(sigrok::Channel); %shared_ptr(sigrok::ChannelGroup); -%shared_ptr(sigrok::EventSource); %shared_ptr(sigrok::Session); %shared_ptr(sigrok::SessionDevice); %shared_ptr(sigrok::Packet); @@ -86,59 +76,12 @@ 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; -%ignore sigrok::SourceCallbackData; + +#ifndef SWIGJAVA #define SWIG_ATTRIBUTE_TEMPLATE @@ -268,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"