OnixS C++ CME MDP Streamlined Market Data Handler  1.2.0
API Documentation
NetFeedAttributes.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 
24 
26 
27 /// Feed types based on type of market data service.
29 {
30  /// Integral base type of enumeration.
31  typedef Char Base;
32 
33  /// Feed types based on type of market data service.
34  enum Enum
35  {
36  /// TCP Replay.
38 
39  /// Incremental/real-time.
41  };
42 };
43 
44 /// Appends string presentation of feed service type.
46 void
47 toStr(
48  std::string&,
50 
51 /// Returns string presentation of feed service type.
52 inline
53 std::string
55  NetFeedType::Enum type)
56 {
57  std::string str;
58 
59  toStr(str, type);
60 
61  return str;
62 }
63 
64 /// Feed roles (primary, secondary).
66 {
67  /// Integral base type of enumeration.
68  typedef Char Base;
69 
70  /// List of known feed roles.
71  enum Enum
72  {
73  /// Identifies primary feed (A).
74  A = 'A',
75 
76  /// Identifies secondary feed (B).
77  B = 'B'
78  };
79 };
80 
81 /// Appends string presentation of feed role.
82 inline
83 void
85  std::string& str,
86  NetFeedRole::Enum role)
87 {
88  str.append(
89  1,
90  static_cast<char>(role));
91 }
92 
93 /// Returns string presentation of feed role.
94 inline
95 std::string
97  NetFeedRole::Enum role)
98 {
99  return
100  std::string(
101  1,
102  static_cast<char>(role)
103  );
104 }
105 
Char Base
Integral base type of enumeration.
Enum
Feed types based on type of market data service.
std::string toStr(NetFeedRole::Enum role)
Returns string presentation of feed role.
#define ONIXS_CMESTREAMLINEDMDH_NAMESPACE_END
Definition: Bootstrap.h:173
#define ONIXS_CMESTREAMLINEDMDH_EXPORTED
Definition: Compiler.h:160
char Char
Character type alias.
Definition: String.h:36
Feed types based on type of market data service.
Char Base
Integral base type of enumeration.
Feed roles (primary, secondary).
#define ONIXS_CMESTREAMLINEDMDH_LTWT_STRUCT
Definition: Bootstrap.h:115
#define ONIXS_CMESTREAMLINEDMDH_NAMESPACE_BEGIN
Definition: Bootstrap.h:169