OnixS C++ CME MDP Premium Market Data Handler 5.11.1
Users' manual and API documentation
Loading...
Searching...
No Matches
MessageBuilderDiagnostics.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 protected by copyright law
4// and international copyright treaties.
5//
6// Access to and use of the software is governed by the terms of the applicable OnixS Software
7// Services Agreement (the Agreement) and Customer end user license agreements granting
8// a non-assignable, non-transferable and non-exclusive license to use the software
9// for it's own data processing purposes under the terms defined in the Agreement.
10//
11// Except as otherwise granted within the terms of the Agreement, copying or reproduction of any part
12// of this source code or associated reference material to any other location for further reproduction
13// or redistribution, and any amendments to this copyright notice, are expressly prohibited.
14//
15// Any reproduction or redistribution for sale or hiring of the Software not in accordance with
16// the terms of the Agreement is a violation of copyright law.
17//
18
19#pragma once
20
21#include <type_traits>
22
23#include <OnixS/CME/MDH/ABI.h>
26
28
29// Explicit deleted overloads keep rvalue-holder detection reliable on legacy MSVC
30// and provide a focused diagnostic at direct message-builder call sites.
31
33namespace details
34{
35 template <typename...>
37 {
38 using Type = void;
39 };
40
41 template <typename Holder, typename = void>
42 struct IsMessageHolder : std::false_type
43 {
44 };
45
46 template <typename Holder>
48 : std::is_base_of<typename Holder::MessageHolderBase, Holder>
49 {
50 };
51
52 template <typename Holder>
53 using EnableRvalueMessageHolderDiagnostic = typename std::enable_if<
54 !std::is_lvalue_reference<Holder>::value &&
55 !std::is_const<typename std::remove_reference<Holder>::type>::value &&
57 void>::type;
58}
59
61template <typename Holder, typename... Arguments>
62auto initialize(Holder&&, Arguments&&...) -> details::EnableRvalueMessageHolderDiagnostic<Holder> = delete;
63
65template <Messaging::SecurityUpdateAction::Enum, typename Holder, typename... Arguments>
66auto initialize(Holder&&, Arguments&&...) -> details::EnableRvalueMessageHolderDiagnostic<Holder> = delete;
67
69template <typename Holder, typename... Arguments>
70auto addEntry(Holder&&, Arguments&&...) -> details::EnableRvalueMessageHolderDiagnostic<Holder> = delete;
71
73template <Messaging::UpdateAction::Enum, typename Holder, typename... Arguments>
74auto addEntry(Holder&&, Arguments&&...) -> details::EnableRvalueMessageHolderDiagnostic<Holder> = delete;
75
77template <Messaging::UpdateAction::Enum, typename Holder, typename Range, typename Projection>
78auto addEntries(Holder&&, Range&&, Projection&&) -> details::EnableRvalueMessageHolderDiagnostic<Holder> = delete;
79
81template <typename Holder, typename... Arguments>
82auto addOrderIdEntry(Holder&&, Arguments&&...) -> details::EnableRvalueMessageHolderDiagnostic<Holder> = delete;
83
85template <Messaging::OrderUpdateAction::Enum, typename Holder, typename... Arguments>
86auto addOrderIdEntry(Holder&&, Arguments&&...) -> details::EnableRvalueMessageHolderDiagnostic<Holder> = delete;
87
89template <typename Holder, typename... Arguments>
90auto addQuoteEntry(Holder&&, Arguments&&...) -> details::EnableRvalueMessageHolderDiagnostic<Holder> = delete;
91
#define ONIXS_CME_MDH_TESTING_NAMESPACE_END
Definition Bootstrap.h:84
#define ONIXS_CME_MDH_TESTING_NAMESPACE_BEGIN
Definition Bootstrap.h:83
typename std::enable_if< !std::is_lvalue_reference< Holder >::value && !std::is_const< typename std::remove_reference< Holder >::type >::value && IsMessageHolder< typename std::remove_cv< typename std::remove_reference< Holder >::type >::type >::value, void >::type EnableRvalueMessageHolderDiagnostic
auto addEntries(Holder &message, Range &&range, Projection &&projection) -> decltype(details::addEntriesFromIterators< Action >(message, details::rangeBegin(range), details::rangeEnd(range), std::forward< Projection >(projection)))
Appends entries projected from an input range.