X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=bindings%2Fswig%2Fclasses.i;h=fd9da099d9d274f57dad9195cff3cf8e55324fa8;hb=58aa1f8359007804f48a4f881e6782a06e1b729a;hp=d0227d6be410653d90cc29d410ff912603354da6;hpb=a755b0e122105d934c4e7b97435420eda6df6e8e;p=libsigrok.git diff --git a/bindings/swig/classes.i b/bindings/swig/classes.i index d0227d6b..fd9da099 100644 --- a/bindings/swig/classes.i +++ b/bindings/swig/classes.i @@ -76,6 +76,7 @@ template< class T > class enable_shared_from_this; %shared_ptr(sigrok::Logic); %shared_ptr(sigrok::InputFormat); %shared_ptr(sigrok::InputFileDevice); +%shared_ptr(sigrok::Option); %shared_ptr(sigrok::OutputFormat); %shared_ptr(sigrok::Output); %shared_ptr(sigrok::Trigger); @@ -111,6 +112,16 @@ template< class T > class enable_shared_from_this; %template(ConfigMap) std::map; +%template(OptionVector) + std::vector >; +%template(OptionMap) + std::map >; + +%template(VariantVector) + std::vector; +%template(VariantMap) + std::map; + %template(QuantityFlagVector) std::vector; @@ -145,6 +156,10 @@ typedef std::map > map_string_OutputFormat; typedef std::map > map_string_ChannelGroup; +typedef std::map > + map_string_Option; +typedef std::map + map_string_Variant; typedef std::map map_ConfigKey_Variant; } @@ -175,10 +190,24 @@ typedef std::map %attributestring(sigrok::InputFormat, std::string, description, get_description); +%attributestring(sigrok::Option, + std::string, id, get_id); +%attributestring(sigrok::Option, + std::string, name, get_name); +%attributestring(sigrok::Option, + std::string, description, get_description); +/* Currently broken on Python due to some issue with variant typemaps. */ +/* %attributeval(sigrok::Option, + Glib::VariantBase, default_value, get_default_value); */ +%attributeval(sigrok::Option, + std::vector, values, get_values); + %attributestring(sigrok::OutputFormat, std::string, name, get_name); %attributestring(sigrok::OutputFormat, std::string, description, get_description); +%attributeval(sigrok::OutputFormat, + map_string_Option, options, get_options); %attributestring(sigrok::Device, std::string, description, get_description); %attributestring(sigrok::Device, std::string, vendor, get_vendor);