Enrollment 28.2.0
Loading...
Searching...
No Matches
ILOSIDTemplate.h
Go to the documentation of this file.
1
9
10#pragma once
11
13#include "enrollment/Export.h"
15
16namespace inno
17{
23 */
24 class ILOSIDTemplate : public Serializable
25 {
26 public:
30 */
31 [[nodiscard]] std::vector<uint8_t> GetData() const
32 {
33 return data;
34 }
35
40 */
41 explicit ILOSIDTemplate(std::vector<uint8_t>&& d)
42 : data(std::move(d))
43 {
44 if (data.empty())
45 {
46 throw InvalidTemplateException("Empty data in ILOSIDTemplate");
47 }
48 }
49
54 */
55 explicit ILOSIDTemplate(const std::vector<uint8_t>& d)
56 : data(d)
57 {
58 if (data.empty())
59 {
60 throw InvalidTemplateException("Empty data in ILOSIDTemplate");
61 }
62 }
64 void WriteTo(Writer& writer) const final
65 {
66 writer.WriteArray("d", data);
67 }
68
69 ILOSIDTemplate() = delete;
70
71 private:
72 std::vector<uint8_t> data;
73 };
74} // namespace inno
International Labour Organisation Seafarers Identity Document template.
Definition ILOSIDTemplate.h:24
std::vector< uint8_t > GetData() const
Provides template data.
Definition ILOSIDTemplate.h:30
void WriteTo(Writer &writer) const final
Write itself into writer.
Definition ILOSIDTemplate.h:63
ILOSIDTemplate(std::vector< uint8_t > &&d)
Create ILOSIDTemplate object move data to template.
Definition ILOSIDTemplate.h:40
ILOSIDTemplate(const std::vector< uint8_t > &d)
Create ILOSIDTemplate object, copy data to template.
Definition ILOSIDTemplate.h:54
Provides interface for serialization of all classes.
Definition Writer.h:164