BLPAPI C++ 3.26.7
Loading...
Searching...
No Matches
blpapi_correlationidhash.h
Go to the documentation of this file.
1/* Copyright 2026. Bloomberg Finance L.P.
2 *
3 * Permission is hereby granted, free of charge, to any person obtaining a copy
4 * of this software and associated documentation files (the "Software"), to
5 * deal in the Software without restriction, including without limitation the
6 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7 * sell copies of the Software, and to permit persons to whom the Software is
8 * furnished to do so, subject to the following conditions: The above
9 * copyright notice and this permission notice shall be included in all copies
10 * or substantial portions of the Software.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
17 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
18 * IN THE SOFTWARE.
19 */
20
27
28#ifndef INCLUDED_BLPAPI_CORRELATIONIDHASH
29#define INCLUDED_BLPAPI_CORRELATIONIDHASH
30
55
56#include <blpapi_call.h>
58
59#ifdef __cplusplus
60
61#include <cstddef>
62
63namespace std {
70
77template <> struct hash<BloombergLP::blpapi::CorrelationId> {
78 std::size_t operator()(
79 const BloombergLP::blpapi::CorrelationId& cid) const;
91};
92
95
96//=============================================================================
97// INLINE FUNCTION DEFINITIONS
98//=============================================================================
99
101 const BloombergLP::blpapi::CorrelationId& cid) const
102{
103 // required by BLPAPI_CALL for UnsupportedOperationException
104 using namespace BloombergLP::blpapi;
105
106 std::size_t hash = 0;
107 BLPAPI_CALL(blpapi_CorrelationId_hash)(&hash, &cid.impl());
108 return hash;
109}
110
111} // close namespace std
112
113#endif // #ifdef __cplusplus
114#endif // #ifndef INCLUDED_BLPAPI_CORRELATIONIDHASH
Provide functions for dispatchtbl.
Provide a key to identify individual subscriptions or requests.
Definition blpapi_correlationid.h:322
Definition blpapi_abstractsession.h:448
Definition blpapi_abstractsession.h:447
Definition blpapi_correlationidhash.h:63
std::size_t operator()(const BloombergLP::blpapi::CorrelationId &cid) const
Definition blpapi_correlationidhash.h:100