JayBeams
0.1
Another project to have fun coding.
|
A helper type to define char fields with a limited set of values. More...
#include <char_list_field.hpp>
Public Member Functions | |
char_list_field () | |
Default constructor. More... | |
char_list_field (int x) | |
Constructor from an integer value. More... | |
int | as_int () const |
Return the integer value. More... | |
Comparison operators | |
bool | operator== (char_list_field const &rhs) const |
bool | operator== (int rhs) const |
bool | operator< (char_list_field const &rhs) const |
bool | operator< (int rhs) const |
Private Attributes | |
int | value_ |
In-memory representation of the field (int). More... | |
Friends | |
struct | decoder< true, char_list_field > |
struct | decoder< false, char_list_field > |
A helper type to define char fields with a limited set of values.
Many ITCH-5.0 fields are represented by a single byte on the wire, and are only supposed to take a limited set of values.
Definition at line 22 of file char_list_field.hpp.
|
inline |
Default constructor.
Definition at line 29 of file char_list_field.hpp.
|
inlineexplicit |
Constructor from an integer value.
std::runtime_exception | if the value is not in the template parameter list |
Definition at line 39 of file char_list_field.hpp.
|
inline |
Return the integer value.
Definition at line 46 of file char_list_field.hpp.
Referenced by main(), and jb::itch5::operator<<().
|
inline |
Definition at line 60 of file char_list_field.hpp.
|
inline |
Definition at line 63 of file char_list_field.hpp.
|
inline |
Definition at line 54 of file char_list_field.hpp.
|
inline |
Definition at line 57 of file char_list_field.hpp.
|
friend |
Definition at line 70 of file char_list_field.hpp.
|
friend |
Definition at line 69 of file char_list_field.hpp.
|
private |
In-memory representation of the field (int).
Typically ints are more efficient (in CPU time) than 8-bits octet.
Definition at line 74 of file char_list_field.hpp.
Referenced by jb::itch5::char_list_field< u 'O', u 'C', u 'H', u 'I'>::as_int(), jb::itch5::char_list_field< u 'O', u 'C', u 'H', u 'I'>::char_list_field(), jb::itch5::char_list_field< u 'O', u 'C', u 'H', u 'I'>::operator<(), jb::itch5::char_list_field< u 'O', u 'C', u 'H', u 'I'>::operator==(), and jb::itch5::decoder< validate, char_list_field< V... > >::r().