CVB++ 15.0
code93.hpp
1#pragma once
2
3#include "reader_with_transmit_start_stop_config.hpp"
4
5namespace Cvb
6{
7 CVB_BEGIN_INLINE_NS
8
9 namespace Barcode
10 {
11 using namespace Internal;
12
13
15
18 {
19
20
21 public:
22 virtual Symbology Type() const override { return Symbology::Code93; };
23
25
31 static std::unique_ptr<Code93> FromHandle(const HandleGuard<ReaderConfig>& guard, bool& isActiveOut)
32 {
33 auto pConfig = std::unique_ptr<Code93>(new Code93());
34 isActiveOut = pConfig->ReadFromHandle(guard);
35 return pConfig;
36 }
37
38 protected:
39 virtual bool ReadFromHandle_(const HandleGuard<ReaderConfig>& guard) override
40 {
41 CExports::cvbbool_t active;
42 CVB_CALL_CAPI(CvcBcGetCode93(reinterpret_cast<std::intptr_t>(guard.Handle()),
43 &active,
44 &minDigits_,
45 &maxDigits_,
46 checkQuietzone_.Ptr(),
47 evalCheckDigit_.Ptr(),
48 transmitCheckDigit_.Ptr(),
49 transmitStartStop_.Ptr(),
50 inverse_.Ptr()
51 ));
52 return SmartBool(active);
53 }
54
55 virtual void WriteToHandle_(bool active, HandleGuard<ReaderConfig>& guard) override
56 {
57 Internal::DoResCall([&]()
58 {
59 return CVB_CALL_CAPI(CvcBcSetCode93(reinterpret_cast<std::intptr_t>(guard.Handle()),
60 SmartBool(active),
61 minDigits_,
62 maxDigits_,
63 checkQuietzone_,
64 evalCheckDigit_,
65 transmitCheckDigit_,
66 transmitStartStop_,
67 inverse_
68 ));
69 });
70 }
71 protected:
72 Code93()
73 : ReaderWithTransmitStartStopConfigBase()
74 {
75 }
76
77 };
78
79 using Code93Ptr = std::shared_ptr<Code93>;
80 }
81
82 CVB_END_INLINE_NS
83}
Configuration to access parameters of Code93.
Definition: code93.hpp:18
static std::unique_ptr< Code93 > FromHandle(const HandleGuard< ReaderConfig > &guard, bool &isActiveOut)
Create object from handle.
Definition: code93.hpp:31
Configuration to access parameters of ReaderWithTransmitStartStopConfigBase.
Definition: reader_with_transmit_start_stop_config.hpp:19
Symbology
The symbologies supported by Barcode.
Definition: barcode.hpp:97
@ Code93
Code 93 Barcode.
Root namespace for the Image Manager interface.
Definition: c_barcode.h:24