java: Don't use SWIG attribute mechanism.
Using the attribute mechanism results in badly named wrappers like getLog_level(), as well as incompletely applied typemaps for templated container types. If we just avoid this mechanism entirely, we get the same foo() and set_foo() accessors as we have in the C++ API.
This commit is contained in:
parent
d4db558810
commit
d0fa4ac1e7
|
@ -293,20 +293,13 @@ typedef jobject jdatafeedcallback;
|
||||||
|
|
||||||
%include "doc.i"
|
%include "doc.i"
|
||||||
|
|
||||||
%define %attributevector(Class, Type, Name, Get)
|
|
||||||
%attributeval(sigrok::Class, Type, Name, Get);
|
|
||||||
%enddef
|
|
||||||
|
|
||||||
%define %attributemap(Class, Type, Name, Get)
|
|
||||||
%attributeval(sigrok::Class, Type, Name, Get);
|
|
||||||
%enddef
|
|
||||||
|
|
||||||
%define %enumextras(Class)
|
%define %enumextras(Class)
|
||||||
%enddef
|
%enddef
|
||||||
|
|
||||||
/* Ignore these for now, need fixes. */
|
/* Ignore these for now, need fixes. */
|
||||||
%ignore sigrok::Context::create_analog_packet;
|
%ignore sigrok::Context::create_analog_packet;
|
||||||
%ignore sigrok::Context::create_meta_packet;
|
%ignore sigrok::Context::create_meta_packet;
|
||||||
|
%ignore sigrok::Meta::config;
|
||||||
|
|
||||||
%include "bindings/swig/classes.i"
|
%include "bindings/swig/classes.i"
|
||||||
|
|
||||||
|
|
|
@ -81,6 +81,8 @@ template< class T > class enable_shared_from_this;
|
||||||
|
|
||||||
%ignore sigrok::DatafeedCallbackData;
|
%ignore sigrok::DatafeedCallbackData;
|
||||||
|
|
||||||
|
#ifndef SWIGJAVA
|
||||||
|
|
||||||
#define SWIG_ATTRIBUTE_TEMPLATE
|
#define SWIG_ATTRIBUTE_TEMPLATE
|
||||||
|
|
||||||
%include "attribute.i"
|
%include "attribute.i"
|
||||||
|
@ -209,6 +211,8 @@ typedef std::map<const sigrok::ConfigKey *, Glib::VariantBase>
|
||||||
%attribute(sigrok::Analog, const sigrok::Unit *, unit, unit);
|
%attribute(sigrok::Analog, const sigrok::Unit *, unit, unit);
|
||||||
%attributevector(Analog, std::vector<const sigrok::QuantityFlag *>, mq_flags, mq_flags);
|
%attributevector(Analog, std::vector<const sigrok::QuantityFlag *>, mq_flags, mq_flags);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
%include <libsigrokcxx/libsigrokcxx.hpp>
|
%include <libsigrokcxx/libsigrokcxx.hpp>
|
||||||
|
|
||||||
%include "swig/enums.i"
|
%include "swig/enums.i"
|
||||||
|
|
Loading…
Reference in New Issue