SSP21-CPP
FormatError.h
1 //
2 // _ _ ______ _ _ _ _ _ _ _
3 // | \ | | | ____| | (_) | (_) | | | |
4 // | \| | ___ | |__ __| |_| |_ _ _ __ __ _| | | |
5 // | . ` |/ _ \ | __| / _` | | __| | '_ \ / _` | | | |
6 // | |\ | (_) | | |___| (_| | | |_| | | | | (_| |_|_|_|
7 // |_| \_|\___/ |______\__,_|_|\__|_|_| |_|\__, (_|_|_)
8 // __/ |
9 // |___/
10 //
11 // This file is auto-generated. Do not edit manually
12 //
13 // Licensed under the terms of the BSDv3 license
14 //
15 
16 #ifndef SSP21_FORMATERROR_H
17 #define SSP21_FORMATERROR_H
18 
19 #include <cstdint>
20 #include "ser4cpp/util/Uncopyable.h"
21 #include "ssp21/util/ErrorCategory.h"
22 
23 namespace ssp21 {
24 
25 /**
26  The result of a message format operation
27 */
28 enum class FormatError : uint8_t
29 {
30  /// message was formatted successfully
31  ok = 0x0,
32  /// not enough output buffer space
33  insufficient_space = 0x1
34 };
35 
36 inline bool any(FormatError value)
37 {
38  return value != FormatError::ok;
39 }
40 
42 {
43  typedef FormatError enum_type_t;
44 
45  static const char* name;
46 
47  static const char* to_string(FormatError arg);
48 };
49 
51 
52 inline std::error_code make_error_code(FormatError err)
53 {
54  return std::error_code(static_cast<int>(err), FormatErrorCategory::get());
55 }
56 
57 }
58 
59 namespace std {
60 
61 template <>
62 struct is_error_code_enum<ssp21::FormatError> : public true_type {};
63 
64 }
65 
66 #endif
SSP21-cpp main namespace.
Definition: BufferTypes.h:12
not enough output buffer space
FormatError
Definition: FormatError.h:28