OnixS C++ CME MDP Conflated UDP Handler 1.1.2
API documentation
Loading...
Searching...
No Matches
Security.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
25
27
30{
31 const SecurityId id_;
32
33 UInt32 seqNumber_;
34
35 std::string symbol_;
36 std::string group_;
37 std::string asset_;
38
39 Security(
40 const Security&);
41
42 Security&
43 operator =(
44 const Security&);
45
46protected:
49 SecurityId id)
50 : id_(id)
51 , seqNumber_(0)
52 {
53 }
54
57 {
58 }
59
61 void
64 {
65 seqNumber_ = seqNumber;
66 }
67
68public:
74 SecurityId id() const
75 {
76 return id_;
77 }
78
80 StrRef symbol() const
81 {
82 return toStrRef(symbol_);
83 }
84
86 void symbol(const StrRef& symbol)
87 {
88 symbol_.
89 assign(
90 symbol.items(),
91 symbol.size());
92 }
93
99 StrRef group() const
100 {
101 return toStrRef(group_);
102 }
103
105 void group(const StrRef& group)
106 {
107 group_.
108 assign(
109 group.items(),
110 group.size());
111 }
112
115 StrRef asset() const
116 {
117 return toStrRef(asset_);
118 }
119
121 void asset(const StrRef& asset)
122 {
123 asset_.
124 assign(
125 asset.items(),
126 asset.size());
127 }
128
131 {
132 return seqNumber_;
133 }
134};
135
137ONIXS_CONFLATEDUDP_EXPORTED
138void
140 std::string&,
141 const Security&);
142
144inline
145std::string
147 const Security& security)
148{
149 std::string str;
150
151 brief(str, security);
152
153 return str;
154}
155
157ONIXS_CONFLATEDUDP_EXPORTED
158void
160 std::string&,
161 const Security&);
162
164inline
165std::string
167 const Security& security)
168{
169 std::string str;
170
171 toStr(str, security);
172
173 return str;
174}
175
#define ONIXS_CONFLATEDUDP_LTWT_CLASS
Definition Bootstrap.h:95
#define ONIXS_CONFLATEDUDP_NAMESPACE_END
Definition Bootstrap.h:157
#define ONIXS_CONFLATEDUDP_NAMESPACE_BEGIN
Definition Bootstrap.h:153
Attributes associated with security.
Definition Security.h:30
UInt32 seqNumber() const
Security-level sequence number.
Definition Security.h:130
void symbol(const StrRef &symbol)
Updates security name or symbol.
Definition Security.h:86
void group(const StrRef &group)
Assigns security group code.
Definition Security.h:105
void seqNumber(UInt32 seqNumber)
Updates sequence number.
Definition Security.h:62
Security(SecurityId id)
Initializes instance.
Definition Security.h:48
void asset(const StrRef &asset)
Updates asset code.
Definition Security.h:121
~Security()
Cleans everything up.
Definition Security.h:56
StrRef symbol() const
Security name or symbol.
Definition Security.h:80
ONIXS_CONFLATEDUDP_EXPORTED void brief(std::string &, const DirectBook &)
Book brief info.
ONIXS_CONFLATEDUDP_EXPORTED void toStr(std::string &, BookState::Enum)
Serializes book state value into a string.
UInt32 UInt32
uInt32.
Definition Fields.h:261
StrRef toStrRef(const std::string &str)
Constructs StrRef instance over std::string content.
Definition String.h:174
Int32 SecurityId
Unique security identifier.
Definition Domain.h:31