82 lines
2.7 KiB
C++
82 lines
2.7 KiB
C++
// 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 <string>
|
|
|
|
#include <OnixS/CME/MDH/Composites.h>
|
|
|
|
ONIXS_CMEMDH_NAMESPACE_BEGIN
|
|
|
|
/// Defines different ways trades are processed.
|
|
ONIXS_CMEMDH_LTWT_STRUCT
|
|
TradeProcessing
|
|
{
|
|
/// Integral type used as basement for constants.
|
|
typedef UInt32 Base;
|
|
|
|
enum Enum
|
|
{
|
|
/// Given strategy tells Handler to provide only
|
|
/// summary-level of trade data. Information on orders
|
|
/// related with a trade is not provided and only number
|
|
/// of orders is available. Trades are exposed by Handler
|
|
/// as soon as correspondent data is received without
|
|
/// any additional delays.
|
|
SummaryLevel,
|
|
|
|
/// Tells Handler to gather detailed information on orders
|
|
/// related with each trade. As a result, trades are exposed
|
|
/// with order ids referring to the trades in addition to
|
|
/// summary level information exposed by trades.
|
|
/// In this mode, trades may be exposed with delays, because
|
|
/// MDP sends order ids after trade summary data. Also,
|
|
/// data may be distributed across packets belonging to single
|
|
/// market event. Therefore, in general, given strategy may
|
|
/// be slower in compare to summary level. However, in 99%
|
|
/// entire data is transmitted within single packet, therefore
|
|
/// trades are exposed with no delay.
|
|
OrderDetails
|
|
};
|
|
};
|
|
|
|
/// Serializes trade processing strategy.
|
|
ONIXS_CMEMDH_EXPORTED
|
|
void
|
|
toStr(
|
|
std::string&,
|
|
TradeProcessing::Enum);
|
|
|
|
/// Serializes trade processing strategy.
|
|
inline
|
|
std::string
|
|
toStr(
|
|
TradeProcessing::Enum strategy)
|
|
{
|
|
std::string str;
|
|
|
|
toStr(str, strategy);
|
|
|
|
return str;
|
|
}
|
|
|
|
ONIXS_CMEMDH_NAMESPACE_END
|