OnixS C++ CME MDP Premium Market Data Handler 5.9.0
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
29{
30public:
33 : ordersQty_(0)
34 {
35 }
36
39 : ImpliedPriceLevel(static_cast<const ImpliedPriceLevel&>(other))
40 , ordersQty_(other.ordersQty_)
41 {
42 }
43
46 DirectPriceLevel(const Decimal& price, Int32 qty, Int32 ordersQty)
48 , ordersQty_(ordersQty)
49 {
50 }
51
52 // Actually, does nothing.
54
57 {
58 return ordersQty_;
59 }
60
63 {
64 return ordersQty_;
65 }
66
69 {
70 *static_cast<ImpliedPriceLevel*>(this) = static_cast<const ImpliedPriceLevel&>(other);
71
72 ordersQty_ = other.ordersQty_;
73
74 return *this;
75 }
76
77private:
78 // Number of orders.
79 Int32 ordersQty_;
80};
81
84void toStr(std::string&, const DirectPriceLevel&);
85
87inline std::string toStr(const DirectPriceLevel& priceLevel)
88{
89 std::string str;
90
91 toStr(str, priceLevel);
92
93 return str;
94}
95
#define ONIXS_CMEMDH_NAMESPACE_BEGIN
Definition Bootstrap.h:67
#define ONIXS_CMEMDH_LTWT
Definition Bootstrap.h:46
#define ONIXS_CMEMDH_NAMESPACE_END
Definition Bootstrap.h:68
#define ONIXS_CMEMDH_EXPORTED
Definition Compiler.h:171
A real number with floating exponent.
Definition Decimal.h:137
Encapsulates price level concept.
DirectPriceLevel & operator=(const DirectPriceLevel &other)
Re-initializes as copy of other instance.
DirectPriceLevel(const Decimal &price, Int32 qty, Int32 ordersQty)
Initializes defined level according to specified attributes.
DirectPriceLevel(const DirectPriceLevel &other)
Initializes as copy of other level.
Int32 numberOfOrders() const
Total number of orders of given price.
DirectPriceLevel()
Initializes undefined level.
Int32 & numberOfOrders()
Updates total number of orders.
ImpliedPriceLevel()
Initializes undefined level.
const Decimal & price() const
Price value.
Int32 Int32
int32.
Definition Fields.h:60
void toStr(std::string &, BookState::Enum)
Serializes book state value into a string.