OnixS C++ CME MDP Streamlined Market Data Handler 1.2.0
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{
31public:
37 SecurityId id() const
38 {
39 return id_;
40 }
41
43 StrRef symbol() const
44 {
45 return toStrRef(symbol_);
46 }
47
49 void symbol(const StrRef& symbol)
50 {
51 symbol_.
52 assign(
53 symbol.items(),
54 symbol.size());
55 }
56
62 StrRef group() const
63 {
64 return toStrRef(group_);
65 }
66
68 void group(const StrRef& group)
69 {
70 group_.
71 assign(
72 group.items(),
73 group.size());
74 }
75
78 StrRef asset() const
79 {
80 return toStrRef(asset_);
81 }
82
84 void asset(const StrRef& asset)
85 {
86 asset_.
87 assign(
88 asset.items(),
89 asset.size());
90 }
91
94 {
95 return seqNumber_;
96 }
97
98protected:
101 SecurityId id)
102 : id_(id)
103 , seqNumber_(0)
104 {
105 }
106
109 {
110 }
111
113 void
116 {
117 seqNumber_ = seqNumber;
118 }
119
120private:
121 const SecurityId id_;
122
123 UInt32 seqNumber_;
124
125 std::string symbol_;
126 std::string group_;
127 std::string asset_;
128
129 Security(
130 const Security&);
131
132 Security&
133 operator =(
134 const Security&);
135};
136
139void
141 std::string&,
142 const Security&);
143
145inline
146std::string
148 const Security& security)
149{
150 std::string str;
151
152 brief(str, security);
153
154 return str;
155}
156
159void
161 std::string&,
162 const Security&);
163
165inline
166std::string
168 const Security& security)
169{
170 std::string str;
171
172 toStr(str, security);
173
174 return str;
175}
176
#define ONIXS_CMESTREAMLINEDMDH_NAMESPACE_BEGIN
Definition Bootstrap.h:169
#define ONIXS_CMESTREAMLINEDMDH_NAMESPACE_END
Definition Bootstrap.h:173
#define ONIXS_CMESTREAMLINEDMDH_LTWT_CLASS
Definition Bootstrap.h:111
#define ONIXS_CMESTREAMLINEDMDH_EXPORTED
Definition Compiler.h:160
Attributes associated with security.
Definition Security.h:30
UInt32 seqNumber() const
Security-level sequence number.
Definition Security.h:93
void symbol(const StrRef &symbol)
Updates security name or symbol.
Definition Security.h:49
void group(const StrRef &group)
Assigns security group code.
Definition Security.h:68
StrRef asset() const
String field that indicates the underlying asset code (Product Code).
Definition Security.h:78
void seqNumber(UInt32 seqNumber)
Updates sequence number.
Definition Security.h:114
SecurityId id() const
Unique security identifier.
Definition Security.h:37
StrRef group() const
Security group code.
Definition Security.h:62
Security(SecurityId id)
Initializes instance.
Definition Security.h:100
void asset(const StrRef &asset)
Updates asset code.
Definition Security.h:84
~Security()
Cleans everything up.
Definition Security.h:108
StrRef symbol() const
Security name or symbol.
Definition Security.h:43
Provides efficient way of accessing text-based FIX field values.
Definition String.h:40
UInt64 SecurityId
Unique security identifier.
Definition Domain.h:31
StrRef toStrRef(const std::string &str)
Constructs StrRef instance over std::string content.
Definition String.h:166
void toStr(std::string &str, const Decimal &number)
Definition Decimal.h:502
void brief(std::string &, const Security &)
Security brief info.