opencv_binding_generator/typedef/
desc.rs1use std::rc::Rc;
2
3use super::Typedef;
4use crate::type_ref::{TypeRef, TypeRefDesc};
5use crate::SupportedModule;
6
7pub struct TypedefDesc<'tu, 'ge> {
8 pub cpp_fullname: Rc<str>,
9 pub rust_module: SupportedModule,
10 pub underlying_type: TypeRef<'tu, 'ge>,
11}
12
13impl<'tu, 'ge> TypedefDesc<'tu, 'ge> {
14 pub fn new(cpp_fullname: impl Into<Rc<str>>, rust_module: SupportedModule, underlying_type: TypeRef<'tu, 'ge>) -> Self {
15 Self {
16 cpp_fullname: cpp_fullname.into(),
17 rust_module,
18 underlying_type,
19 }
20 }
21
22 pub fn cv_vec4i() -> Typedef<'tu, 'ge> {
24 Typedef::new_desc(Self::new("cv::Vec4i", SupportedModule::Core, TypeRefDesc::cv_vec()))
25 }
26
27 pub fn cv_scalar() -> Typedef<'tu, 'ge> {
29 Typedef::new_desc(Self::new("cv::Scalar", SupportedModule::Core, TypeRefDesc::cv_scalar_()))
30 }
31
32 pub fn cv_size() -> Typedef<'tu, 'ge> {
34 Typedef::new_desc(Self::new("cv::Size", SupportedModule::Core, TypeRefDesc::cv_size_()))
35 }
36
37 pub fn cv_point() -> Typedef<'tu, 'ge> {
39 Typedef::new_desc(Self::new("cv::Point", SupportedModule::Core, TypeRefDesc::cv_point_()))
40 }
41
42 pub fn cv_point2f() -> Typedef<'tu, 'ge> {
44 Typedef::new_desc(Self::new("cv::Point2f", SupportedModule::Core, TypeRefDesc::cv_point_()))
45 }
46
47 pub fn cv_point2d() -> Typedef<'tu, 'ge> {
49 Typedef::new_desc(Self::new("cv::Point2d", SupportedModule::Core, TypeRefDesc::cv_point_()))
50 }
51
52 pub fn cv_point3i() -> Typedef<'tu, 'ge> {
54 Typedef::new_desc(Self::new("cv::Point3i", SupportedModule::Core, TypeRefDesc::cv_point_()))
55 }
56
57 pub fn cv_point3f() -> Typedef<'tu, 'ge> {
59 Typedef::new_desc(Self::new("cv::Point3f", SupportedModule::Core, TypeRefDesc::cv_point_()))
60 }
61
62 pub fn cv_point3d() -> Typedef<'tu, 'ge> {
64 Typedef::new_desc(Self::new("cv::Point3d", SupportedModule::Core, TypeRefDesc::cv_point_()))
65 }
66
67 pub fn cv_vec2f() -> Typedef<'tu, 'ge> {
69 Typedef::new_desc(Self::new("cv::Vec2f", SupportedModule::Core, TypeRefDesc::cv_vec()))
70 }
71
72 pub fn cv_vec2d() -> Typedef<'tu, 'ge> {
74 Typedef::new_desc(Self::new("cv::Vec2d", SupportedModule::Core, TypeRefDesc::cv_vec()))
75 }
76
77 pub fn cv_vec3f() -> Typedef<'tu, 'ge> {
79 Typedef::new_desc(Self::new("cv::Vec3f", SupportedModule::Core, TypeRefDesc::cv_vec()))
80 }
81
82 pub fn cv_vec3d() -> Typedef<'tu, 'ge> {
84 Typedef::new_desc(Self::new("cv::Vec3d", SupportedModule::Core, TypeRefDesc::cv_vec()))
85 }
86}