NIST Biometric Evaluation Framework
Software components for biometric technology evaluations
be_framework_status.h
Go to the documentation of this file.
1/*
2 * This software was developed at the National Institute of Standards and
3 * Technology (NIST) by employees of the Federal Government in the course
4 * of their official duties. Pursuant to title 17 Section 105 of the
5 * United States Code, this software is not subject to copyright protection
6 * and is in the public domain. NIST assumes no responsibility whatsoever for
7 * its use by other parties, and makes no guarantees, expressed or implied,
8 * about its quality, reliability, or any other characteristic.
9 */
10
11#ifndef BE_FRAMEWORK_STATUS_H_
12#define BE_FRAMEWORK_STATUS_H_
13
14#include <ostream>
15#include <string>
16
18
19namespace BiometricEvaluation
20{
21 namespace Framework
22 {
24 class Status
25 {
26 public:
28 enum class Type
29 {
34 Debug,
39 Warning,
41 Error
42 };
43
54 Type type,
55 const std::string &message,
56 const std::string &identifier = "");
57
65 inline Type
67 const
68 noexcept
69 {
70 return (this->_type);
71 }
72
83 inline std::string
85 const
86 noexcept
87 {
88 return (this->_message);
89 }
90
104 inline std::string
106 const
107 noexcept
108 {
109 return (this->_identifier);
110 }
111
112 private:
114 Type _type{Type::Debug};
116 std::string _message{};
118 std::string _identifier{};
119 };
120
131 std::string
133 const Status &status);
134
147 std::ostream&
149 std::ostream &s,
150 const Status &status);
151 }
152}
153
156 BE_Framework_Status_Type_EnumToStringMap);
157
158#endif /* BE_FRAMEWORK_STATUS_H_ */
BE_FRAMEWORK_ENUMERATION_DECLARATIONS(BiometricEvaluation::Framework::Status::Type, BE_Framework_Status_Type_EnumToStringMap)
Information communicated back from framework methods.
Status(Type type, const std::string &message, const std::string &identifier="")
Status constructor.
std::string getIdentifier() const noexcept
Obtain the identifier from this Status.
Type getType() const noexcept
Obtain the Type of this Status' message.
std::string getMessage() const noexcept
Obtain the explanatory message from this Status.
std::string to_string(const Status &status)
Obtain a textual representation of a Status.
std::ostream & operator<<(std::ostream &s, const Status &status)
Output stream operator overload.
This software was developed at the National Institute of Standards and Technology (NIST) by employees...