diff --git a/src/datamatrix/detector/zxing_cpp_detector/bitmatrix_cursor.rs b/src/common/cpp_essentials/bitmatrix_cursor.rs similarity index 100% rename from src/datamatrix/detector/zxing_cpp_detector/bitmatrix_cursor.rs rename to src/common/cpp_essentials/bitmatrix_cursor.rs diff --git a/src/datamatrix/detector/zxing_cpp_detector/direction.rs b/src/common/cpp_essentials/direction.rs similarity index 100% rename from src/datamatrix/detector/zxing_cpp_detector/direction.rs rename to src/common/cpp_essentials/direction.rs diff --git a/src/datamatrix/detector/zxing_cpp_detector/dm_regression_line.rs b/src/common/cpp_essentials/dm_regression_line.rs similarity index 100% rename from src/datamatrix/detector/zxing_cpp_detector/dm_regression_line.rs rename to src/common/cpp_essentials/dm_regression_line.rs diff --git a/src/datamatrix/detector/zxing_cpp_detector/edge_tracer.rs b/src/common/cpp_essentials/edge_tracer.rs similarity index 99% rename from src/datamatrix/detector/zxing_cpp_detector/edge_tracer.rs rename to src/common/cpp_essentials/edge_tracer.rs index 186aa81..3cb99d8 100644 --- a/src/datamatrix/detector/zxing_cpp_detector/edge_tracer.rs +++ b/src/common/cpp_essentials/edge_tracer.rs @@ -10,9 +10,9 @@ use super::{BitMatrixCursor, Direction, RegressionLine, StepResult, Value}; #[derive(Clone)] pub struct EdgeTracer<'a> { - pub(super) img: &'a BitMatrix, + pub(crate) img: &'a BitMatrix, - pub(super) p: Point, // current position + pub(crate) p: Point, // current position d: Point, // current direction // pub history: Option<&'a mut ByteMatrix>, // = nullptr; diff --git a/src/common/cpp_essentials/mod.rs b/src/common/cpp_essentials/mod.rs new file mode 100644 index 0000000..50ff468 --- /dev/null +++ b/src/common/cpp_essentials/mod.rs @@ -0,0 +1,22 @@ +pub mod bitmatrix_cursor; +pub mod direction; +pub mod dm_regression_line; +pub mod edge_tracer; +pub mod regression_line; +pub mod step_result; +pub mod util; +pub mod value; +pub mod concentric_finder; +pub mod pattern; + + +pub use bitmatrix_cursor::*; +pub use direction::*; +pub use dm_regression_line::*; +pub use edge_tracer::*; +pub use regression_line::*; +pub use step_result::*; +pub use util::*; +pub use value::*; +pub use concentric_finder::*; +pub use pattern::*; \ No newline at end of file diff --git a/src/datamatrix/detector/zxing_cpp_detector/regression_line.rs b/src/common/cpp_essentials/regression_line.rs similarity index 100% rename from src/datamatrix/detector/zxing_cpp_detector/regression_line.rs rename to src/common/cpp_essentials/regression_line.rs diff --git a/src/datamatrix/detector/zxing_cpp_detector/step_result.rs b/src/common/cpp_essentials/step_result.rs similarity index 100% rename from src/datamatrix/detector/zxing_cpp_detector/step_result.rs rename to src/common/cpp_essentials/step_result.rs diff --git a/src/datamatrix/detector/zxing_cpp_detector/util.rs b/src/common/cpp_essentials/util.rs similarity index 100% rename from src/datamatrix/detector/zxing_cpp_detector/util.rs rename to src/common/cpp_essentials/util.rs diff --git a/src/datamatrix/detector/zxing_cpp_detector/value.rs b/src/common/cpp_essentials/value.rs similarity index 100% rename from src/datamatrix/detector/zxing_cpp_detector/value.rs rename to src/common/cpp_essentials/value.rs diff --git a/src/common/mod.rs b/src/common/mod.rs index 8327876..d011f1d 100644 --- a/src/common/mod.rs +++ b/src/common/mod.rs @@ -112,6 +112,8 @@ pub use eci::*; mod quad; pub use quad::*; +pub mod cpp_essentials; + #[cfg(feature = "otsu_level")] mod otsu_level_binarizer; #[cfg(feature = "otsu_level")] diff --git a/src/datamatrix/detector/zxing_cpp_detector/mod.rs b/src/datamatrix/detector/zxing_cpp_detector/mod.rs index 1842d6d..c944119 100644 --- a/src/datamatrix/detector/zxing_cpp_detector/mod.rs +++ b/src/datamatrix/detector/zxing_cpp_detector/mod.rs @@ -1,18 +1,11 @@ -mod bitmatrix_cursor; mod cpp_new_detector; -mod direction; -mod dm_regression_line; -mod edge_tracer; -mod regression_line; -mod step_result; -pub(self) mod util; -mod value; -pub(self) use bitmatrix_cursor::*; +pub(self) use crate::common::cpp_essentials::bitmatrix_cursor::*; pub use cpp_new_detector::detect; -pub(self) use direction::*; -pub(self) use dm_regression_line::*; -pub(self) use edge_tracer::*; -pub(self) use regression_line::*; -pub(self) use step_result::*; -pub(self) use value::*; +pub(self) use crate::common::cpp_essentials::direction::*; +pub(self) use crate::common::cpp_essentials::dm_regression_line::*; +pub(self) use crate::common::cpp_essentials::edge_tracer::*; +pub(self) use crate::common::cpp_essentials::regression_line::*; +pub(self) use crate::common::cpp_essentials::step_result::*; +pub(self) use crate::common::cpp_essentials::value::*; +pub(self) use crate::common::cpp_essentials::util; diff --git a/src/qrcode/cpp_port/decoder/mod.rs b/src/qrcode/cpp_port/decoder/mod.rs new file mode 100644 index 0000000..e69de29 diff --git a/src/qrcode/cpp_port/mod.rs b/src/qrcode/cpp_port/mod.rs new file mode 100644 index 0000000..af7a0fb --- /dev/null +++ b/src/qrcode/cpp_port/mod.rs @@ -0,0 +1,2 @@ +pub mod decoder; +// pub mod detector; \ No newline at end of file diff --git a/src/qrcode/mod.rs b/src/qrcode/mod.rs index be88824..77ee545 100644 --- a/src/qrcode/mod.rs +++ b/src/qrcode/mod.rs @@ -8,6 +8,8 @@ pub use qr_code_reader::*; mod qr_code_writer; pub use qr_code_writer::*; +mod cpp_port; + #[cfg(test)] #[cfg(feature = "image")] mod QRCodeWriterTestCase;