OnixS C++ CME MDP Premium Market Data Handler 5.9.0
Users' manual and API documentation
Loading...
Searching...
No Matches
FeedConnection.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
23#include <string>
24#include <vector>
25
27
29
31typedef std::vector<std::string> NifList;
32
36void fromStr(NifList&, const std::string&, const std::string& = std::string("; ,"));
37
40{
41public:
44 : port_(0)
45 , address_()
46 , nifs_()
47 {
48 }
49
52 NetFeedConnection(const std::string& address, UInt32 port)
53 : port_(port)
54 , address_(address)
55 , nifs_()
56 {
57 }
58
61
63 UInt32 port() const
64 {
65 return port_;
66 }
67
70 {
71 port_ = port;
72 }
73
75 const std::string& address() const
76 {
77 return address_;
78 }
79
81 void address(const std::string& address)
82 {
83 address_ = address;
84 }
85
90 {
91 return nifs_;
92 }
93
97 const NifList& nifs() const
98 {
99 return nifs_;
100 }
101
102private:
103 UInt32 port_;
104
105 std::string address_;
106
107 NifList nifs_;
108};
109
112void toStr(std::string&, const NetFeedConnection&);
113
115inline std::string toStr(const NetFeedConnection& connection)
116{
117 std::string str;
118
119 toStr(str, connection);
120
121 return str;
122}
123
130
#define ONIXS_CMEMDH_NAMESPACE_BEGIN
Definition Bootstrap.h:67
#define ONIXS_CMEMDH_LTWT
Definition Bootstrap.h:46
#define ONIXS_CMEMDH_NAMESPACE_END
Definition Bootstrap.h:68
#define ONIXS_CMEMDH_EXPORTED
Definition Compiler.h:171
Network feed connection attributes.
const std::string & address() const
Identifies connection address.
NetFeedConnection()
Initializes blank instance.
NetFeedConnection(const std::string &address, UInt32 port)
~NetFeedConnection()
Cleans everything up.
void address(const std::string &address)
Updates connection address.
UInt32 port() const
Identifies connection port.
void port(UInt32 port)
Updates connection port.
std::vector< std::string > NifList
List of network interfaces.
bool fromStr(Decimal &, const Char *, size_t)
void toStr(std::string &, BookState::Enum)
Serializes book state value into a string.
UInt32 UInt32
uInt32.
Definition Fields.h:202
Establishes the order between two connections.
bool operator()(const NetFeedConnection &, const NetFeedConnection &) const
Establishes the order between two connections.