SSP21-CPP
ParseError.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_PARSEERROR_H
17 #define SSP21_PARSEERROR_H
18 
19 #include <cstdint>
20 #include "ser4cpp/util/Uncopyable.h"
21 
22 namespace ssp21 {
23 
24 /**
25  The result of a message parse operation
26 */
27 enum class ParseError : uint8_t
28 {
29  /// message was parsed successfully
30  ok = 0x0,
31  /// parser ran out of bytes before completion
32  insufficient_bytes = 0x1,
33  /// an enumeration value was undefined
34  undefined_enum = 0x2,
35  /// the message function was not the expected value
36  unexpected_function = 0x3,
37  /// parser completed with bytes still remaining
38  too_many_bytes = 0x4,
39  /// reached an implementation specific capacity limit
40  impl_capacity_limit = 0x5,
41  /// the bit-field contains a reserved bit(s) that is set
42  reserved_bit = 0x6,
43  /// a variable length (vlength) was not encoded correctly
44  bad_vlength = 0x7
45 };
46 
47 inline bool any(ParseError value)
48 {
49  return value != ParseError::ok;
50 }
51 
53 {
54  typedef ParseError enum_type_t;
55 
56  static const char* to_string(ParseError arg);
57 };
58 
59 }
60 
61 #endif
SSP21-cpp main namespace.
Definition: BufferTypes.h:12
an enumeration value was undefined
parser ran out of bytes before completion
ParseError
Definition: ParseError.h:27
parser completed with bytes still remaining
the message function was not the expected value
the bit-field contains a reserved bit(s) that is set
a variable length (vlength) was not encoded correctly
reached an implementation specific capacity limit