// Copyright Onix Solutions Limited [OnixS]. All rights reserved. // // This software owned by Onix Solutions Limited [OnixS] and is // protected by copyright law and international copyright treaties. // // Access to and use of the software is governed by the terms of the applicable // OnixS Software Services Agreement (the Agreement) and Customer end user license // agreements granting a non-assignable, non-transferable and non-exclusive license // to use the software for it's own data processing purposes under the terms defined // in the Agreement. // // Except as otherwise granted within the terms of the Agreement, copying or // reproduction of any part of this source code or associated reference material // to any other location for further reproduction or redistribution, and any // amendments to this copyright notice, are expressly prohibited. // // Any reproduction or redistribution for sale or hiring of the Software not in // accordance with the terms of the Agreement is a violation of copyright law. // #pragma once #include ONIXS_CMEMDH_NAMESPACE_BEGIN /// Feed types based on type of market data service. ONIXS_CMEMDH_LTWT_STRUCT NetFeedType { /// Integral base type of enumeration. typedef Char Base; /// Feed types based on type of market data service. enum Enum { /// TCP Replay. Historical, /// Incremental/real-time. Incremental, /// Instrument recovery. Instrument, /// Instrument definition cache. InstrumentCache, /// Market recovery for MBP (Market By Price) books. Snapshot, /// Market recovery for MBO (Market By Order) books. MboSnapshot }; }; /// Appends string presentation of feed service type. ONIXS_CMEMDH_EXPORTED void toStr( std::string&, NetFeedType::Enum); /// Returns string presentation of feed service type. inline std::string toStr( NetFeedType::Enum type) { std::string str; toStr(str, type); return str; } /// Feed roles (primary, secondary). ONIXS_CMEMDH_LTWT_STRUCT NetFeedRole { /// Integral base type of enumeration. typedef Char Base; /// List of known feed roles. enum Enum { /// Identifies primary feed (A). A = 'A', /// Identifies secondary feed (B). B = 'B' }; }; /// Appends string presentation of feed role. inline void toStr( std::string& str, NetFeedRole::Enum role) { str.append( 1, static_cast(role)); } /// Returns string presentation of feed role. inline std::string toStr( NetFeedRole::Enum role) { return std::string( 1, static_cast(role) ); } ONIXS_CMEMDH_NAMESPACE_END