9 #ifndef JB_ITCH5_DEFAULTS_array_based_book_max_size 10 #define JB_ITCH5_DEFAULTS_array_based_book_max_size 8192 11 #endif // JB_ITCH5_DEFAULTS_array_based_book_max_size 19 .help(
"Configure the max size of a array based order book." 20 " Only used when enable-array-based is set"),
27 std::ostringstream os;
28 os <<
"max-size option must be > 0, value=" <<
max_size();
35 char const* operation,
int qty,
price4_t px) {
36 std::ostringstream os;
37 os <<
"array_based_book_side::" << operation <<
" - parameters out of range:" 38 <<
" px=" << px <<
" should be in [" <<
price4_t(0) <<
"," 39 << max_price_field_value<price4_t>() <<
"), qty=" << qty
45 std::string
const& msg, std::size_t tk_begin_top, std::size_t tk_inside,
46 price4_t px,
int book_qty,
int qty) {
47 std::ostringstream os;
48 os << msg <<
" tk_begin_top=" << tk_begin_top <<
", tk_inside=" << tk_inside
49 <<
", px=" << px <<
", book_qty=" << book_qty <<
", qty=" << qty;
Define defaults for program parameters.
void raise_invalid_reduce(std::string const &msg, std::size_t tk_begin_top, std::size_t tk_inside, price4_t px, int book_qty, int qty)
Raise an exception describing a invalid reduce operation.
Communicate feed error exceptions.
void raise_invalid_operation_parameters(char const *operation, int qty, price4_t px)
Raise the right exception when we detect invalid parameters for add_order() or reduce_order() ...
#define JB_ITCH5_DEFAULTS_array_based_book_max_size
jb::config_attribute< config, int > max_size
A simple class to communicate the result of parsing the options.
void validate() const override
Validate the configuration.
price_field< std::uint32_t, 10000 > price4_t
Convenience definition for Price(4) fields.
The top-level namespace for the JayBeams library.