18#ifndef LIBTEEUI_INCLUDE_TEEUI_ERROR_H_
19#define LIBTEEUI_INCLUDE_TEEUI_ERROR_H_
62 operator bool()
const {
return v_ !=
OK; }
75#ifdef TEEUI_DO_LOG_DEBUG
78[[maybe_unused]]
static std::ostream&
operator<<(std::ostream& out,
Error e) {
81 return out <<
"teeui::Error::OK";
83 return out <<
"teeui::Error::NotInitialized";
85 return out <<
"teeui::Error::FaceNotLoaded";
87 return out <<
"teeui::Error::CharSizeNotSet";
89 return out <<
"teeui::Error::GlyphNotLoaded";
91 return out <<
"teeui::Error::GlyphNotRendered";
93 return out <<
"teeui::Error::GlyphNotExtracted";
95 return out <<
"teeui::Error::UnsupportedPixelFormat";
97 return out <<
"teeui::Error::OutOfBoundsDrawing";
99 return out <<
"teeui::Error::BBoxComputation";
101 return out <<
"teeui::Error::OutOfMemory";
103 return out <<
"Invalid teeui::Error Code";
constexpr Error() noexcept
Definition: error.h:43
bool operator==(error_e v) const
Definition: error.h:66
error_e v_
Definition: error.h:72
Error & operator=(const Error &other)
Definition: error.h:52
constexpr error_e code() const
Definition: error.h:69
Error operator||(const Error &rhs) const
Definition: error.h:64
error_e
Definition: error.h:28
@ GlyphNotRendered
Definition: error.h:34
@ FaceNotLoaded
Definition: error.h:31
@ CharSizeNotSet
Definition: error.h:32
@ NotInitialized
Definition: error.h:30
@ GlyphNotLoaded
Definition: error.h:33
@ BBoxComputation
Definition: error.h:38
@ OK
Definition: error.h:29
@ OutOfBoundsDrawing
Definition: error.h:37
@ OutOfMemory
Definition: error.h:39
@ Localization
Definition: error.h:40
@ UnsupportedPixelFormat
Definition: error.h:36
@ GlyphNotExtracted
Definition: error.h:35
constexpr Error(Error &&) noexcept=default
bool operator!=(error_e v) const
Definition: error.h:67
constexpr Error(error_e v) noexcept
Definition: error.h:44
std::ostream & operator<<(std::ostream &os, const ServiceInfo &service_info)
Definition: mdns_service_info.h:43