9 #ifndef CPPTRADER_MATCHING_LEVEL_H
10 #define CPPTRADER_MATCHING_LEVEL_H
15 #include "containers/bintree_avl.h"
27 template <
class TOutputStream>
55 friend
bool operator==(const
Level& level1, const
Level& level2) noexcept
56 {
return level1.
Price == level2.Price; }
58 {
return level1.Price != level2.Price; }
60 {
return level1.Price < level2.Price; }
62 {
return level1.Price > level2.Price; }
64 {
return level1.Price <= level2.Price; }
66 {
return level1.Price >= level2.Price; }
68 template <
class TOutputStream>
69 friend TOutputStream&
operator<<(TOutputStream& stream,
const Level& level);
78 struct LevelNode :
public Level,
public CppCommon::BinTreeAVL<LevelNode>::Node
95 {
return level1.
Price == level2.Price; }
97 {
return level1.Price != level2.Price; }
99 {
return level1.Price < level2.Price; }
101 {
return level1.Price > level2.Price; }
103 {
return level1.Price <= level2.Price; }
105 {
return level1.Price >= level2.Price; }
126 template <class TOutputStream>
127 friend TOutputStream& operator<<(TOutputStream& stream, const
LevelUpdate& update);
LevelType
Price level type.
TOutputStream & operator<<(TOutputStream &stream, ErrorCode error)
C++ Trader project definitions.
bool IsBid() const noexcept
Is the bid price level?
friend bool operator!=(const Level &level1, const Level &level2) noexcept
size_t Orders
Level orders.
friend bool operator<=(const Level &level1, const Level &level2) noexcept
friend bool operator>(const Level &level1, const Level &level2) noexcept
uint64_t TotalVolume
Level volume.
Level(const Level &) noexcept=default
Level(Level &&) noexcept=default
LevelType Type
Level type.
Level(LevelType type, uint64_t price) noexcept
uint64_t HiddenVolume
Level hidden volume.
friend TOutputStream & operator<<(TOutputStream &stream, const Level &level)
uint64_t Price
Level price.
friend bool operator>=(const Level &level1, const Level &level2) noexcept
uint64_t VisibleVolume
Level visible volume.
friend bool operator<(const Level &level1, const Level &level2) noexcept
bool IsAsk() const noexcept
Is the ask price level?
friend bool operator<=(const LevelNode &level1, const LevelNode &level2) noexcept
friend bool operator<(const LevelNode &level1, const LevelNode &level2) noexcept
CppCommon::List< OrderNode > OrderList
Price level orders.
friend bool operator>=(const LevelNode &level1, const LevelNode &level2) noexcept
friend bool operator!=(const LevelNode &level1, const LevelNode &level2) noexcept
friend bool operator>(const LevelNode &level1, const LevelNode &level2) noexcept
LevelNode(LevelNode &&) noexcept=default
LevelNode(LevelType type, uint64_t price) noexcept
LevelNode(const LevelNode &) noexcept=default
Level Update
Level update value.
LevelUpdate(LevelUpdate &&) noexcept=default
bool Top
Top of the book flag.
LevelUpdate(const LevelUpdate &) noexcept=default
LevelUpdate(UpdateType type, const Level &update, bool top) noexcept
UpdateType Type
Update type.