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
- /// # Examples
10
2
///
11
- /// Alternative import:
12
- /// ```
13
- /// opencv::not_opencv_branch_34! {
14
- /// use opencv::imgproc::LINE_8;
15
- /// }
16
- /// opencv::opencv_branch_34! {
17
- /// use opencv::core::LINE_8;
18
- /// }
19
- /// ```
20
- ///
21
- /// Alternative function call:
22
- /// ```
23
- /// opencv::opencv_branch_34! {
24
- /// let mut cam = opencv::videoio::VideoCapture::new_default(0)?;
25
- /// }
26
- /// opencv::not_opencv_branch_34! {
27
- /// let mut cam = opencv::videoio::VideoCapture::new(0, videoio::CAP_ANY)?;
28
- /// }
29
- /// ```
30
- #[ cfg( not( ocvrs_opencv_branch_34) ) ]
31
- #[ 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
3
/// # Examples
38
4
///
39
5
/// Alternative import:
@@ -55,20 +21,14 @@ macro_rules! opencv_branch_34 {
55
21
/// let mut cam = opencv::videoio::VideoCapture::new(0, videoio::CAP_ANY)?;
56
22
/// }
57
23
/// ```
58
- #[ cfg( not ( ocvrs_opencv_branch_34 ) ) ]
24
+ #[ cfg( ocvrs_opencv_branch_OPENCV_BRANCH ) ]
59
25
#[ macro_export]
60
- macro_rules! not_opencv_branch_34 {
26
+ macro_rules! opencv_branch_OPENCV_BRANCH {
61
27
( $( $tt: tt) * ) => { $( $tt) * }
62
28
}
63
29
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
30
/// Conditional compilation macro based on OpenCV branch version for usage in external crates.
31
+ ///
72
32
/// # Examples
73
33
///
74
34
/// Alternative import:
@@ -90,27 +50,14 @@ macro_rules! not_opencv_branch_34 {
90
50
/// let mut cam = opencv::videoio::VideoCapture::new(0, videoio::CAP_ANY)?;
91
51
/// }
92
52
/// ```
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) ]
53
+ #[ cfg( not( ocvrs_opencv_branch_OPENCV_BRANCH) ) ]
101
54
#[ macro_export]
102
- macro_rules! opencv_branch_4 {
55
+ macro_rules! opencv_branch_OPENCV_BRANCH {
103
56
( $( $tt: tt) * ) => { } ;
104
57
}
105
58
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
59
/// Conditional compilation macro based on OpenCV branch version for usage in external crates.
60
+ ///
114
61
/// # Examples
115
62
///
116
63
/// Alternative import:
@@ -132,55 +79,14 @@ macro_rules! not_opencv_branch_4 {
132
79
/// let mut cam = opencv::videoio::VideoCapture::new(0, videoio::CAP_ANY)?;
133
80
/// }
134
81
/// ```
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) ]
82
+ #[ cfg( not( ocvrs_opencv_branch_OPENCV_BRANCH) ) ]
164
83
#[ 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) ]
178
- #[ macro_export]
179
- macro_rules! not_opencv_branch_5 {
84
+ macro_rules! not_opencv_branch_OPENCV_BRANCH {
180
85
( $( $tt: tt) * ) => { $( $tt) * }
181
86
}
182
87
183
88
/// Conditional compilation macro based on OpenCV branch version for usage in external crates.
89
+ ///
184
90
/// # Examples
185
91
///
186
92
/// Alternative import:
@@ -202,8 +108,8 @@ macro_rules! not_opencv_branch_5 {
202
108
/// let mut cam = opencv::videoio::VideoCapture::new(0, videoio::CAP_ANY)?;
203
109
/// }
204
110
/// ```
205
- #[ cfg( ocvrs_opencv_branch_5 ) ]
111
+ #[ cfg( ocvrs_opencv_branch_OPENCV_BRANCH ) ]
206
112
#[ macro_export]
207
- macro_rules! not_opencv_branch_5 {
113
+ macro_rules! not_opencv_branch_OPENCV_BRANCH {
208
114
( $( $tt: tt) * ) => { } ;
209
115
}
0 commit comments