CVB++ 15.0
decl_config_logistic_codes.hpp
1#pragma once
2
3#include "../../_cexports/c_code_reader.h"
4
5namespace Cvb
6{
7 CVB_BEGIN_INLINE_NS
8
9 namespace CodeReader
10 {
11 namespace Config
12 {
14 enum class Checksum
15 {
17 None = 0,
19 Enable = 1,
22 };
23
25
29 {
31 None = 0,
37 All = 3
38 };
39
41
56 class Code128 final : public ConfigBase<Code128>
57 {
58 friend class Cvb::CodeReader::Decoder;
59
60 private:
61 Code128(Decoder &decoder) noexcept
62 : ConfigBase<Code128>(decoder)
63 {
64 }
65
66 public:
68
72 Code128 &SetMinDataLength(int length);
73
75
78 int MinDataLength() const;
79
81
86 Code128 &SetMaxDataLength(int length);
87
89
93 int MaxDataLength() const;
94
96
104
106
111 };
112
113 template <>
114 struct Mapper<Symbology::Code128>
115 {
116 using Type = Config::Code128;
117 };
118
119 template <>
120 struct ReverseMapper<Config::Code128>
121 {
122 static constexpr Symbology type = Symbology::Code128;
123 };
124
126
141 class Code39 final : public ConfigBase<Code39>
142 {
143 friend class Cvb::CodeReader::Decoder;
144
145 private:
146 Code39(Decoder &decoder) noexcept
147 : ConfigBase<Code39>(decoder)
148 {
149 }
150
151 public:
153
157 Code39 &SetMinDataLength(int length);
158
160
163 int MinDataLength() const;
164
166
171 Code39 &SetMaxDataLength(int length);
172
174
178 int MaxDataLength() const;
179
181
188 Code39 &SetFullAsciiModeEnabled(bool value);
189
191
195 bool IsFullAsciiModeEnabled() const;
196
198
202 Code39 &SetChecksumEnabled(Checksum value);
203
205
209
211
215 Code39 &SetAddStartStopCharEnabled(bool value);
216
218
221 bool IsAddedStartStopCharEnabled() const;
222 };
223
224 template <>
225 struct Mapper<Symbology::Code39>
226 {
227 using Type = Config::Code39;
228 };
229
230 template <>
231 struct ReverseMapper<Config::Code39>
232 {
233 static constexpr Symbology type = Symbology::Code39;
234 };
235
237
252 class Code93 final : public ConfigBase<Code93>
253 {
254 friend class Cvb::CodeReader::Decoder;
255
256 private:
257 Code93(Decoder &decoder) noexcept
258 : ConfigBase<Code93>(decoder)
259 {
260 }
261
262 public:
264
268 Code93 &SetMinDataLength(int length);
269
271
274 int MinDataLength() const;
275
277
282 Code93 &SetMaxDataLength(int length);
283
285
289 int MaxDataLength() const;
290 };
291
292 template <>
293 struct Mapper<Symbology::Code93>
294 {
295 using Type = Config::Code93;
296 };
297
298 template <>
299 struct ReverseMapper<Config::Code93>
300 {
301 static constexpr Symbology type = Symbology::Code93;
302 };
303
305
320 class Interleaved2of5 final : public ConfigBase<Interleaved2of5>
321 {
322 friend class Cvb::CodeReader::Decoder;
323
324 private:
325 Interleaved2of5(Decoder &decoder) noexcept
326 : ConfigBase<Interleaved2of5>(decoder)
327 {
328 }
329
330 public:
332
336 Interleaved2of5 &SetMinDataLength(int length);
337
339
342 int MinDataLength() const;
343
345
350 Interleaved2of5 &SetMaxDataLength(int length);
351
353
357 int MaxDataLength() const;
358
360
364 Interleaved2of5 &SetChecksumEnabled(Checksum value);
365
367
371
373
380 Interleaved2of5 &SetRejectPartialEnabled(bool value);
381
383
387 bool IsRejectPartialEnabled() const;
388 };
389
390 template <>
391 struct Mapper<Symbology::Interleaved2of5>
392 {
393 using Type = Config::Interleaved2of5;
394 };
395
396 template <>
397 struct ReverseMapper<Config::Interleaved2of5>
398 {
399 static constexpr Symbology type = Symbology::Interleaved2of5;
400 };
401 } // namespace Config
402 } // namespace CodeReader
403
404 CVB_END_INLINE_NS
405} // namespace Cvb
Configuration class for Code 128 barcodes.
Definition decl_config_logistic_codes.hpp:57
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
Configuration class for Code 39 barcodes.
Definition decl_config_logistic_codes.hpp:142
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
Configuration class for Code 93 barcodes.
Definition decl_config_logistic_codes.hpp:253
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
Configuration class for Interleaved 2 of 5 barcodes.
Definition decl_config_logistic_codes.hpp:321
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
Class for decoding.
Definition decl_decoder.hpp:101
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
@ Enable
Enable checksum.
Definition decl_config_logistic_codes.hpp:19
@ EnableAndStrip
Enable checksum and remove the check character from the result.
Definition decl_config_logistic_codes.hpp:21
Code128EnhancementMethod
Enum class for configuring enhancement method for Code128 codes.
Definition decl_config_logistic_codes.hpp:29
@ 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
@ None
Definition decl_config_base.hpp:197
Namespace for all decoding functionalities.
Definition decl_config_2d_codes.hpp:10
Symbology
Enum class listing all supported symbologies.
Definition decl_config_base.hpp:35
@ Code128
Code 128.
Definition decl_config_base.hpp:77
@ Code39
Code 39.
Definition decl_config_base.hpp:82
@ Interleaved2of5
Interleaved 2 of 5.
Definition decl_config_base.hpp:92
@ Code93
Code 93.
Definition decl_config_base.hpp:87
Root namespace for the Image Manager interface.
Definition c_bayer_to_rgb.h:17