CVB++ 15.0
detail_config_base.hpp
1#pragma once
2
3#include "../../_cexports/c_code_reader.h"
4#include "detail_decoder.hpp"
5
6namespace Cvb
7{
8 CVB_BEGIN_INLINE_NS
9
10 namespace CodeReader
11 {
12 namespace Config
13 {
14#pragma region ConfigBase
15 template <class T>
17 {
18 return SetIntProperty(static_cast<int>(ReverseMapper<T>().type), 1);
19 }
20
21 template <class T>
23 {
24 return SetIntProperty(static_cast<int>(ReverseMapper<T>().type), 0);
25 }
26
27 template <class T>
29 {
30 return static_cast<bool>(GetIntProperty(static_cast<int>(ReverseMapper<T>().type)));
31 }
32
33 template <class T>
34 T &ConfigBase<T>::SetIntProperty(int property, int value)
35 {
36 CVB_CALL_CAPI_CHECKED(CVCRSetPropertyInt(decoder_.Handle(), property, value));
37 return static_cast<T &>(*this);
38 }
39
40 template <class T>
41 int ConfigBase<T>::GetIntProperty(int property) const
42 {
43 int value = 0;
44 CVB_CALL_CAPI_CHECKED(CVCRGetPropertyInt(decoder_.Handle(), property, value));
45 return value;
46 }
47#pragma endregion
48
49#pragma region CompositeCodeBase
50 template <class T>
52 {
53 return this->GetIntProperty(static_cast<int>(CExports::CVCRSymbologies::CVCRS_CCA));
54 }
55
56 template <class T>
58 {
59 return this->SetIntProperty(static_cast<int>(CExports::CVCRSymbologies::CVCRS_CCA), 1);
60 }
61
62 template <class T>
64 {
65 return this->SetIntProperty(static_cast<int>(CExports::CVCRSymbologies::CVCRS_CCA), 0);
66 }
67
68 template <class T>
70 {
71 return this->GetIntProperty(static_cast<int>(CExports::CVCRSymbologies::CVCRS_CCB));
72 }
73
74 template <class T>
76 {
77 return this->SetIntProperty(static_cast<int>(CExports::CVCRSymbologies::CVCRS_CCB), 1);
78 }
79
80 template <class T>
82 {
83 return this->SetIntProperty(static_cast<int>(CExports::CVCRSymbologies::CVCRS_CCB), 0);
84 }
85
86 template <class T>
88 {
89 return this->GetIntProperty(static_cast<int>(CExports::CVCRSymbologies::CVCRS_CCC));
90 }
91
92 template <class T>
94 {
95 return this->SetIntProperty(static_cast<int>(CExports::CVCRSymbologies::CVCRS_CCC), 1);
96 }
97
98 template <class T>
100 {
101 return this->SetIntProperty(static_cast<int>(CExports::CVCRSymbologies::CVCRS_CCC), 0);
102 }
103#pragma endregion
104
105 } // namespace Config
106 } // namespace CodeReader
107
108 CVB_END_INLINE_NS
109} // namespace Cvb
bool EnabledCCC() const
Checks if CompositeComponent C (CC-C) decoding is enabled.
Definition detail_config_base.hpp:87
virtual T & EnableCCB()
Enables CompositeComponent B (CC-B) decoding.
Definition detail_config_base.hpp:75
virtual T & DisableCCB()
Disables CompositeComponent B (CC-B) decoding.
Definition detail_config_base.hpp:81
virtual T & EnableCCA()
Enables CompositeComponent A (CC-A) decoding.
Definition detail_config_base.hpp:57
virtual T & DisableCCA()
Disables CompositeComponent A (CC-A) decoding.
Definition detail_config_base.hpp:63
bool EnabledCCA() const
Checks if CompositeComponent A (CC-A) decoding is enabled.
Definition detail_config_base.hpp:51
virtual T & EnableCCC()
Enables CompositeComponent C (CC-C) decoding.
Definition detail_config_base.hpp:93
virtual T & DisableCCC()
Disables CompositeComponent C (CC-C) decoding.
Definition detail_config_base.hpp:99
bool EnabledCCB() const
Checks if CompositeComponent B (CC-B) decoding is enabled.
Definition detail_config_base.hpp:69
T & Enable()
Enables decoding for the code type represented by the derived class.
Definition detail_config_base.hpp:16
T & Disable()
Disables decoding for the code type represented by the derived class.
Definition detail_config_base.hpp:22
bool Enabled() const
Checks if decoding for the code type represented by the derived class is enabled.
Definition detail_config_base.hpp:28
This namespace contains the configuration classes for all supported codes.
Definition decl_config_2d_codes.hpp:14
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