OnixS BME SENAF Handler C++ library  2.2.0
API documentation
MarketImageRecovery.h
Go to the documentation of this file.
1 /*
2  * Copyright Onix Solutions Limited [OnixS]. All rights reserved.
3  *
4  * This software owned by Onix Solutions Limited [OnixS] and is protected by copyright law
5  * and international copyright treaties.
6  *
7  * Access to and use of the software is governed by the terms of the applicable ONIXS Software
8  * Services Agreement (the Agreement) and Customer end user license agreements granting
9  * a non-assignable, non-transferable and non-exclusive license to use the software
10  * for it's own data processing purposes under the terms defined in the Agreement.
11  *
12  * Except as otherwise granted within the terms of the Agreement, copying or reproduction of any part
13  * of this source code or associated reference material to any other location for further reproduction
14  * or redistribution, and any amendments to this copyright notice, are expressly prohibited.
15  *
16  * Any reproduction or redistribution for sale or hiring of the Software not in accordance with
17  * the terms of the Agreement is a violation of copyright law.
18  */
19 
20 #pragma once
21 
22 #include <OnixS/Senaf/MarketData/Export.h>
25 
26 #include <iosfwd>
27 #include <string>
28 #include <vector>
29 
30 namespace OnixS { namespace Senaf { namespace MarketData {
31 
32 /// Market Image Recovery.
33 struct ONIXS_BME_SENAF_EXPORT MarketImageRecovery
34 {
35  /// Message code.
36  enum { code = 12 };
37 
38  /// Default constructor.
40 
41  /// Market.
42  unsigned char market;
43 
44  /// Instrument Type.
46 
47  /// Position.
48  struct Position
49  {
50  /// Constructor.
51  Position();
52 
53  /// Liquidity Provision Activity.
55 
56  /// Broker.
57  unsigned char broker;
58 
59  /// Member.
60  unsigned char member;
61 
62  /// User.
63  unsigned char user;
64 
65  /// Label.
66  unsigned int label;
67 
68  /// Volume.
69  unsigned int volume;
70 
71  /// Position Number.
72  unsigned int positionNumber;
73 
74  /// Investment Decision.
75  unsigned int investmentDecision;
76 
77  /// Execution.
78  unsigned int execution;
79 
80  /// Publication time.
82 
83  /// Returns string representation.
84  std::string toString() const;
85  };
86 
87  /// Alias for collection of Position.
88  typedef std::vector<Position> Positions;
89 
90  /// Price Level.
91  struct PriceLevel
92  {
93  /// Constructor.
94  PriceLevel();
95 
96  /// Level.
97  unsigned char level;
98 
99  /// Side.
101 
102  /// Price.
103  int price;
104 
105  /// Yield / Rate.
106  int yield;
107 
108  /// Collection of Positions.
109  Positions positions;
110 
111  /// Returns string representation.
112  std::string toString() const;
113  };
114 
115  /// Alias for collection of PriceLevel.
116  typedef std::vector<PriceLevel> PriceLevels;
117 
118  /// Reference.
119  struct Reference
120  {
121  /// Constructor.
122  Reference();
123 
124  /// Reference.
125  unsigned short reference;
126 
127  /// Collection of PriceLevels.
128  PriceLevels priceLevels;
129 
130  /// Returns string representation.
131  std::string toString() const;
132  };
133 
134  /// Alias for collection of References.
135  typedef std::vector<Reference> References;
136 
137  /// Collection of References.
138  References references;
139 
140  /// Returns string representation.
141  std::string toString() const;
142 
143 private:
144  friend class MessageDeserializer;
145  MarketImageRecovery(const char* data, size_t dataSize);
146  void deserialize(const char* data, size_t dataSize);
147  void reset();
148 };
149 
150 /// Make it printable using C++ I/O streams.
151 ONIXS_BME_SENAF_EXPORT std::ostream& operator<<(std::ostream&, const MarketImageRecovery&);
152 
153 }}}
InstrumentType::Enum instrumentType
Instrument Type.
std::vector< Position > Positions
Alias for collection of Position.
std::vector< PriceLevel > PriceLevels
Alias for collection of PriceLevel.
std::ostream & operator<<(std::ostream &, const Error &)
Make it printable to formatted C++ I/O streams.
References references
Collection of References.
std::vector< Reference > References
Alias for collection of References.
bool liquidityProvisionActivity
Liquidity Provision Activity.