Groundwork for the gapi module support
MODIFY
binding-generator/src/generator.rs
binding-generator/src/generator.rs
@@ -98,7 +98,7 @@ impl<'tu, V: for<'gtu> GeneratorVisitor<'gtu>> EntityWalkerVisitor<'tu> for Open
}
EntityKind::MacroExpansion => {
if let Some(name) = entity.get_name() {
- if name == "CV_EXPORTS" || name == "CV_EXPORTS_W" || name == "CV_WRAP" {
+ if name == "CV_EXPORTS" || name == "CV_EXPORTS_W" || name == "CV_WRAP" || name == "GAPI_EXPORTS" {
self.gen_env.make_export_config(entity);
} else if name == "CV_EXPORTS_W_SIMPLE" || name == "CV_EXPORTS_W_MAP" {
self.gen_env.make_export_config(entity).simple = true;

MODIFY
binding-generator/src/generator_env.rs
binding-generator/src/generator_env.rs
@@ -231,7 +231,7 @@ impl<'tu> GeneratorEnv<'tu> {
let export_decl = String::from_utf8(buf).expect("Not a valid UTF-8");
if export_decl.contains("CV_EXPORTS_W_SIMPLE") || export_decl.contains("CV_EXPORTS_W_MAP") {
return Some(ClassKind::Simple)
- } else if export_decl.contains("CV_EXPORTS") {
+ } else if export_decl.contains("CV_EXPORTS") || export_decl.contains("GAPI_EXPORTS") {
return Some(ClassKind::Boxed)
}
}

MODIFY
binding-generator/src/settings.rs
binding-generator/src/settings.rs
@@ -393,6 +393,14 @@ pub static FUNC_RENAME: Lazy<HashMap<&str, &str>> = Lazy::new(|| hashmap! {
"cv_Feature2D_detect_const__InputArrayR_vector_vector_KeyPoint__R_const__InputArrayR" => "+_multiple",
"cv_GFTTDetector_create_int_double_double_int_int_bool_double" => "+_with_gradient",
+ // ### gapi ###
+ // "cv_GComputation_apply_const_vector_Mat_R_const_vector_Mat_R_GCompileArgsR" => "-",
+ // "cv_GComputation_apply_const_vector_Mat_R_vector_Mat_R_GCompileArgsR" => "-",
+ // "cv_GComputation_apply_Mat_Mat_ScalarR_GCompileArgsR" => "-",
+ // "cv_GComputation_apply_Mat_Mat_MatR_GCompileArgsR" => "-",
+ // "cv_GComputation_apply_Mat_ScalarR_GCompileArgsR" => "-",
+ // "cv_GComputation_apply_Mat_MatR_GCompileArgsR" => "-",
+
// ### highgui ###
"cv_addText_const_MatR_const_StringR_Point_const_StringR_int_Scalar_int_int_int" => "+_with_font",
"cv_resizeWindow_const_StringR_const_SizeR" => "+_size",
@@ -727,6 +735,7 @@ pub static RESERVED_RENAME: Lazy<HashMap<&str, &str>> = Lazy::new(|| hashmap! {
"use" => "use_",
"impl" => "impl_",
"loop" => "loop_",
+ "yield" => "yield_",
});
/// dict of functions with manual implementations
@@ -879,6 +888,9 @@ pub static NO_SKIP_NAMESPACE_IN_LOCALNAME: Lazy<HashMap<&str, HashMap<&str, &str
"mcc" => hashmap! {
"mcc" => "MCC",
},
+ "gapi" => hashmap! {
+ "own" => "Own",
+ }
});
pub static FORCE_VECTOR_TYPEDEF_GENERATION: Lazy<HashSet<&str>> = Lazy::new(|| hashset! {

ADD
src_cpp/gapi.hpp
+#include "ocvrs_common.hpp"
+#include <opencv2/gapi.hpp>
+#include <opencv2/gapi/core.hpp>
+#include <opencv2/gapi/imgproc.hpp>

Groundwork for the gapi module support