OnixS C++ CME MDP Premium Market Data Handler 5.9.0
Users' manual and 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
36{
37public:
40 typedef UInt32 Flags;
41
44 : eventsDispatched_(0)
45 , ioWaited_(0)
46 , reserved_(0)
47 {
48 }
49
52 bool eventsDispatched() const
53 {
54 return 0 != eventsDispatched_;
55 }
56
59 void eventsDispatched(bool state)
60 {
61 eventsDispatched_ = state ? 1 : 0;
62 }
63
66 bool ioWaited() const
67 {
68 return 0 != ioWaited_;
69 }
70
73 void ioWaited(bool state)
74 {
75 ioWaited_ = state ? 1 : 0;
76 }
77
80 {
81 return reserved_;
82 }
83
85 void reserved(Flags flags)
86 {
87 reserved_ = flags;
88 }
89
90private:
91 Flags eventsDispatched_ : 1;
92 Flags ioWaited_ : 1;
93 Flags reserved_ : 30;
94};
95
102{
103public:
105 virtual ~NetFeedEngine() {}
106
109 virtual void info(std::string&) = 0;
110
115 virtual NetFeedLink& allocate(const NetFeed&) = 0;
116
120 virtual WatchService& watch() = 0;
121
130
131protected:
134
135private:
137
138 NetFeedEngine& operator=(const NetFeedEngine&);
139};
140
146inline bool process(NetFeedEngine& engine)
147{
148 return engine.process().eventsDispatched();
149}
150
#define ONIXS_CMEMDH_NAMESPACE_BEGIN
Definition Bootstrap.h:67
#define ONIXS_CMEMDH_LTWT
Definition Bootstrap.h:46
#define ONIXS_CMEMDH_LTWT_CLASS_DECL(name)
Definition Bootstrap.h:48
#define ONIXS_CMEMDH_EXPORTED_CLASS_DECL(typeName)
Definition Bootstrap.h:35
#define ONIXS_CMEMDH_NAMESPACE_END
Definition Bootstrap.h:68
#define ONIXS_CMEMDH_EXPORTED_STRUCT_DECL(typeName)
Definition Bootstrap.h:36
#define ONIXS_CMEMDH_EXPORTED
Definition Compiler.h:171
Flags reserved() const
Reserved (unused) flags.
Definition FeedEngine.h:79
NetFeedEngineProcessResult()
Initializes zero-state instance.
Definition FeedEngine.h:43
void reserved(Flags flags)
Reserved (unused) flags.
Definition FeedEngine.h:85
virtual void info(std::string &)=0
virtual NetFeedLink & allocate(const NetFeed &)=0
virtual NetFeedEngineProcessResult process()=0
NetFeedEngine()
Construction through the descendants.
Definition FeedEngine.h:133
virtual ~NetFeedEngine()
Finalizes the instance.
Definition FeedEngine.h:105
virtual WatchService & watch()=0
Base attributes of market data feed.
Definition Feed.h:55
UInt32 UInt32
uInt32.
Definition Fields.h:202
bool process(NetFeedEngine &engine)
Definition FeedEngine.h:146
Abstract watch service.
Definition Watch.h:30