Enrollment
28.2.0
Theme:
Default
Robot
Toggle main menu visibility
Loading...
Searching...
No Matches
ILOSIDTemplate.h
Go to the documentation of this file.
1
9
10
#pragma once
11
12
#include "
enrollment/Exception/EnrollmentException.h
"
13
#include "enrollment/Export.h"
14
#include "
enrollment/Serialization/Writer.h
"
15
16
namespace
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
}
63
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
EnrollmentException.h
Writer.h
ILOSIDTemplate
International Labour Organisation Seafarers Identity Document template.
Definition
ILOSIDTemplate.h:24
ILOSIDTemplate::GetData
std::vector< uint8_t > GetData() const
Provides template data.
Definition
ILOSIDTemplate.h:30
ILOSIDTemplate::WriteTo
void WriteTo(Writer &writer) const final
Write itself into writer.
Definition
ILOSIDTemplate.h:63
ILOSIDTemplate::ILOSIDTemplate
ILOSIDTemplate(std::vector< uint8_t > &&d)
Create ILOSIDTemplate object move data to template.
Definition
ILOSIDTemplate.h:40
ILOSIDTemplate::ILOSIDTemplate
ILOSIDTemplate(const std::vector< uint8_t > &d)
Create ILOSIDTemplate object, copy data to template.
Definition
ILOSIDTemplate.h:54
Writer
Provides interface for serialization of all classes.
Definition
Writer.h:164
Print
ILOSIDTemplate.h
Generated by
1.17.0