Enrollment 28.2.0
Loading...
Searching...
No Matches
IrisCaptureDeviceTechnology.h
Go to the documentation of this file.
1
9
10#pragma once
12#include "enrollment/Export.h"
13#include <ostream>
14
15namespace inno
16{
21 */
22 enum class IrisCaptureDeviceTechnology : uint8_t
23 {
25 UNKNOWN = 0,
27 CMOS_CCD = 1,
28 };
29
30 // The numbers are from ISO standard and are tested in unit tests.
31 // NOLINTBEGIN(cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers)
32
39 */
40 static constexpr int IrisToIsoCaptureDeviceTechnology(IrisCaptureDeviceTechnology printCaptureDeviceTechnology)
41 {
42 switch (printCaptureDeviceTechnology)
43 {
45 return 0;
47 return 1;
48 default:
49 break;
50 }
51
52 throw EnrollmentInvalidArgumentException("Invalid conversion from IrisCaptureDeviceTechnology to ISO");
53 }
54
61 */
62 static constexpr IrisCaptureDeviceTechnology IsoToIrisCaptureDeviceTechnology(int isoCaptureDeviceTechnology)
63 {
64 switch (isoCaptureDeviceTechnology)
65 {
66 case 0:
68 case 1:
70 default:
71 break;
72 }
73
74 throw EnrollmentInvalidArgumentException("Invalid conversion from ISO to IrisCaptureDeviceTechnology");
75 }
76 // NOLINTEND(cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers)
77
78 inline std::ostream& operator<<(std::ostream& os, IrisCaptureDeviceTechnology printCaptureDeviceTechnology)
79 {
80 switch (printCaptureDeviceTechnology)
81 {
83 os << "UNKNOWN";
84 break;
86 os << "CMOS_CCD";
87 break;
88 }
89 return os;
90 }
91
92} // namespace inno
Base exception for all enrollment-sdk invalid argument exceptions.
Definition EnrollmentException.h:96
@ UNKNOWN
Unknown or Unspecified.
Definition FaceCaptureDeviceTechnology.h:23
static constexpr int IrisToIsoCaptureDeviceTechnology(IrisCaptureDeviceTechnology printCaptureDeviceTechnology)
Function converts IrisCaptureDeviceTechnology to ISO capture technology.
Definition IrisCaptureDeviceTechnology.h:39
IrisCaptureDeviceTechnology
It shall indicate the class of capture device technology used to acquire the captured biometric sampl...
Definition IrisCaptureDeviceTechnology.h:22
static constexpr IrisCaptureDeviceTechnology IsoToIrisCaptureDeviceTechnology(int isoCaptureDeviceTechnology)
Function converts ISO capture technology to IrisCaptureDeviceTechnology.
Definition IrisCaptureDeviceTechnology.h:61
@ UNKNOWN
Unknown or Unspecified.
Definition IrisCaptureDeviceTechnology.h:24
@ CMOS_CCD
Static photograph from an unknown source.
Definition IrisCaptureDeviceTechnology.h:26