OnixS C++ CME MDP Conflated UDP Handler  1.1.2
API documentation
Accessors.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 
28 
31 
33 
34 /// Raises exception explaining field value conversion failure.
35 ONIXS_CONFLATEDUDP_EXPORTED
36 void
38 (
39  const Char* field,
40  const Char* target
41 );
42 
43 /// Extracts security id from the given tag-value container.
44 ///
45 /// Throws an exception if security identifier is not a number.
46 inline
49  const MultiContainer& message)
50 {
52 
53  if (!value(
54  securityId,
55  message,
57  {
59  (
60  "SecurityID(48)",
61  "number"
62  );
63  }
64 
65  return securityId;
66 }
67 
68 /// Retrieves security group field value assuming
69 /// the given message represents a security definition.
70 ///
71 /// Returns an empty ref if the field is absent.
72 inline
73 StrRef
75  const MultiContainer& message)
76 {
77  return
79  (
80  message,
82  );
83 }
84 
85 /// Retrieves symbol field value assuming the
86 /// given message represents a security definition.
87 ///
88 /// Returns an empty ref if the field is absent.
89 inline
90 StrRef
92  const
93  MultiContainer& message)
94 {
95  return
97  (
98  message,
100  );
101 }
102 
103 /// Retrieves asset field value assuming the
104 /// given message represents a security definition.
105 ///
106 /// Returns an empty ref if the field is absent.
107 inline
108 StrRef
110  const
111  MultiContainer& message)
112 {
113  return
115  (
116  message,
118  );
119 }
120 
121 /// Retrieves security update action field value assuming
122 /// the given container represents a security definition.
123 ONIXS_CONFLATEDUDP_EXPORTED
126  const MultiContainer&);
127 
128 /// Retrieves depths of direct books assuming
129 /// the given message represents a security definition.
130 ONIXS_CONFLATEDUDP_EXPORTED
131 void
132 bookDepths(
133  const MultiContainer&,
134  MbpBookDepth&);
135 
136 /// Retrieves match event indicator bits.
137 ///
138 /// Returns an empty bitset if indicator is absent.
139 ONIXS_CONFLATEDUDP_EXPORTED
142  const MultiContainer&);
143 
144 /// Retrieves last update time field value.
145 ONIXS_CONFLATEDUDP_EXPORTED
146 Timestamp
147 timestamp(
148  const MultiContainer&,
149  Tag);
150 
StrRef symbol(const MultiContainer &message)
Definition: Accessors.h:91
ONIXS_CONFLATEDUDP_EXPORTED SecurityUpdateAction::Enum securityUpdateAction(const MultiContainer &)
Int32 SecurityId
Unique security identifier.
Definition: Domain.h:31
UInt8 MbpBookDepth
Market by price order book depth type.
Definition: MbpBookTraits.h:28
Represents time point without time-zone information.
Definition: Time.h:471
MultiContainer::Value valueOrDefault(const MultiContainer &container, Tag tag, const MultiContainer::Value &defaultValue=MultiContainer::Value())
ONIXS_CONFLATEDUDP_EXPORTED void bookDepths(const MultiContainer &, MbpBookDepth &)
char Char
Character type alias.
Definition: String.h:36
#define ONIXS_CONFLATEDUDPFIX_NAMESPACE_END
Definition: Bootstrap.h:165
ONIXS_CONFLATEDUDP_EXPORTED void throwFieldConversionFailure(const Char *field, const Char *target)
Raises exception explaining field value conversion failure.
StrRef asset(const MultiContainer &message)
Definition: Accessors.h:109
ONIXS_CONFLATEDUDP_EXPORTED MatchEventIndicator matchEventIndicator(const MultiContainer &)
StrRef securityGroup(const MultiContainer &message)
Definition: Accessors.h:74
ONIXS_CONFLATEDUDP_EXPORTED Timestamp timestamp(const MultiContainer &, Tag)
Retrieves last update time field value.
MatchEventIndicator type.
Definition: Fields.h:992
SecurityId securityId(const MultiContainer &message)
Definition: Accessors.h:48
bool value(Number &number, const MultiContainer &container, Tag tag)
#define ONIXS_CONFLATEDUDPFIX_NAMESPACE_BEGIN
Definition: Bootstrap.h:161