OnixS C++ CME MDP Conflated UDP Handler 1.1.2
API documentation
Loading...
Searching...
No Matches
FeedEngine.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
26
28
32
37{
38public:
41 typedef UInt32 Flags;
42
45 : eventsDispatched_(0)
46 , ioWaited_(0)
47 , reserved_(0)
48 {
49 }
50
53 bool
55 {
56 return
57 0 !=
58 eventsDispatched_;
59 }
60
63 void
64 eventsDispatched(bool state)
65 {
66 eventsDispatched_ =
67 state
68 ? 1
69 : 0;
70 }
71
74 bool
75 ioWaited() const
76 {
77 return
78 0 !=
79 ioWaited_;
80 }
81
84 void
86 bool state)
87 {
88 ioWaited_ =
89 state
90 ? 1
91 : 0;
92 }
93
95 Flags
96 reserved() const
97 {
98 return reserved_;
99 }
100
102 void
104 Flags flags)
105 {
106 reserved_ = flags;
107 }
108
109private:
110 Flags eventsDispatched_ : 1;
111 Flags ioWaited_ : 1;
112 Flags reserved_ : 30;
113};
114
121{
122 NetFeedEngine(
123 const NetFeedEngine&);
124
125 NetFeedEngine&
126 operator =(
127 const NetFeedEngine&);
128
129protected:
132 {
133 }
134
135public:
138 {
139 }
140
143 virtual
144 void
146 std::string&) = 0;
147
152 virtual
155 const NetFeed&) = 0;
156
160 virtual
162 watch() = 0;
163
171 virtual
173 process() = 0;
174};
175
181inline
182bool
184 NetFeedEngine& engine)
185{
186 return
187 engine.
188 process().
189 eventsDispatched();
190}
191
#define ONIXS_CONFLATEDUDP_EXPORTED_CLASS
Definition Bootstrap.h:55
#define ONIXS_CONFLATEDUDP_LTWT_CLASS
Definition Bootstrap.h:95
#define ONIXS_CONFLATEDUDP_EXPORTED_CLASS_DECL(typeName)
Definition Bootstrap.h:47
#define ONIXS_CONFLATEDUDP_NAMESPACE_END
Definition Bootstrap.h:157
#define ONIXS_CONFLATEDUDP_EXPORTED_STRUCT_DECL(typeName)
Definition Bootstrap.h:51
#define ONIXS_CONFLATEDUDP_LTWT_CLASS_DECL(name)
Definition Bootstrap.h:107
#define ONIXS_CONFLATEDUDP_NAMESPACE_BEGIN
Definition Bootstrap.h:153
Flags reserved() const
Reserved (unused) flags.
Definition FeedEngine.h:96
NetFeedEngineProcessResult()
Initializes zero-state instance.
Definition FeedEngine.h:44
void reserved(Flags flags)
Reserved (unused) flags.
Definition FeedEngine.h:103
virtual void info(std::string &)=0
virtual NetFeedLink & allocate(const NetFeed &)=0
virtual NetFeedEngineProcessResult process()=0
NetFeedEngine()
Construction through the descendants.
Definition FeedEngine.h:131
virtual ~NetFeedEngine()
Finalizes the instance.
Definition FeedEngine.h:137
virtual WatchService & watch()=0
Base attributes of market data feed.
Definition Feed.h:61
UInt32 UInt32
uInt32.
Definition Fields.h:261
bool process(NetFeedEngine &engine)
Definition FeedEngine.h:183
Abstract watch service.
Definition Watch.h:30