OnixS C++ CME MDP Premium Market Data Handler 5.11.1
Users' manual and API documentation
Loading...
Searching...
No Matches
DirectPriceLevel.h
Go to the documentation of this file.
1// Copyright Onix Solutions Limited [OnixS]. All rights reserved.
2//
3// This software owned by Onix Solutions Limited [OnixS] and is
4// protected by copyright law and international copyright treaties.
5//
6// Access to and use of the software is governed by the terms of the applicable
7// OnixS Software Services Agreement (the Agreement) and Customer end user license
8// agreements granting a non-assignable, non-transferable and non-exclusive license
9// to use the software for it's own data processing purposes under the terms defined
10// in the Agreement.
11//
12// Except as otherwise granted within the terms of the Agreement, copying or
13// reproduction of any part of this source code or associated reference material
14// to any other location for further reproduction or redistribution, and any
15// amendments to this copyright notice, are expressly prohibited.
16//
17// Any reproduction or redistribution for sale or hiring of the Software not in
18// accordance with the terms of the Agreement is a violation of copyright law.
19//
20
21#pragma once
22
24
26
32{
33public:
35 constexpr DirectPriceLevel() noexcept = default;
36
39 constexpr DirectPriceLevel(const DirectPriceLevel& other) noexcept = default;
40
43 constexpr DirectPriceLevel(DirectPriceLevel&& other) noexcept = default;
44
49 constexpr DirectPriceLevel(const Messaging::Decimal& price, Messaging::Int32 qty, Messaging::Int32 ordersQty) noexcept
51 , ordersQty_(ordersQty)
52 {
53 }
54
56 ~DirectPriceLevel() = default;
57
65 {
66 return ordersQty_;
67 }
68
75 constexpr Messaging::Int32 numberOfOrders() const noexcept
76 {
77 return ordersQty_;
78 }
79
83 DirectPriceLevel& operator=(const DirectPriceLevel& other) noexcept = default;
84
88 DirectPriceLevel& operator=(DirectPriceLevel&& other) noexcept = default;
89
90private:
91 // Number of orders.
92 Messaging::Int32 ordersQty_{0};
93};
94
99void toStr(std::string& str, const DirectPriceLevel& priceLevel);
100
104inline ONIXS_CMEMDH_NODISCARD std::string toStr(const DirectPriceLevel& priceLevel)
105{
106 std::string str;
107
108 toStr(str, priceLevel);
109
110 return str;
111}
112
#define ONIXS_CMEMDH_NAMESPACE_BEGIN
Definition Bootstrap.h:69
#define ONIXS_CMEMDH_LTWT
Definition Bootstrap.h:61
#define ONIXS_CMEMDH_NAMESPACE_END
Definition Bootstrap.h:73
#define ONIXS_CMEMDH_EXPORTED
Definition Compiler.h:163
#define ONIXS_CMEMDH_NODISCARD
Definition Compiler.h:165
Represents one direct book price level.
DirectPriceLevel & operator=(DirectPriceLevel &&other) noexcept=default
Replaces this price level by moving another instance.
constexpr Messaging::Int32 numberOfOrders() const noexcept
Gets the number of orders at the level.
constexpr DirectPriceLevel() noexcept=default
Constructs an absent price level.
Messaging::Int32 & numberOfOrders() noexcept
Provides mutable access to the number of orders at the level.
~DirectPriceLevel()=default
Destroys the price level.
DirectPriceLevel & operator=(const DirectPriceLevel &other) noexcept=default
Replaces this price level with a copy of another instance.
constexpr const Messaging::Decimal & price() const noexcept
Gets the price value.
constexpr ImpliedPriceLevel() noexcept=default
Constructs an absent price level.
std::int32_t Int32
int32.
Definition Integral.h:34
void toStr(std::string &str, BookState::Enum bookState)
Appends a string representation of a book state.