CVB++ 15.0
detail_config_logistic_codes.hpp
1#pragma once
2
3#include "../_decl/decl_config_logistic_codes.hpp"
4
5namespace Cvb
6{
7 CVB_BEGIN_INLINE_NS
8
9 namespace CodeReader
10 {
11 namespace Config
12 {
13#pragma region Code128
14 inline Code128 &Code128::SetMinDataLength(int length)
15 {
16 return SetIntProperty(static_cast<int>(CExports::CVCRSymbologyPropertiesCode128::CVCRSPC128_MinLength), length);
17 }
18
19 inline int Code128::MinDataLength() const
20 {
21 return GetIntProperty(static_cast<int>(CExports::CVCRSymbologyPropertiesCode128::CVCRSPC128_MinLength));
22 }
23
24 inline Code128 &Code128::SetMaxDataLength(int length)
25 {
26 return SetIntProperty(static_cast<int>(CExports::CVCRSymbologyPropertiesCode128::CVCRSPC128_MaxLength), length);
27 }
28
29 inline int Code128::MaxDataLength() const
30 {
31 return GetIntProperty(static_cast<int>(CExports::CVCRSymbologyPropertiesCode128::CVCRSPC128_MaxLength));
32 }
33
35 {
36 switch (method)
37 {
39 return SetIntProperty(static_cast<int>(CExports::CVCRSymbologyPropertiesCode128::CVCRSPC128_EnhanceMethod1),
40 1)
41 .SetIntProperty(static_cast<int>(CExports::CVCRSymbologyPropertiesCode128::CVCRSPC128_EnhanceMethod2),
42 0);
44 return SetIntProperty(static_cast<int>(CExports::CVCRSymbologyPropertiesCode128::CVCRSPC128_EnhanceMethod2),
45 1)
46 .SetIntProperty(static_cast<int>(CExports::CVCRSymbologyPropertiesCode128::CVCRSPC128_EnhanceMethod1),
47 0);
49 return SetIntProperty(static_cast<int>(CExports::CVCRSymbologyPropertiesCode128::CVCRSPC128_EnhanceMethod1),
50 1)
51 .SetIntProperty(static_cast<int>(CExports::CVCRSymbologyPropertiesCode128::CVCRSPC128_EnhanceMethod2),
52 1);
54 return SetIntProperty(static_cast<int>(CExports::CVCRSymbologyPropertiesCode128::CVCRSPC128_EnhanceMethod1),
55 0)
56 .SetIntProperty(static_cast<int>(CExports::CVCRSymbologyPropertiesCode128::CVCRSPC128_EnhanceMethod2),
57 0);
58 default:
59 return SetIntProperty(static_cast<int>(CExports::CVCRSymbologyPropertiesCode128::CVCRSPC128_EnhanceMethod1),
60 0)
61 .SetIntProperty(static_cast<int>(CExports::CVCRSymbologyPropertiesCode128::CVCRSPC128_EnhanceMethod2),
62 0);
63 }
64 }
65
67 {
68 const auto method1 =
69 GetIntProperty(static_cast<int>(CExports::CVCRSymbologyPropertiesCode128::CVCRSPC128_EnhanceMethod1));
70 const auto method2 =
71 GetIntProperty(static_cast<int>(CExports::CVCRSymbologyPropertiesCode128::CVCRSPC128_EnhanceMethod2));
72
73 if (method1 == 0)
74 {
75 if (method2 == 0)
76 {
78 }
79 else
80 {
82 }
83 }
84 else
85 {
86 if (method2 == 0)
87 {
89 }
90 else
91 {
93 }
94 }
95 }
96#pragma endregion
97
98#pragma region Code39
99 inline Code39 &Code39::SetMinDataLength(int length)
100 {
101 return this->SetIntProperty(static_cast<int>(CExports::CVCRSymbologyPropertiesCode39::CVCRSPC39_MinLength),
102 length);
103 }
104
105 inline int Code39::MinDataLength() const
106 {
107 return this->GetIntProperty(static_cast<int>(CExports::CVCRSymbologyPropertiesCode39::CVCRSPC39_MinLength));
108 }
109
110 inline Code39 &Code39::SetMaxDataLength(int length)
111 {
112 return this->SetIntProperty(static_cast<int>(CExports::CVCRSymbologyPropertiesCode39::CVCRSPC39_MaxLength),
113 length);
114 }
115
116 inline int Code39::MaxDataLength() const
117 {
118 return this->GetIntProperty(static_cast<int>(CExports::CVCRSymbologyPropertiesCode39::CVCRSPC39_MaxLength));
119 }
120
121 inline Code39 &Code39::SetFullAsciiModeEnabled(bool value)
122 {
123 return this->SetIntProperty(static_cast<int>(CExports::CVCRSymbologyPropertiesCode39::CVCRSPC39_FullASCII),
124 value);
125 }
126
128 {
129 return this->GetIntProperty(static_cast<int>(CExports::CVCRSymbologyPropertiesCode39::CVCRSPC39_FullASCII));
130 }
131
133 {
134 return this->SetIntProperty(static_cast<int>(CExports::CVCRSymbologyPropertiesCode39::CVCRSPC39_CheckSum),
135 static_cast<int>(value));
136 }
137
139 {
140 return static_cast<Checksum>(
141 this->GetIntProperty(static_cast<int>(CExports::CVCRSymbologyPropertiesCode39::CVCRSPC39_CheckSum)));
142 }
143
144 inline Code39 &Code39::SetAddStartStopCharEnabled(bool value)
145 {
146 return this->SetIntProperty(static_cast<int>(CExports::CVCRSymbologyPropertiesCode39::CVCRSPC39_SendStartStop),
147 value);
148 }
149
151 {
152 return this->GetIntProperty(static_cast<int>(CExports::CVCRSymbologyPropertiesCode39::CVCRSPC39_SendStartStop));
153 }
154#pragma endregion
155
156#pragma region Code93
157 inline Code93 &Code93::SetMinDataLength(int length)
158 {
159 return this->SetIntProperty(static_cast<int>(CExports::CVCRSymbologyPropertiesCode93::CVCRSPC93_MinLength),
160 length);
161 }
162
163 inline int Code93::MinDataLength() const
164 {
165 return this->GetIntProperty(static_cast<int>(CExports::CVCRSymbologyPropertiesCode93::CVCRSPC93_MinLength));
166 }
167
168 inline Code93 &Code93::SetMaxDataLength(int length)
169 {
170 return this->SetIntProperty(static_cast<int>(CExports::CVCRSymbologyPropertiesCode93::CVCRSPC93_MaxLength),
171 length);
172 }
173
174 inline int Code93::MaxDataLength() const
175 {
176 return this->GetIntProperty(static_cast<int>(CExports::CVCRSymbologyPropertiesCode93::CVCRSPC93_MaxLength));
177 }
178#pragma endregion
179
180#pragma region Interleaved2of5
181 inline Interleaved2of5 &Interleaved2of5::SetMinDataLength(int length)
182 {
183 return this->SetIntProperty(
184 static_cast<int>(CExports::CVCRSymbologyPropertiesInterleaved2of5::CVCRSPI25_MinLength), length);
185 }
186
188 {
189 return this->GetIntProperty(
190 static_cast<int>(CExports::CVCRSymbologyPropertiesInterleaved2of5::CVCRSPI25_MinLength));
191 }
192
193 inline Interleaved2of5 &Interleaved2of5::SetMaxDataLength(int length)
194 {
195 return this->SetIntProperty(
196 static_cast<int>(CExports::CVCRSymbologyPropertiesInterleaved2of5::CVCRSPI25_MaxLength), length);
197 }
198
200 {
201 return this->GetIntProperty(
202 static_cast<int>(CExports::CVCRSymbologyPropertiesInterleaved2of5::CVCRSPI25_MaxLength));
203 }
204
205 inline Interleaved2of5 &Interleaved2of5::SetChecksumEnabled(Checksum value)
206 {
207 return this->SetIntProperty(
208 static_cast<int>(CExports::CVCRSymbologyPropertiesInterleaved2of5::CVCRSPI25_CheckSum),
209 static_cast<int>(value));
210 }
211
213 {
214 return static_cast<Checksum>(this->GetIntProperty(
215 static_cast<int>(CExports::CVCRSymbologyPropertiesInterleaved2of5::CVCRSPI25_CheckSum)));
216 }
217
218 inline Interleaved2of5 &Interleaved2of5::SetRejectPartialEnabled(bool value)
219 {
220 return this->SetIntProperty(
221 static_cast<int>(CExports::CVCRSymbologyPropertiesInterleaved2of5::CVCRSPI25_RejectPartial),
222 static_cast<int>(value));
223 }
224
226 {
227 return static_cast<bool>(this->GetIntProperty(
228 static_cast<int>(CExports::CVCRSymbologyPropertiesInterleaved2of5::CVCRSPI25_RejectPartial)));
229 }
230#pragma endregion
231 } // namespace Config
232 } // namespace CodeReader
233
234 CVB_END_INLINE_NS
235} // namespace Cvb
Code128 & SetEnhancementMethod(Code128EnhancementMethod method)
Configures enhancement method for decoding.
Definition detail_config_logistic_codes.hpp:34
Code128EnhancementMethod EnhancementMethod() const
Gets the currently configured enhancement method for decoding.
Definition detail_config_logistic_codes.hpp:66
int MinDataLength() const
Gets the minimum data length.
Definition detail_config_logistic_codes.hpp:19
Code128 & SetMinDataLength(int length)
Sets the minimum data length.
Definition detail_config_logistic_codes.hpp:14
int MaxDataLength() const
Gets the maximum data length.
Definition detail_config_logistic_codes.hpp:29
Code128 & SetMaxDataLength(int length)
Sets the maximum data length.
Definition detail_config_logistic_codes.hpp:24
Code39 & SetFullAsciiModeEnabled(bool value)
Enables or disables the Full ASCII mode.
Definition detail_config_logistic_codes.hpp:121
bool IsAddedStartStopCharEnabled() const
Checks whether adding start and stop characters to decoded data is enabled.
Definition detail_config_logistic_codes.hpp:150
int MinDataLength() const
Gets the minimum data length.
Definition detail_config_logistic_codes.hpp:105
Code39 & SetMinDataLength(int length)
Sets the minimum data length.
Definition detail_config_logistic_codes.hpp:99
bool IsFullAsciiModeEnabled() const
Checks whether the Full ASCII mode is enabled.
Definition detail_config_logistic_codes.hpp:127
Code39 & SetChecksumEnabled(Checksum value)
Configures checksum for decoding.
Definition detail_config_logistic_codes.hpp:132
Checksum IsChecksumEnabled() const
Gets checksum configuration.
Definition detail_config_logistic_codes.hpp:138
Code39 & SetMaxDataLength(int length)
Sets the maximum data length.
Definition detail_config_logistic_codes.hpp:110
Code39 & SetAddStartStopCharEnabled(bool value)
Enables or disables adding start and stop characters to decoded data.
Definition detail_config_logistic_codes.hpp:144
int MaxDataLength() const
Gets the maximum data length.
Definition detail_config_logistic_codes.hpp:116
int MinDataLength() const
Gets the minimum data length.
Definition detail_config_logistic_codes.hpp:163
Code93 & SetMaxDataLength(int length)
Sets the maximum data length.
Definition detail_config_logistic_codes.hpp:168
Code93 & SetMinDataLength(int length)
Sets the minimum data length.
Definition detail_config_logistic_codes.hpp:157
int MaxDataLength() const
Gets the maximum data length.
Definition detail_config_logistic_codes.hpp:174
bool IsRejectPartialEnabled() const
Checks whether rejection of partial codes is enabled.
Definition detail_config_logistic_codes.hpp:225
int MinDataLength() const
Gets the minimum data length.
Definition detail_config_logistic_codes.hpp:187
Interleaved2of5 & SetMaxDataLength(int length)
Sets the maximum data length.
Definition detail_config_logistic_codes.hpp:193
Interleaved2of5 & SetChecksumEnabled(Checksum value)
Configures checksum for decoding.
Definition detail_config_logistic_codes.hpp:205
Checksum IsChecksumEnabled() const
Gets checksum configuration.
Definition detail_config_logistic_codes.hpp:212
Interleaved2of5 & SetRejectPartialEnabled(bool value)
Enables or disables rejection of partial codes.
Definition detail_config_logistic_codes.hpp:218
Interleaved2of5 & SetMinDataLength(int length)
Sets the minimum data length.
Definition detail_config_logistic_codes.hpp:181
int MaxDataLength() const
Gets the maximum data length.
Definition detail_config_logistic_codes.hpp:199
This namespace contains the configuration classes for all supported codes.
Definition decl_config_2d_codes.hpp:14
Checksum
Enum class for configuring checksums.
Definition decl_config_logistic_codes.hpp:15
Code128EnhancementMethod
Enum class for configuring enhancement method for Code128 codes.
Definition decl_config_logistic_codes.hpp:29
@ None
Disable enhancement.
Definition decl_config_logistic_codes.hpp:31
@ Method1
Enable enhancement method 1.
Definition decl_config_logistic_codes.hpp:33
@ All
Enable both, enhancement method 1 and 2.
Definition decl_config_logistic_codes.hpp:37
@ Method2
Enable enhancement method 2.
Definition decl_config_logistic_codes.hpp:35
Namespace for all decoding functionalities.
Definition decl_config_2d_codes.hpp:10
Root namespace for the Image Manager interface.
Definition c_bayer_to_rgb.h:17