CVB++ 15.0
Loading...
Searching...
No Matches
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);
42 return SetIntProperty(static_cast<int>(CExports::CVCRSymbologyPropertiesCode128::CVCRSPC128_EnhanceMethod2),
43 1);
45 return SetIntProperty(static_cast<int>(CExports::CVCRSymbologyPropertiesCode128::CVCRSPC128_EnhanceMethod1),
46 1)
47 .SetIntProperty(static_cast<int>(CExports::CVCRSymbologyPropertiesCode128::CVCRSPC128_EnhanceMethod2),
48 1);
50 return SetIntProperty(static_cast<int>(CExports::CVCRSymbologyPropertiesCode128::CVCRSPC128_EnhanceMethod1),
51 0)
52 .SetIntProperty(static_cast<int>(CExports::CVCRSymbologyPropertiesCode128::CVCRSPC128_EnhanceMethod2),
53 0);
54 default:
55 return SetIntProperty(static_cast<int>(CExports::CVCRSymbologyPropertiesCode128::CVCRSPC128_EnhanceMethod1),
56 0)
57 .SetIntProperty(static_cast<int>(CExports::CVCRSymbologyPropertiesCode128::CVCRSPC128_EnhanceMethod2),
58 0);
59 }
60 }
61
63 {
64 const auto method1 =
65 GetIntProperty(static_cast<int>(CExports::CVCRSymbologyPropertiesCode128::CVCRSPC128_EnhanceMethod1));
66 const auto method2 =
67 GetIntProperty(static_cast<int>(CExports::CVCRSymbologyPropertiesCode128::CVCRSPC128_EnhanceMethod2));
68
69 if (method1 == 0)
70 {
71 if (method2 == 0)
72 {
74 }
75 else
76 {
78 }
79 }
80 else
81 {
82 if (method2 == 0)
83 {
85 }
86 else
87 {
89 }
90 }
91 }
92#pragma endregion
93
94#pragma region Code39
95 inline Code39 &Code39::SetMinDataLength(int length)
96 {
97 return this->SetIntProperty(static_cast<int>(CExports::CVCRSymbologyPropertiesCode39::CVCRSPC39_MinLength),
98 length);
99 }
100
101 inline int Code39::MinDataLength() const
102 {
103 return this->GetIntProperty(static_cast<int>(CExports::CVCRSymbologyPropertiesCode39::CVCRSPC39_MinLength));
104 }
105
106 inline Code39 &Code39::SetMaxDataLength(int length)
107 {
108 return this->SetIntProperty(static_cast<int>(CExports::CVCRSymbologyPropertiesCode39::CVCRSPC39_MaxLength),
109 length);
110 }
111
112 inline int Code39::MaxDataLength() const
113 {
114 return this->GetIntProperty(static_cast<int>(CExports::CVCRSymbologyPropertiesCode39::CVCRSPC39_MaxLength));
115 }
116
117 inline Code39 &Code39::SetFullAsciiModeEnabled(bool value)
118 {
119 return this->SetIntProperty(static_cast<int>(CExports::CVCRSymbologyPropertiesCode39::CVCRSPC39_FullASCII),
120 value);
121 }
122
124 {
125 return this->GetIntProperty(static_cast<int>(CExports::CVCRSymbologyPropertiesCode39::CVCRSPC39_FullASCII));
126 }
127
129 {
130 return this->SetIntProperty(static_cast<int>(CExports::CVCRSymbologyPropertiesCode39::CVCRSPC39_CheckSum),
131 static_cast<int>(value));
132 }
133
135 {
136 return static_cast<Checksum>(
137 this->GetIntProperty(static_cast<int>(CExports::CVCRSymbologyPropertiesCode39::CVCRSPC39_CheckSum)));
138 }
139
140 inline Code39 &Code39::SetAddStartStopCharEnabled(bool value)
141 {
142 return this->SetIntProperty(static_cast<int>(CExports::CVCRSymbologyPropertiesCode39::CVCRSPC39_SendStartStop),
143 value);
144 }
145
147 {
148 return this->GetIntProperty(static_cast<int>(CExports::CVCRSymbologyPropertiesCode39::CVCRSPC39_SendStartStop));
149 }
150#pragma endregion
151
152#pragma region Code93
153 inline Code93 &Code93::SetMinDataLength(int length)
154 {
155 return this->SetIntProperty(static_cast<int>(CExports::CVCRSymbologyPropertiesCode93::CVCRSPC93_MinLength),
156 length);
157 }
158
159 inline int Code93::MinDataLength() const
160 {
161 return this->GetIntProperty(static_cast<int>(CExports::CVCRSymbologyPropertiesCode93::CVCRSPC93_MinLength));
162 }
163
164 inline Code93 &Code93::SetMaxDataLength(int length)
165 {
166 return this->SetIntProperty(static_cast<int>(CExports::CVCRSymbologyPropertiesCode93::CVCRSPC93_MaxLength),
167 length);
168 }
169
170 inline int Code93::MaxDataLength() const
171 {
172 return this->GetIntProperty(static_cast<int>(CExports::CVCRSymbologyPropertiesCode93::CVCRSPC93_MaxLength));
173 }
174#pragma endregion
175
176#pragma region Interleaved2of5
177 inline Interleaved2of5 &Interleaved2of5::SetMinDataLength(int length)
178 {
179 return this->SetIntProperty(
180 static_cast<int>(CExports::CVCRSymbologyPropertiesInterleaved2of5::CVCRSPI25_MinLength), length);
181 }
182
184 {
185 return this->GetIntProperty(
186 static_cast<int>(CExports::CVCRSymbologyPropertiesInterleaved2of5::CVCRSPI25_MinLength));
187 }
188
189 inline Interleaved2of5 &Interleaved2of5::SetMaxDataLength(int length)
190 {
191 return this->SetIntProperty(
192 static_cast<int>(CExports::CVCRSymbologyPropertiesInterleaved2of5::CVCRSPI25_MaxLength), length);
193 }
194
196 {
197 return this->GetIntProperty(
198 static_cast<int>(CExports::CVCRSymbologyPropertiesInterleaved2of5::CVCRSPI25_MaxLength));
199 }
200
201 inline Interleaved2of5 &Interleaved2of5::SetChecksumEnabled(Checksum value)
202 {
203 return this->SetIntProperty(
204 static_cast<int>(CExports::CVCRSymbologyPropertiesInterleaved2of5::CVCRSPI25_CheckSum),
205 static_cast<int>(value));
206 }
207
209 {
210 return static_cast<Checksum>(this->GetIntProperty(
211 static_cast<int>(CExports::CVCRSymbologyPropertiesInterleaved2of5::CVCRSPI25_CheckSum)));
212 }
213
214 inline Interleaved2of5 &Interleaved2of5::SetRejectPartialEnabled(bool value)
215 {
216 return this->SetIntProperty(
217 static_cast<int>(CExports::CVCRSymbologyPropertiesInterleaved2of5::CVCRSPI25_RejectPartial),
218 static_cast<int>(value));
219 }
220
222 {
223 return static_cast<bool>(this->GetIntProperty(
224 static_cast<int>(CExports::CVCRSymbologyPropertiesInterleaved2of5::CVCRSPI25_RejectPartial)));
225 }
226#pragma endregion
227 } // namespace Config
228 } // namespace CodeReader
229
230 CVB_END_INLINE_NS
231} // 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:62
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:117
bool IsAddedStartStopCharEnabled() const
Checks whether adding start and stop characters to decoded data is enabled.
Definition detail_config_logistic_codes.hpp:146
int MinDataLength() const
Gets the minimum data length.
Definition detail_config_logistic_codes.hpp:101
Code39 & SetMinDataLength(int length)
Sets the minimum data length.
Definition detail_config_logistic_codes.hpp:95
bool IsFullAsciiModeEnabled() const
Checks whether the Full ASCII mode is enabled.
Definition detail_config_logistic_codes.hpp:123
Code39 & SetChecksumEnabled(Checksum value)
Configures checksum for decoding.
Definition detail_config_logistic_codes.hpp:128
Checksum IsChecksumEnabled() const
Gets checksum configuration.
Definition detail_config_logistic_codes.hpp:134
Code39 & SetMaxDataLength(int length)
Sets the maximum data length.
Definition detail_config_logistic_codes.hpp:106
Code39 & SetAddStartStopCharEnabled(bool value)
Enables or disables adding start and stop characters to decoded data.
Definition detail_config_logistic_codes.hpp:140
int MaxDataLength() const
Gets the maximum data length.
Definition detail_config_logistic_codes.hpp:112
int MinDataLength() const
Gets the minimum data length.
Definition detail_config_logistic_codes.hpp:159
Code93 & SetMaxDataLength(int length)
Sets the maximum data length.
Definition detail_config_logistic_codes.hpp:164
Code93 & SetMinDataLength(int length)
Sets the minimum data length.
Definition detail_config_logistic_codes.hpp:153
int MaxDataLength() const
Gets the maximum data length.
Definition detail_config_logistic_codes.hpp:170
bool IsRejectPartialEnabled() const
Checks whether rejection of partial codes is enabled.
Definition detail_config_logistic_codes.hpp:221
int MinDataLength() const
Gets the minimum data length.
Definition detail_config_logistic_codes.hpp:183
Interleaved2of5 & SetMaxDataLength(int length)
Sets the maximum data length.
Definition detail_config_logistic_codes.hpp:189
Interleaved2of5 & SetChecksumEnabled(Checksum value)
Configures checksum for decoding.
Definition detail_config_logistic_codes.hpp:201
Checksum IsChecksumEnabled() const
Gets checksum configuration.
Definition detail_config_logistic_codes.hpp:208
Interleaved2of5 & SetRejectPartialEnabled(bool value)
Enables or disables rejection of partial codes.
Definition detail_config_logistic_codes.hpp:214
Interleaved2of5 & SetMinDataLength(int length)
Sets the minimum data length.
Definition detail_config_logistic_codes.hpp:177
int MaxDataLength() const
Gets the maximum data length.
Definition detail_config_logistic_codes.hpp:195
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