OnixS C++ SGX Titan ITCH Market Data Handler  1.2.2
API documentation
FeedEngineImpl.h
Go to the documentation of this file.
1 #pragma once
2 
3 /*
4 * Copyright Onix Solutions Limited [OnixS]. All rights reserved.
5 *
6 * This software owned by Onix Solutions Limited [OnixS] and is protected by copyright law
7 * and international copyright treaties.
8 *
9 * Access to and use of the software is governed by the terms of the applicable ONIXS Software
10 * Services Agreement (the Agreement) and Customer end user license agreements granting
11 * a non-assignable, non-transferable and non-exclusive license to use the software
12 * for it's own data processing purposes under the terms defined in the Agreement.
13 *
14 * Except as otherwise granted within the terms of the Agreement, copying or reproduction of any part
15 * of this source code or associated reference material to any other location for further reproduction
16 * or redistribution, and any amendments to this copyright notice, are expressly prohibited.
17 *
18 * Any reproduction or redistribution for sale or hiring of the Software not in accordance with
19 * the terms of the Agreement is a violation of copyright law.
20 */
21 #include <OnixS/HandlerCore/FeedEngine/MultithreadedFeedEngine.h>
22 
25 
26 #include "NamespaceHelper.h"
27 
28 ONIXS_HANDLER_NAMESPACE_BEGIN
29 
30 class FeedEngineImpl : HandlerCore::MarketData::FE::FeedEngineListener
31 {
32 public:
33  /// Initialize new instance.
34  FeedEngineImpl(const FeedEngineSettings & settings, HANDLER_NAMESPACE::FeedEngineListener* listener, HANDLER_NAMESPACE::FeedEngine* publicFeedEngine);
35 
36  /// Finalize instance.
37  virtual ~FeedEngineImpl();
38 
39  void start();
40 
42  {
43  return settings_;
44  }
45 
46  static HandlerCore::MarketData::FE::MultithreadedFeedEngine* getFeedEngine(FeedEngine& feedEngine)
47  {
48  return feedEngine.impl_->feedEngine_.get();
49  }
50 
51 private:
52  virtual void onFeedEngineThreadBegin();
53 
54  virtual void onFeedEngineThreadEnd();
55 
56  virtual void onFeedEngineThreadIdle(HandlerCore::MarketData::FE::FeedEngineThreadIdle::Reason, UInt32&);
57 
58 private:
59  FeedEngineSettings settings_;
60  HANDLER_NAMESPACE::FeedEngineListener* listener_;
61  HANDLER_NAMESPACE::FeedEngine* publicFeedEngine_;
62 
63  boost::scoped_ptr<HandlerCore::MarketData::FE::MultithreadedFeedEngine> feedEngine_;
64 };
65 
66 ONIXS_HANDLER_NAMESPACE_END
67 
68 
69 
static HandlerCore::MarketData::FE::MultithreadedFeedEngine * getFeedEngine(FeedEngine &feedEngine)
const FeedEngineSettings & settings() const
Collection of settings affecting Feed Engine behavior.
Definition: FeedEngine.h:78
Manages processing machinery for market data received from feeds.
Definition: FeedEngine.h:254