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