1
- #[ cfg( ocvrs_opencv_branch_34) ]
2
- #[ doc( hidden) ]
3
- #[ macro_export]
4
- macro_rules! opencv_branch_34 {
5
- ( $( $tt: tt) * ) => { $( $tt) * }
6
- }
7
-
8
1
/// Conditional compilation macro based on OpenCV branch version for usage in external crates.
9
2
/// # Examples
10
3
///
@@ -27,47 +20,12 @@ macro_rules! opencv_branch_34 {
27
20
/// let mut cam = opencv::videoio::VideoCapture::new(0, videoio::CAP_ANY)?;
28
21
/// }
29
22
/// ```
30
- #[ cfg( not ( ocvrs_opencv_branch_34 ) ) ]
23
+ #[ cfg( ocvrs_opencv_branch_OPENCV_BRANCH ) ]
31
24
#[ macro_export]
32
- macro_rules! opencv_branch_34 {
33
- ( $( $tt: tt) * ) => { } ;
34
- }
35
-
36
- /// Conditional compilation macro based on OpenCV branch version for usage in external crates.
37
- /// # Examples
38
- ///
39
- /// Alternative import:
40
- /// ```
41
- /// opencv::not_opencv_branch_34! {
42
- /// use opencv::imgproc::LINE_8;
43
- /// }
44
- /// opencv::opencv_branch_34! {
45
- /// use opencv::core::LINE_8;
46
- /// }
47
- /// ```
48
- ///
49
- /// Alternative function call:
50
- /// ```
51
- /// opencv::opencv_branch_34! {
52
- /// let mut cam = opencv::videoio::VideoCapture::new_default(0)?;
53
- /// }
54
- /// opencv::not_opencv_branch_34! {
55
- /// let mut cam = opencv::videoio::VideoCapture::new(0, videoio::CAP_ANY)?;
56
- /// }
57
- /// ```
58
- #[ cfg( not( ocvrs_opencv_branch_34) ) ]
59
- #[ macro_export]
60
- macro_rules! not_opencv_branch_34 {
25
+ macro_rules! opencv_branch_OPENCV_BRANCH {
61
26
( $( $tt: tt) * ) => { $( $tt) * }
62
27
}
63
28
64
- #[ cfg( ocvrs_opencv_branch_34) ]
65
- #[ doc( hidden) ]
66
- #[ macro_export]
67
- macro_rules! not_opencv_branch_34 {
68
- ( $( $tt: tt) * ) => { } ;
69
- }
70
-
71
29
/// Conditional compilation macro based on OpenCV branch version for usage in external crates.
72
30
/// # Examples
73
31
///
@@ -90,26 +48,12 @@ macro_rules! not_opencv_branch_34 {
90
48
/// let mut cam = opencv::videoio::VideoCapture::new(0, videoio::CAP_ANY)?;
91
49
/// }
92
50
/// ```
93
- #[ cfg( ocvrs_opencv_branch_4) ]
94
- #[ macro_export]
95
- macro_rules! opencv_branch_4 {
96
- ( $( $tt: tt) * ) => { $( $tt) * }
97
- }
98
-
99
- #[ cfg( not( ocvrs_opencv_branch_4) ) ]
100
- #[ doc( hidden) ]
51
+ #[ cfg( not( ocvrs_opencv_branch_OPENCV_BRANCH) ) ]
101
52
#[ macro_export]
102
- macro_rules! opencv_branch_4 {
53
+ macro_rules! opencv_branch_OPENCV_BRANCH {
103
54
( $( $tt: tt) * ) => { } ;
104
55
}
105
56
106
- #[ cfg( not( ocvrs_opencv_branch_4) ) ]
107
- #[ doc( hidden) ]
108
- #[ macro_export]
109
- macro_rules! not_opencv_branch_4 {
110
- ( $( $tt: tt) * ) => { $( $tt) * }
111
- }
112
-
113
57
/// Conditional compilation macro based on OpenCV branch version for usage in external crates.
114
58
/// # Examples
115
59
///
@@ -132,51 +76,9 @@ macro_rules! not_opencv_branch_4 {
132
76
/// let mut cam = opencv::videoio::VideoCapture::new(0, videoio::CAP_ANY)?;
133
77
/// }
134
78
/// ```
135
- #[ cfg( ocvrs_opencv_branch_4) ]
136
- #[ macro_export]
137
- macro_rules! not_opencv_branch_4 {
138
- ( $( $tt: tt) * ) => { } ;
139
- }
140
-
141
- /// Conditional compilation macro based on OpenCV branch version for usage in external crates.
142
- /// # Examples
143
- ///
144
- /// Alternative import:
145
- /// ```
146
- /// opencv::opencv_branch_4! {
147
- /// use opencv::imgproc::LINE_8;
148
- /// }
149
- /// opencv::not_opencv_branch_4! {
150
- /// use opencv::core::LINE_8;
151
- /// }
152
- /// ```
153
- ///
154
- /// Alternative function call:
155
- /// ```
156
- /// opencv::opencv_branch_34! {
157
- /// let mut cam = opencv::videoio::VideoCapture::new_default(0)?;
158
- /// }
159
- /// opencv::not_opencv_branch_34! {
160
- /// let mut cam = opencv::videoio::VideoCapture::new(0, videoio::CAP_ANY)?;
161
- /// }
162
- /// ```
163
- #[ cfg( ocvrs_opencv_branch_5) ]
164
- #[ macro_export]
165
- macro_rules! opencv_branch_5 {
166
- ( $( $tt: tt) * ) => { $( $tt) * }
167
- }
168
-
169
- #[ cfg( not( ocvrs_opencv_branch_5) ) ]
170
- #[ doc( hidden) ]
171
- #[ macro_export]
172
- macro_rules! opencv_branch_5 {
173
- ( $( $tt: tt) * ) => { } ;
174
- }
175
-
176
- #[ cfg( not( ocvrs_opencv_branch_5) ) ]
177
- #[ doc( hidden) ]
79
+ #[ cfg( not( ocvrs_opencv_branch_OPENCV_BRANCH) ) ]
178
80
#[ macro_export]
179
- macro_rules! not_opencv_branch_5 {
81
+ macro_rules! not_opencv_branch_OPENCV_BRANCH {
180
82
( $( $tt: tt) * ) => { $( $tt) * }
181
83
}
182
84
@@ -202,8 +104,8 @@ macro_rules! not_opencv_branch_5 {
202
104
/// let mut cam = opencv::videoio::VideoCapture::new(0, videoio::CAP_ANY)?;
203
105
/// }
204
106
/// ```
205
- #[ cfg( ocvrs_opencv_branch_5 ) ]
107
+ #[ cfg( ocvrs_opencv_branch_OPENCV_BRANCH ) ]
206
108
#[ macro_export]
207
- macro_rules! not_opencv_branch_5 {
109
+ macro_rules! not_opencv_branch_OPENCV_BRANCH {
208
110
( $( $tt: tt) * ) => { } ;
209
111
}
0 commit comments