MAP_COMMON(std::string, std::string, String, String)
+%typemap(jni) std::map<std::string, std::string>
+ "jobject"
+%typemap(jtype) std::map<std::string, std::string>
+ "java.util.Map<String,String>"
+
%typemap(out) std::map<std::string, std::string> {
jclass HashMap = jenv->FindClass("java/util/HashMap");
jmethodID init = jenv->GetMethodID(HashMap, "<init>", "()V");
}
}
+/* Support InputFormat.create_input() with no options. */
+%extend sigrok::InputFormat {
+ std::shared_ptr<sigrok::Input> create_input()
+ {
+ std::map<std::string, Glib::VariantBase> options;
+ return $self->create_input(options);
+ }
+}
+
/* Support OutputFormat.create_output(device) with no options. */
%extend sigrok::OutputFormat {
std::shared_ptr<sigrok::Output> create_output(
}
}
-/* Currently broken due to some std::map typemap issues. */
-%ignore sigrok::Meta::get_config;
-
%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)
+%enddef
+
+/* Ignore this for now, needs a fix. */
+%ignore sigrok::Context::create_analog_packet;
+
%include "bindings/swig/classes.i"
+