BLPAPI C++  3.24.11
blpapi_call.h
Go to the documentation of this file.
1 /* Copyright 2012. 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 
28 #ifndef INCLUDED_BLPAPI_CALL
29 #define INCLUDED_BLPAPI_CALL
30 
48 #ifdef __cplusplus
49 
50 // We only support dispatchtbl on windows currently
51 #if defined(_WIN32) || defined(__WIN32__) || defined(BLPAPI_FORCE_DISPATCHTBL)
52 #include <blpapi_dispatchtbl.h>
53 #include <blpapi_exception.h>
54 
55 // NOTE: The following macros are used to avoid direct dependencies
56 // on functions that may not be available in an old DLL.
57 
58 #define BLPAPI_TABLE_CHECK(FUNCNAME) \
59  ((g_blpapiFunctionTableSize \
60  && offsetof(blpapi_FunctionEntries_t, FUNCNAME) \
61  < g_blpapiFunctionTableSize - 1) \
62  ? 1 \
63  : 0)
64 
65 #define BLPAPI_TABLE_CALL(FUNCNAME) \
66  (BLPAPI_TABLE_CHECK(FUNCNAME) ? BLPAPI_CALL_UNCHECKED(FUNCNAME) \
67  : BLPAPI_UNSUPPORTED_CALL(FUNCNAME))
68 
69 #define BLPAPI_CALL_AVAILABLE(FUNCNAME) BLPAPI_TABLE_CHECK(FUNCNAME)
70 #define BLPAPI_CALL(FUNCNAME) BLPAPI_TABLE_CALL(FUNCNAME)
71 #define BLPAPI_CALL_UNCHECKED(FUNCNAME) g_blpapiFunctionEntries.FUNCNAME
72 
73 #define BLPAPI_UNSUPPORTED_CALL(FUNCNAME) \
74  (throw UnsupportedOperationException(#FUNCNAME " not supported"))
75 
76 #define BLPAPI_CALL_EVENTFORMATTER_APPENDMESSAGESEQ(a1, a2, a3, a4, a5, a6) \
77  (BLPAPI_TABLE_CALL(blpapi_EventFormatter_appendMessageSeq)( \
78  a1, a2, a3, a4, a5, a6))
79 
80 #define BLPAPI_CALL_EVENTFORMATTER_APPENDRECAPMESSAGESEQ(a1, a2, a3, a4, a5) \
81  (BLPAPI_TABLE_CALL(blpapi_EventFormatter_appendRecapMessageSeq)( \
82  a1, a2, a3, a4, a5))
83 
84 #define BLPAPI_CALL_MESSAGE_ADDREF(a1) \
85  (BLPAPI_TABLE_CHECK(blpapi_Message_addRef) \
86  ? g_blpapiFunctionEntries.blpapi_Message_addRef(a1) \
87  : 0)
88 
89 #define BLPAPI_CALL_MESSAGE_RELEASE(a1) \
90  (BLPAPI_TABLE_CHECK(blpapi_Message_release) \
91  ? g_blpapiFunctionEntries.blpapi_Message_release(a1) \
92  : 0)
93 
94 #define BLPAPI_CALL_SESSIONOPTIONS_SETMAXEVENTQUEUESIZE(a1, a2) \
95  (BLPAPI_TABLE_CHECK(blpapi_SessionOptions_setMaxEventQueueSize) \
96  ? g_blpapiFunctionEntries \
97  .blpapi_SessionOptions_setMaxEventQueueSize( \
98  a1, a2) \
99  : (void)0)
100 
101 #define BLPAPI_CALL_SESSIONOPTIONS_SETSLOWCONSUMERHIWATERMARK(a1, a2) \
102  (BLPAPI_TABLE_CHECK( \
103  blpapi_SessionOptions_setSlowConsumerWarningHiWaterMark) \
104  ? g_blpapiFunctionEntries \
105  .blpapi_SessionOptions_setSlowConsumerWarningHiWaterMark( \
106  a1, a2) \
107  : 0)
108 
109 #define BLPAPI_CALL_SESSIONOPTIONS_SETSLOWCONSUMERLOWATERMARK(a1, a2) \
110  (BLPAPI_TABLE_CHECK( \
111  blpapi_SessionOptions_setSlowConsumerWarningLoWaterMark) \
112  ? g_blpapiFunctionEntries \
113  .blpapi_SessionOptions_setSlowConsumerWarningLoWaterMark( \
114  a1, a2) \
115  : 0)
116 
117 #define BLPAPI_CALL_REQUEST_SETPREFERREDROUTE(a1, a2) \
118  do { \
119  if (BLPAPI_TABLE_CHECK(blpapi_Request_setPreferredRoute)) \
120  g_blpapiFunctionEntries.blpapi_Request_setPreferredRoute(a1, a2); \
121  } while (0)
122 
123 #define BLPAPI_CALL_MESSAGE_FRAGMENTTYPE(a1) \
124  (BLPAPI_TABLE_CHECK(blpapi_Message_fragmentType) \
125  ? g_blpapiFunctionEntries.blpapi_Message_fragmentType(a1) \
126  : 0)
127 
128 #define BLPAPI_CALL_SESSIONOPTIONS_MAXEVENTQUEUESIZE(a1) \
129  (BLPAPI_TABLE_CHECK(blpapi_SessionOptions_maxEventQueueSize) \
130  ? g_blpapiFunctionEntries \
131  .blpapi_SessionOptions_maxEventQueueSize(a1) \
132  : ULONG_MAX)
133 
134 #define BLPAPI_CALL_SESSIONOPTIONS_SLOWCONSUMERHIWATERMARK(a1) \
135  (BLPAPI_TABLE_CHECK(blpapi_SessionOptions_slowConsumerWarningHiWaterMark) \
136  ? g_blpapiFunctionEntries \
137  .blpapi_SessionOptions_slowConsumerWarningHiWaterMark( \
138  a1) \
139  : 1.0f)
140 
141 #define BLPAPI_CALL_SESSIONOPTIONS_SLOWCONSUMERLOWATERMARK(a1) \
142  (BLPAPI_TABLE_CHECK(blpapi_SessionOptions_slowConsumerWarningLoWaterMark) \
143  ? g_blpapiFunctionEntries \
144  .blpapi_SessionOptions_slowConsumerWarningLoWaterMark( \
145  a1) \
146  : 0.0f)
147 
148 #define BLPAPI_CALL_SESSIONOPTIONS_DEFAULTKEEPALIVEINACTIVITYTIME(h) \
149  (BLPAPI_TABLE_CHECK(blpapi_SessionOptions_defaultKeepAliveInactivityTime) \
150  ? g_blpapiFunctionEntries \
151  .blpapi_SessionOptions_defaultKeepAliveInactivityTime( \
152  h) \
153  : INT_MAX)
154 
155 #define BLPAPI_CALL_SESSIONOPTIONS_DEFAULTKEEPALIVERESPONSETIMEOUT(h) \
156  (BLPAPI_TABLE_CHECK( \
157  blpapi_SessionOptions_defaultKeepAliveResponseTimeout) \
158  ? g_blpapiFunctionEntries \
159  .blpapi_SessionOptions_defaultKeepAliveResponseTimeout( \
160  h) \
161  : INT_MAX)
162 
163 #define BLPAPI_CALL_SESSIONOPTIONS_KEEPALIVEENABLED(h) \
164  (BLPAPI_TABLE_CHECK(blpapi_SessionOptions_keepAliveEnabled) \
165  ? g_blpapiFunctionEntries \
166  .blpapi_SessionOptions_keepAliveEnabled(h) \
167  : 1)
168 
169 #define BLPAPI_CALL_SESSIONOPTIONS_BANDWIDTHSAVEMODEDISABLED(a1) \
170  (BLPAPI_TABLE_CHECK(blpapi_SessionOptions_bandwidthSaveModeDisabled) \
171  ? g_blpapiFunctionEntries \
172  .blpapi_SessionOptions_bandwidthSaveModeDisabled( \
173  a1) \
174  : 1)
175 
176 #define BLPAPI_CALL_SESSIONOPTIONS_SETDEFAULTKEEPALIVEINACTIVITYTIME(h, t) \
177  (BLPAPI_TABLE_CHECK( \
178  blpapi_SessionOptions_setDefaultKeepAliveInactivityTime) \
179  ? g_blpapiFunctionEntries \
180  .blpapi_SessionOptions_setDefaultKeepAliveInactivityTime( \
181  h, t) \
182  : 0)
183 
184 #define BLPAPI_CALL_SESSIONOPTIONS_SETDEFAULTKEEPALIVERESPONSETIMEOUT(h, t) \
185  (BLPAPI_TABLE_CHECK( \
186  blpapi_SessionOptions_setDefaultKeepAliveResponseTimeout) \
187  ? g_blpapiFunctionEntries \
188  .blpapi_SessionOptions_setDefaultKeepAliveResponseTimeout( \
189  h, t) \
190  : 0)
191 
192 #define BLPAPI_CALL_SESSIONOPTIONS_SETKEEPALIVEENABLED(h, t) \
193  (BLPAPI_TABLE_CHECK(blpapi_SessionOptions_setKeepAliveEnabled) \
194  ? g_blpapiFunctionEntries \
195  .blpapi_SessionOptions_setKeepAliveEnabled( \
196  h, t) \
197  : 0)
198 
199 #define BLPAPI_CALL_SESSIONOPTIONS_SETBANDWIDTHSAVEMODEDISABLED(a1, a2) \
200  (BLPAPI_TABLE_CHECK(blpapi_SessionOptions_setBandwidthSaveModeDisabled) \
201  ? g_blpapiFunctionEntries \
202  .blpapi_SessionOptions_setBandwidthSaveModeDisabled( \
203  a1, a2) \
204  : 0)
205 
206 #define BLPAPI_CALL_HIGHPRECISIONDATETIME_COMPARE(a1, a2) \
207  (BLPAPI_TABLE_CHECK(blpapi_HighPrecisionDatetime_compare) \
208  ? g_blpapiFunctionEntries \
209  .blpapi_HighPrecisionDatetime_compare(a1, a2) \
210  : blpapi_Datetime_compare( \
211  (a1)->datetime, (a2)->datetime))
212 
213 #define BLPAPI_CALL_HIGHPRECISIONDATETIME_PRINT(a1, a2, a3, a4, a5) \
214  (BLPAPI_TABLE_CHECK(blpapi_HighPrecisionDatetime_print) \
215  ? g_blpapiFunctionEntries \
216  .blpapi_HighPrecisionDatetime_print( \
217  a1, a2, a3, a4, a5) \
218  : blpapi_Datetime_print( \
219  &((a1)->datetime), a2, a3, a4, a5))
220 
221 #define BLPAPI_CALL_ELEMENT_SETVALUEHIGHPRECISIONDATETIME(a1, a2, a3) \
222  (BLPAPI_TABLE_CHECK(blpapi_Element_setValueHighPrecisionDatetime) \
223  ? g_blpapiFunctionEntries \
224  .blpapi_Element_setValueHighPrecisionDatetime( \
225  a1, a2, a3) \
226  : blpapi_Element_setValueDatetime( \
227  a1, &((a2)->datetime), a3))
228 
229 #define BLPAPI_CALL_ELEMENT_SETELEMENTHIGHPRECISIONDATETIME(a1, a2, a3, a4) \
230  (BLPAPI_TABLE_CHECK(blpapi_Element_setElementHighPrecisionDatetime) \
231  ? g_blpapiFunctionEntries \
232  .blpapi_Element_setElementHighPrecisionDatetime( \
233  a1, a2, a3, a4) \
234  : blpapi_Element_setElementDatetime( \
235  a1, a2, a3, &((a4)->datetime)))
236 
237 #define BLPAPI_CALL_ELEMENT_GETVALUEASHIGHPRECISIONDATETIME(a1, a2, a3) \
238  if (BLPAPI_TABLE_CHECK(blpapi_Element_getValueAsHighPrecisionDatetime)) { \
239  return g_blpapiFunctionEntries \
240  .blpapi_Element_getValueAsHighPrecisionDatetime( \
241  a1, &(a2)->rawHighPrecisionValue(), a3); \
242  } else { \
243  buffer->rawHighPrecisionValue().picoseconds = 0; \
244  return blpapi_Element_getValueAsDatetime(a1, &(a2)->rawValue(), a3); \
245  }
246 
247 #define BLPAPI_CALL_SESSION_RESUBSCRIBEWITHID(a1, a2, a3, a4, a5) \
248  (BLPAPI_TABLE_CHECK(blpapi_Session_resubscribeWithId) \
249  ? g_blpapiFunctionEntries \
250  .blpapi_Session_resubscribeWithId( \
251  a1, a2, a3, a4, a5) \
252  : blpapi_Session_resubscribe(a1, a2, a4, a5))
253 
254 #define BLPAPI_CALL_EVENTFORMATTER_SETVALUENULL(a1, a2, a3) \
255  (BLPAPI_TABLE_CALL(blpapi_EventFormatter_setValueNull)(a1, a2, a3))
256 
257 #define BLPAPI_CALL_DIAGNOSTICSUTIL_MEMORYINFO(a1, a2) \
258  if (BLPAPI_TABLE_CHECK(blpapi_DiagnosticsUtil_memoryInfo)) { \
259  return g_blpapiFunctionEntries.blpapi_DiagnosticsUtil_memoryInfo( \
260  a1, a2); \
261  } else { \
262  return -1; \
263  }
264 
265 #define BLPAPI_CALL_SUBSCRIPTIONLIST_ADDRESOLVED(a1, a2, a3) \
266  (BLPAPI_TABLE_CHECK(blpapi_SubscriptionList_addResolved) \
267  ? g_blpapiFunctionEntries \
268  .blpapi_SubscriptionList_addResolved( \
269  a1, a2, a3) \
270  : blpapi_SubscriptionList_add(a1, a2, a3, 0, 0, 0, 0))
271 
272 #define BLPAPI_CALL_SUBSCRIPTIONLIST_ISRESOLVEDAT(a1, a2, a3) \
273  (BLPAPI_TABLE_CHECK(blpapi_SubscriptionList_isResolvedAt) \
274  ? g_blpapiFunctionEntries \
275  .blpapi_SubscriptionList_isResolvedAt( \
276  a1, a2, a3) \
277  : (*a2 = 0, 0))
278 
279 #define BLPAPI_CALL_PROVIDERSESSION_DEREGISTERSERVICE(a1, a2) \
280  (BLPAPI_TABLE_CALL(blpapi_ProviderSession_deregisterService)(a1, a2))
281 
282 #define BLPAPI_CALL_SERVICEREGISTRATIONOPTIONS_SETPARTSTOREGISTER(a1, a2) \
283  (BLPAPI_TABLE_CALL(blpapi_ServiceRegistrationOptions_setPartsToRegister)( \
284  a1, a2))
285 
286 #define BLPAPI_CALL_SERVICEREGISTRATIONOPTIONS_GETPARTSTOREGISTER(a1) \
287  (BLPAPI_TABLE_CALL(blpapi_ServiceRegistrationOptions_getPartsToRegister)( \
288  a1))
289 
290 #define BLPAPI_CALL_PROVIDERSESSION_DELETETOPICS(a1, a2, a3) \
291  (BLPAPI_TABLE_CALL(blpapi_ProviderSession_deleteTopics)(a1, a2, a3))
292 
293 #define BLPAPI_CALL_PROVIDERSESSION_TERMINATESUBSCRIPTIONSONTOPICS( \
294  a1, a2, a3, a4) \
295  (BLPAPI_TABLE_CALL( \
296  blpapi_ProviderSession_terminateSubscriptionsOnTopics)( \
297  a1, a2, a3, a4))
298 
299 #define BLPAPI_CALL_PROVIDERSESSION_ACTIVATESUBSERVICECODERANGE( \
300  a1, a2, a3, a4, a5) \
301  (BLPAPI_TABLE_CALL(blpapi_ProviderSession_activateSubServiceCodeRange)( \
302  a1, a2, a3, a4, a5))
303 
304 #define BLPAPI_CALL_PROVIDERSESSION_DEACTIVATESUBSERVICECODERANGE( \
305  a1, a2, a3, a4) \
306  (BLPAPI_TABLE_CALL(blpapi_ProviderSession_deactivateSubServiceCodeRange)( \
307  a1, a2, a3, a4))
308 
309 #define BLPAPI_CALL_SERVICEREGISTRATIONOPTIONS_ADDACTIVATESUBSERVICECODERANGE( \
310  a1, a2, a3, a4) \
311  (BLPAPI_TABLE_CALL( \
312  blpapi_ServiceRegistrationOptions_addActiveSubServiceCodeRange)( \
313  a1, a2, a3, a4))
314 
315 #define BLPAPI_CALL_SERVICEREGISTRATIONOPTIONS_REMOVEALLACTIVESUBSERVICECODERANGES( \
316  a1) \
317  (BLPAPI_TABLE_CALL( \
318  blpapi_ServiceRegistrationOptions_removeAllActiveSubServiceCodeRanges)( \
319  a1))
320 
321 #define BLPAPI_CALL_MESSAGE_TIMERECEIVED(a1, a2) \
322  (BLPAPI_TABLE_CALL(blpapi_Message_timeReceived)(a1, a2))
323 
324 #define BLPAPI_CALL_SESSIONOPTION_SETRECORDSUBSCRIPTIONDATARECEIVETIMES( \
325  a1, a2) \
326  (BLPAPI_TABLE_CHECK( \
327  blpapi_SessionOptions_setRecordSubscriptionDataReceiveTimes) \
328  ? g_blpapiFunctionEntries \
329  .blpapi_SessionOptions_setRecordSubscriptionDataReceiveTimes( \
330  a1, a2) \
331  : (void)0)
332 
333 #define BLPAPI_CALL_SESSIONOPTION_RECORDSUBSCRIPTIONDATARECEIVETIMES(a1) \
334  (BLPAPI_TABLE_CHECK( \
335  blpapi_SessionOptions_recordSubscriptionDataReceiveTimes) \
336  ? g_blpapiFunctionEntries \
337  .blpapi_SessionOptions_recordSubscriptionDataReceiveTimes( \
338  a1) \
339  : false)
340 
341 #define BLPAPI_CALL_TIMEPOINTUTIL_NANOSECONDSBETWEEN(a1, a2) \
342  (BLPAPI_TABLE_CALL(blpapi_TimePointUtil_nanosecondsBetween)(a1, a2))
343 
344 #define BLPAPI_CALL_HIGHRESOLUTIONCLOCK_NOW(a1) \
345  (BLPAPI_TABLE_CALL(blpapi_HighResolutionClock_now)(a1))
346 
347 #define BLPAPI_CALL_HIGHPRECISIONDATETIME_FROMTIMEPOINT(a1, a2, a3) \
348  (BLPAPI_TABLE_CALL(blpapi_HighPrecisionDatetime_fromTimePoint)(a1, a2, a3))
349 
350 #else // if defined(_WIN32) || defined(__WIN32__)
351 
352 #define BLPAPI_CALL_AVAILABLE(FUNCNAME) true
353 #define BLPAPI_CALL(FUNCNAME) FUNCNAME
354 #define BLPAPI_CALL_UNCHECKED(FUNCNAME) FUNCNAME
355 
356 #define BLPAPI_CALL_EVENTFORMATTER_APPENDMESSAGESEQ(a1, a2, a3, a4, a5, a6) \
357  (blpapi_EventFormatter_appendMessageSeq)(a1, a2, a3, a4, a5, a6)
358 #define BLPAPI_CALL_EVENTFORMATTER_APPENDRECAPMESSAGESEQ(a1, a2, a3, a4, a5) \
359  (blpapi_EventFormatter_appendRecapMessageSeq)(a1, a2, a3, a4, a5)
360 #define BLPAPI_CALL_MESSAGE_ADDREF(a1) (blpapi_Message_addRef)(a1)
361 #define BLPAPI_CALL_MESSAGE_RELEASE(a1) (blpapi_Message_release)(a1)
362 #define BLPAPI_CALL_SESSIONOPTIONS_SETMAXEVENTQUEUESIZE(a1, a2) \
363  (blpapi_SessionOptions_setMaxEventQueueSize)(a1, a2)
364 #define BLPAPI_CALL_SESSIONOPTIONS_SETSLOWCONSUMERHIWATERMARK(a1, a2) \
365  (blpapi_SessionOptions_setSlowConsumerWarningHiWaterMark)(a1, a2)
366 #define BLPAPI_CALL_SESSIONOPTIONS_SETSLOWCONSUMERLOWATERMARK(a1, a2) \
367  (blpapi_SessionOptions_setSlowConsumerWarningLoWaterMark)(a1, a2)
368 #define BLPAPI_CALL_REQUEST_SETPREFERREDROUTE(a1, a2) \
369  (blpapi_Request_setPreferredRoute)(a1, a2)
370 #define BLPAPI_CALL_MESSAGE_FRAGMENTTYPE(a1) (blpapi_Message_fragmentType)(a1)
371 #define BLPAPI_CALL_SESSIONOPTIONS_MAXEVENTQUEUESIZE(a1) \
372  (blpapi_SessionOptions_maxEventQueueSize)(a1)
373 #define BLPAPI_CALL_SESSIONOPTIONS_SLOWCONSUMERHIWATERMARK(a1) \
374  (blpapi_SessionOptions_slowConsumerWarningHiWaterMark)(a1)
375 #define BLPAPI_CALL_SESSIONOPTIONS_SLOWCONSUMERLOWATERMARK(a1) \
376  (blpapi_SessionOptions_slowConsumerWarningLoWaterMark)(a1)
377 
378 #define BLPAPI_CALL_SESSIONOPTIONS_DEFAULTKEEPALIVEINACTIVITYTIME(a1) \
379  (blpapi_SessionOptions_defaultKeepAliveInactivityTime)(a1)
380 #define BLPAPI_CALL_SESSIONOPTIONS_DEFAULTKEEPALIVERESPONSETIMEOUT(a1) \
381  (blpapi_SessionOptions_defaultKeepAliveResponseTimeout)(a1)
382 #define BLPAPI_CALL_SESSIONOPTIONS_KEEPALIVEENABLED(a1) \
383  (blpapi_SessionOptions_keepAliveEnabled)(a1)
384 #define BLPAPI_CALL_SESSIONOPTIONS_SETDEFAULTKEEPALIVEINACTIVITYTIME(a1, a2) \
385  (blpapi_SessionOptions_setDefaultKeepAliveInactivityTime)(a1, a2)
386 #define BLPAPI_CALL_SESSIONOPTIONS_SETDEFAULTKEEPALIVERESPONSETIMEOUT(a1, a2) \
387  (blpapi_SessionOptions_setDefaultKeepAliveResponseTimeout)(a1, a2)
388 #define BLPAPI_CALL_SESSIONOPTIONS_SETKEEPALIVEENABLED(a1, a2) \
389  (blpapi_SessionOptions_setKeepAliveEnabled)(a1, a2)
390 #define BLPAPI_CALL_SESSIONOPTIONS_SETBANDWIDTHSAVEMODEDISABLED(a1, a2) \
391  (blpapi_SessionOptions_setBandwidthSaveModeDisabled)(a1, a2)
392 #define BLPAPI_CALL_SESSIONOPTIONS_BANDWIDTHSAVEMODEDISABLED(a1) \
393  (blpapi_SessionOptions_bandwidthSaveModeDisabled)(a1)
394 
395 #define BLPAPI_CALL_HIGHPRECISIONDATETIME_COMPARE(a1, a2) \
396  (blpapi_HighPrecisionDatetime_compare)(a1, a2)
397 #define BLPAPI_CALL_HIGHPRECISIONDATETIME_PRINT(a1, a2, a3, a4, a5) \
398  (blpapi_HighPrecisionDatetime_print)(a1, a2, a3, a4, a5)
399 #define BLPAPI_CALL_ELEMENT_SETVALUEHIGHPRECISIONDATETIME(a1, a2, a3) \
400  (blpapi_Element_setValueHighPrecisionDatetime(a1, a2, a3))
401 #define BLPAPI_CALL_ELEMENT_SETELEMENTHIGHPRECISIONDATETIME(a1, a2, a3, a4) \
402  (blpapi_Element_setElementHighPrecisionDatetime(a1, a2, a3, a4))
403 #define BLPAPI_CALL_ELEMENT_GETVALUEASHIGHPRECISIONDATETIME(a1, a2, a3) \
404  return blpapi_Element_getValueAsHighPrecisionDatetime( \
405  a1, &a2->rawHighPrecisionValue(), a3);
406 #define BLPAPI_CALL_SESSION_RESUBSCRIBEWITHID(a1, a2, a3, a4, a5) \
407  (blpapi_Session_resubscribeWithId)(a1, a2, a3, a4, a5)
408 
409 #define BLPAPI_CALL_EVENTFORMATTER_SETVALUENULL(a1, a2, a3) \
410  (blpapi_EventFormatter_setValueNull)(a1, a2, a3)
411 
412 #define BLPAPI_CALL_DIAGNOSTICSUTIL_MEMORYINFO(a1, a2) \
413  return blpapi_DiagnosticsUtil_memoryInfo(a1, a2);
414 
415 #define BLPAPI_CALL_SUBSCRIPTIONLIST_ADDRESOLVED(a1, a2, a3) \
416  (blpapi_SubscriptionList_addResolved)(a1, a2, a3)
417 #define BLPAPI_CALL_SUBSCRIPTIONLIST_ISRESOLVEDAT(a1, a2, a3) \
418  (blpapi_SubscriptionList_isResolvedAt)(a1, a2, a3)
419 
420 #define BLPAPI_CALL_PROVIDERSESSION_DEREGISTERSERVICE(a1, a2) \
421  (blpapi_ProviderSession_deregisterService(a1, a2))
422 
423 #define BLPAPI_CALL_SERVICEREGISTRATIONOPTIONS_SETPARTSTOREGISTER(a1, a2) \
424  (blpapi_ServiceRegistrationOptions_setPartsToRegister(a1, a2))
425 
426 #define BLPAPI_CALL_SERVICEREGISTRATIONOPTIONS_GETPARTSTOREGISTER(a1) \
427  (blpapi_ServiceRegistrationOptions_getPartsToRegister(a1))
428 
429 #define BLPAPI_CALL_PROVIDERSESSION_DELETETOPICS(a1, a2, a3) \
430  (blpapi_ProviderSession_deleteTopics(a1, a2, a3))
431 
432 #define BLPAPI_CALL_PROVIDERSESSION_TERMINATESUBSCRIPTIONSONTOPICS( \
433  a1, a2, a3, a4) \
434  (blpapi_ProviderSession_terminateSubscriptionsOnTopics(a1, a2, a3, a4))
435 
436 #define BLPAPI_CALL_PROVIDERSESSION_ACTIVATESUBSERVICECODERANGE( \
437  a1, a2, a3, a4, a5) \
438  (blpapi_ProviderSession_activateSubServiceCodeRange)(a1, a2, a3, a4, a5)
439 
440 #define BLPAPI_CALL_PROVIDERSESSION_DEACTIVATESUBSERVICECODERANGE( \
441  a1, a2, a3, a4) \
442  (blpapi_ProviderSession_deactivateSubServiceCodeRange)(a1, a2, a3, a4)
443 
444 #define BLPAPI_CALL_SERVICEREGISTRATIONOPTIONS_ADDACTIVATESUBSERVICECODERANGE( \
445  a1, a2, a3, a4) \
446  (blpapi_ServiceRegistrationOptions_addActiveSubServiceCodeRange)( \
447  a1, a2, a3, a4)
448 
449 #define BLPAPI_CALL_SERVICEREGISTRATIONOPTIONS_REMOVEALLACTIVESUBSERVICECODERANGES( \
450  a1) \
451  (blpapi_ServiceRegistrationOptions_removeAllActiveSubServiceCodeRanges)(a1)
452 
453 #define BLPAPI_CALL_MESSAGE_TIMERECEIVED(a1, a2) \
454  (blpapi_Message_timeReceived)(a1, a2)
455 #define BLPAPI_CALL_SESSIONOPTION_SETRECORDSUBSCRIPTIONDATARECEIVETIMES( \
456  a1, a2) \
457  (blpapi_SessionOptions_setRecordSubscriptionDataReceiveTimes)(a1, a2)
458 #define BLPAPI_CALL_SESSIONOPTION_RECORDSUBSCRIPTIONDATARECEIVETIMES(a1) \
459  (blpapi_SessionOptions_recordSubscriptionDataReceiveTimes)(a1)
460 
461 #define BLPAPI_CALL_TIMEPOINTUTIL_NANOSECONDSBETWEEN(a1, a2) \
462  (blpapi_TimePointUtil_nanosecondsBetween)(a1, a2)
463 #define BLPAPI_CALL_HIGHRESOLUTIONCLOCK_NOW(a1) \
464  (blpapi_HighResolutionClock_now)(a1)
465 #define BLPAPI_CALL_HIGHPRECISIONDATETIME_FROMTIMEPOINT(a1, a2, a3) \
466  (blpapi_HighPrecisionDatetime_fromTimePoint)(a1, a2, a3)
467 
468 #endif // if defined(_WIN32) || defined(__WIN32__)
469  // || defined(BLPAPI_FORCE_DISPATCHTBL)
470 
471 #endif // __cplusplus
472 
473 #endif // INCLUDED_BLPAPI_CALL
Work with dispatch table.
Defines Exceptions that can be thrown by the blpapi library.