Enrollment 28.2.0
Loading...
Searching...
No Matches
ISOCCTemplate.h
Go to the documentation of this file.
1
9
10#pragma once
11
13#include "enrollment/Export.h"
15
16namespace inno
17{
21 */
22 class ISOCCTemplate : public Serializable
23 {
24 public:
28 */
29 [[nodiscard]] std::vector<uint8_t> GetData() const
30 {
31 return data;
32 }
33
38 */
39 explicit ISOCCTemplate(std::vector<uint8_t>&& d)
40 : data(std::move(d))
41 {
42 if (data.empty())
43 {
44 throw InvalidTemplateException("Empty data in ISOCCTemplate");
45 }
46 }
47
52 */
53 explicit ISOCCTemplate(const std::vector<uint8_t>& d)
54 : data(d)
55 {
56 if (data.empty())
57 {
58 throw InvalidTemplateException("Empty data in ISOCCTemplate");
59 }
60 }
62 void WriteTo(Writer& writer) const final
63 {
64 writer.WriteArray("d", data);
65 }
66
67 ISOCCTemplate() = delete;
68
69 private:
70 std::vector<uint8_t> data;
71 };
72} // namespace inno
ISO/IEC 19794-2:2005 template, template version 2.0, 3-byte format for minutiae (compact card encodin...
Definition ISOCCTemplate.h:22
std::vector< uint8_t > GetData() const
Provides template data.
Definition ISOCCTemplate.h:28
ISOCCTemplate(const std::vector< uint8_t > &d)
Create ISOCCTemplate object, copy data to template.
Definition ISOCCTemplate.h:52
void WriteTo(Writer &writer) const final
Write itself into writer.
Definition ISOCCTemplate.h:61
ISOCCTemplate(std::vector< uint8_t > &&d)
Create ISOCCTemplate object move data to template.
Definition ISOCCTemplate.h:38
Provides interface for serialization of all classes.
Definition Writer.h:164