67 , threshold_(other.threshold_)
68 , enabled_(other.enabled_)
93 group_.controlAssignment(
"BBO Threshold Enable", enabled_, value);
116 if (0 <= value.mantissa())
118 group_.controlAssignment(
"BBO Threshold", threshold_, value);
165 threshold_ = other.threshold_;
166 enabled_ = other.enabled_;
222 : price_(other.price_)
253 return (price_.enabled());
290 return price_.group();
297 price_.assignNoControl(other.price_);
319 toStr(str, tracking);
344 : price_(other.price_)
345 , quantity_(other.quantity_)
394 return (price_.enabled() || quantity_.enabled());
437 return price_.group();
444 price_.assignNoControl(other.price_);
445 quantity_.assignNoControl(other.quantity_);
468 toStr(str, tracking);
483 , numberOfOrders_(
group)
494 , numberOfOrders_(other.numberOfOrders_)
507 return numberOfOrders_;
516 return numberOfOrders_;
539 || (numberOfOrders_.enabled()
571 numberOfOrders_.assignNoControl(other.numberOfOrders_);
593 toStr(str, tracking);
601template <
class BboTracking>
611 , bboTracking_(
group)
621 : maintain_(other.maintain_)
622 , bboTracking_(other.bboTracking_)
651 group().controlAssignment(
"Maintain", maintain_, value);
699 return bboTracking_.group();
706 maintain_ = other.maintain_;
708 bboTracking_.assignNoControl(other.bboTracking_);
716 BboTracking bboTracking_;
723template <
class BboTracking,
typename Depth>
745 : Base(static_cast<const Base&>(other))
746 , defaultDepth_(other.defaultDepth_)
762 return defaultDepth_;
774 this->
group().controlAssignment(
"Default Depth", defaultDepth_, value);
789 this->
group().controlChange(
790 "Fixed Depth Book Management Settings", &FixedDepthBookManagement::assignNoControl, *
this, other
813 defaultDepth_ = other.defaultDepth_;
822template <
class BboTracking,
typename Depth>
841 : Base(static_cast<const Base&>(other))
855 this->
group().controlChange(
856 "Any Depth Book Management Settings", &AnyDepthBookManagement::assignNoControl, *
this, other
924 toStr(str, strategy);
960 , mboBooks_(&group())
961 , directBooks_(&group(), 10)
962 , impliedBooks_(&group(), 2)
974 , mboBooks_(other.mboBooks_)
975 , directBooks_(other.directBooks_)
976 , impliedBooks_(other.impliedBooks_)
977 , consolidatedBooks_(other.consolidatedBooks_)
978 , updateNotification_(other.updateNotification_)
1009 return directBooks_;
1018 return directBooks_;
1027 return impliedBooks_;
1036 return impliedBooks_;
1045 return consolidatedBooks_;
1054 return consolidatedBooks_;
1064 return updateNotification_;
1090 group().
controlChange(
"Book Management Settings", &BookManagement::assignNoControl, *
this, other);
1124 mboBooks_.assignNoControl(other.mboBooks_);
1126 directBooks_.assignNoControl(other.directBooks_);
1128 impliedBooks_.assignNoControl(other.impliedBooks_);
1132 updateNotification_ = other.updateNotification_;
1151 toStr(str, settings);
#define ONIXS_CMEMDH_NAMESPACE_BEGIN
#define ONIXS_CMEMDH_LTWT
#define ONIXS_CMEMDH_LTWT_CLASS_DECL(name)
#define ONIXS_CMEMDH_NAMESPACE_END
#define ONIXS_CMEMDH_EXPORTED
#define ONIXS_CMEMDH_NORETURN
#define ONIXS_CMEMDH_NODISCARD
Configures book management for variable-depth book types.
AnyDepthBookManagement(const SettingGroup *group=nullptr)
Initializes variable-depth book management settings.
friend class BookManagement
AnyDepthBookManagement(const AnyDepthBookManagement &other)
Copies variable-depth book-management settings from another instance.
AnyDepthBookManagement & operator=(const AnyDepthBookManagement &other)
Copies variable-depth book-management settings from another instance.
Configures common book-maintenance settings for one book type.
~BaseBookManagement()=default
Finalizes the book-management settings.
BaseBookManagement(const SettingGroup *group=nullptr)
Initializes book management with maintenance disabled.
BaseBookManagement(const BaseBookManagement &other)
Copies book-management settings from another instance.
friend class BookManagement
const SettingGroup & group() const
BaseBookManagement & maintain(bool value)
Enables or disables maintenance of this book type.
BboTracking & bboTracking() noexcept
Returns mutable BBO tracking settings for this book type.
bool maintain() const noexcept
Indicates whether the Handler maintains this book type.
BaseBookManagement & operator=(const BaseBookManagement &other)
Copies book-management settings from another instance.
const BboTracking & bboTracking() const noexcept
Returns read-only BBO tracking settings for this book type.
void assignNoControl(const BaseBookManagement &other)
Stores threshold tracking settings for one BBO attribute.
bool enabled() const noexcept
Indicates whether this threshold is active.
~BboThreshold()=default
Finalizes the threshold settings.
BboThreshold(const BboThreshold &other)
Copies threshold settings from another instance.
const SettingGroup & group() const
friend class DirectBboTracking
Lets grouping and value assignment control functioning.
BboThreshold & operator=(const BboThreshold &other)
Copies threshold settings from another instance.
friend class ImpliedBboTracking
Lets grouping and value assignment control functioning.
void assignNoControl(const BboThreshold &other)
friend class MboBboTracking
Lets grouping and value assignment control functioning.
BboThreshold & threshold(const Messaging::Decimal &value)
Updates the relative threshold for the tracked attribute.
BboThreshold(const SettingGroup *group=nullptr)
Initializes disabled tracking for a BBO attribute.
const Messaging::Decimal & threshold() const noexcept
Returns the relative threshold for the tracked attribute.
BboThreshold & enabled(bool value)
Enables or disables this threshold.
Aggregates all book management settings used by the Handler.
BookManagement & updateNotification(BookUpdateNotification::Enum value)
Sets the policy used to raise book update callbacks.
const ConsolidatedBookManagement & consolidatedBooks() const noexcept
Returns read-only management settings for consolidated books.
const DirectBookManagement & directBooks() const noexcept
Returns read-only management settings for direct books.
BookUpdateNotification::Enum updateNotification() const noexcept
Returns the policy used to raise book update callbacks.
DirectBookManagement & directBooks() noexcept
Returns mutable management settings for direct books.
BookManagement(const BookManagement &other)
Copies book management settings from another instance.
ImpliedBookManagement & impliedBooks() noexcept
Returns mutable management settings for implied books.
const ImpliedBookManagement & impliedBooks() const noexcept
Returns read-only management settings for implied books.
~BookManagement()=default
Finalizes the book management settings.
ConsolidatedBookManagement & consolidatedBooks() noexcept
Returns mutable management settings for consolidated books.
BookManagement(SettingChangeController *controller=nullptr)
Initializes book management settings with defaults.
friend class HandlerSettings
const MboBookManagement & mboBooks() const noexcept
Returns read-only management settings for MBO books.
MboBookManagement & mboBooks() noexcept
Returns mutable management settings for MBO books.
BookManagement & operator=(const BookManagement &other)
Copies book management settings from another instance.
Configures BBO threshold tracking for direct books.
friend class BaseBookManagement
bool enabled() const noexcept
Indicates whether any direct-book BBO threshold is enabled.
const BboThreshold & numberOfOrders() const noexcept
Returns read-only order-count tracking settings.
void assignNoControl(const DirectBboTracking &other)
~DirectBboTracking()=default
Finalizes the tracking settings.
DirectBboTracking(const DirectBboTracking &other)
Copies direct-book BBO tracking settings from another instance.
bool exceeded(const DirectPriceLevel &previous, const DirectPriceLevel ¤t) const
Checks whether the configured direct-book thresholds are exceeded.
DirectBboTracking(const SettingGroup *group=nullptr)
Initializes disabled direct-book BBO tracking.
DirectBboTracking & operator=(const DirectBboTracking &other)
Copies direct-book BBO tracking settings from another instance.
BboThreshold & numberOfOrders() noexcept
Returns mutable order-count tracking settings.
Represents one direct book price level.
Messaging::Int32 & numberOfOrders() noexcept
Provides mutable access to the number of orders at the level.
Configures book management for a fixed-depth book type.
MbpBookDepth defaultDepth() const
~FixedDepthBookManagement()=default
Finalizes the fixed-depth book-management settings.
friend class BookManagement
FixedDepthBookManagement(const SettingGroup *group=nullptr, Depth defaultDepth=0)
Initializes fixed-depth book management settings.
FixedDepthBookManagement(const FixedDepthBookManagement &other)
Copies fixed-depth book-management settings from another instance.
FixedDepthBookManagement & defaultDepth(Depth value)
Sets the fallback depth for fixed-depth books.
FixedDepthBookManagement & operator=(const FixedDepthBookManagement &other)
Copies fixed-depth book-management settings from another instance.
Configures BBO threshold tracking for implied books.
ImpliedBboTracking(const ImpliedBboTracking &other)
Copies implied-book BBO tracking settings from another instance.
friend class BaseBookManagement
Lets grouping and value assignment control functioning.
void assignNoControl(const ImpliedBboTracking &other)
bool enabled() const noexcept
Indicates whether any implied-book BBO threshold is enabled.
const BboThreshold & price() const noexcept
Returns read-only price tracking settings.
const SettingGroup & group() const
const BboThreshold & quantity() const noexcept
Returns read-only quantity tracking settings.
bool exceeded(const ImpliedPriceLevel &previous, const ImpliedPriceLevel ¤t) const
Checks whether the configured implied-book thresholds are exceeded.
BboThreshold & price() noexcept
Returns mutable price tracking settings.
~ImpliedBboTracking()=default
Finalizes the tracking settings.
BboThreshold & quantity() noexcept
Returns mutable quantity tracking settings.
ImpliedBboTracking(const SettingGroup *group=nullptr)
Initializes disabled implied-book BBO tracking.
ImpliedBboTracking & operator=(const ImpliedBboTracking &other)
Copies implied-book BBO tracking settings from another instance.
Represents one implied book price level.
constexpr MbpBookQuantity quantity() const noexcept
Gets the aggregate quantity at the price level.
constexpr const Messaging::Decimal & price() const noexcept
Gets the price value.
Configures BBO threshold tracking for MBO books.
friend class BaseBookManagement
Lets grouping and value assignment control functioning.
bool enabled() const noexcept
Indicates whether any MBO BBO threshold is enabled.
const BboThreshold & price() const noexcept
Returns read-only price tracking settings.
void assignNoControl(const MboBboTracking &other)
MboBboTracking & operator=(const MboBboTracking &other)
Copies MBO BBO tracking settings from another instance.
const SettingGroup & group() const
MboBboTracking(const SettingGroup *group=nullptr)
Initializes disabled MBO BBO tracking.
BboThreshold & price() noexcept
Returns mutable price tracking settings.
bool exceeded(const Order &previous, const Order ¤t) const
Checks whether the configured MBO thresholds are exceeded.
~MboBboTracking()=default
Finalizes the tracking settings.
MboBboTracking(const MboBboTracking &other)
Copies MBO BBO tracking settings from another instance.
Represents an order in a Market By Order (MBO) book.
constexpr const Messaging::Decimal & price() const noexcept
Gets the order price.
Associates setting mutations with a change controller.
SettingGroup(SettingChangeController *controller=nullptr)
Creates a setting group that uses the specified controller.
void controlChange(const Messaging::Char *description, void(Changeable::*change)(), Changeable &changeable) const
Invokes a zero-argument member function as a guarded change.
void controlAssignment(const Messaging::Char *description, Assignee &assignee, Value value) const
Assigns a value while coordinating the change with the controller.
std::uint32_t UInt32
uInt32.
FloatingPointDecimal< DecimalMantissa, DecimalExponent > Decimal
Universal decimal type.
FixedDepthBookManagement< ImpliedBboTracking, MbpBookDepth > ImpliedBookManagement
Management and tracking settings for implied books.
BaseBookManagement< ImpliedBboTracking > ConsolidatedBookManagement
Management and tracking settings for consolidated books.
FixedDepthBookManagement< DirectBboTracking, MbpBookDepth > DirectBookManagement
Management and tracking settings for direct books.
bool thresholdExceeded(const Messaging::Decimal &threshold, const Messaging::Decimal &previous, const Messaging::Decimal ¤t)
Checks whether a decimal value change exceeds a relative threshold.
AnyDepthBookManagement< MboBboTracking, SortedOrders::size_type > MboBookManagement
Management and tracking settings for MBO books.
void throwBadBboThreshold()
Throws the exception used for invalid BBO threshold values.
void toStr(std::string &str, BookState::Enum bookState)
Appends a string representation of a book state.
Defines when incremental book update callbacks are raised.
Enum
Available book update notification policies.
@ OnEndOfEvent
Raises book update callbacks at the end of a market event.
@ OnSecurityChange
Raises book update callbacks when the processed security changes.
Messaging::UInt32 Base
Integral type used to store notification values.
Coordinates changes to settings that belong to a setting group.