BLPAPI C++ 3.26.5
Loading...
Searching...
No Matches
blpapi_element.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
35
36#ifndef INCLUDED_BLPAPI_ELEMENT
37#define INCLUDED_BLPAPI_ELEMENT
38
66
67#include <blpapi_call.h>
68#include <blpapi_datetime.h>
69#include <blpapi_defs.h>
70#include <blpapi_deprecate.h>
71#include <blpapi_name.h>
72#include <blpapi_schema.h>
73#include <blpapi_streamproxy.h>
74#include <blpapi_types.h>
75
76#include <stddef.h>
77
78#ifdef __cplusplus
79extern "C" {
80#endif
81
83
86
88
95BLPAPI_EXPORT blpapi_Name_t *blpapi_Element_name(
96 const blpapi_Element_t *element);
97
99
107BLPAPI_EXPORT const char *blpapi_Element_nameString(
108 const blpapi_Element_t *element);
109
111
118BLPAPI_EXPORT blpapi_SchemaElementDefinition_t *blpapi_Element_definition(
119 const blpapi_Element_t *element);
120
122
130BLPAPI_EXPORT int blpapi_Element_datatype(const blpapi_Element_t *element);
131
133
141BLPAPI_EXPORT int blpapi_Element_isComplexType(
142 const blpapi_Element_t *element);
143
145
153BLPAPI_EXPORT int blpapi_Element_isArray(const blpapi_Element_t *element);
154
156
164BLPAPI_EXPORT int blpapi_Element_isReadOnly(const blpapi_Element_t *element);
165
167
175BLPAPI_EXPORT size_t blpapi_Element_numValues(const blpapi_Element_t *element);
176
178
186BLPAPI_EXPORT size_t blpapi_Element_numElements(
187 const blpapi_Element_t *element);
188
190
199BLPAPI_EXPORT int blpapi_Element_isNullValue(
200 const blpapi_Element_t *element, size_t position);
201
203
211BLPAPI_EXPORT int blpapi_Element_isNull(const blpapi_Element_t *element);
212
214
228BLPAPI_EXPORT int blpapi_Element_print(const blpapi_Element_t *element,
229 blpapi_StreamWriter_t streamWriter,
230 void *stream,
231 int level,
232 int spacesPerLevel);
233
235
246BLPAPI_EXPORT int blpapi_Element_toJson(const blpapi_Element_t *element,
247 blpapi_StreamWriter_t streamWriter,
248 void *stream);
249
251
260BLPAPI_EXPORT int blpapi_Element_fromJson(
261 const blpapi_Element_t *element, char const *json);
262
264
275BLPAPI_EXPORT
276int blpapi_Element_getElementAt(const blpapi_Element_t *element,
277 blpapi_Element_t **result,
278 size_t position);
279
281
295BLPAPI_EXPORT
296int blpapi_Element_getElement(const blpapi_Element_t *element,
297 blpapi_Element_t **result,
298 const char *nameString,
299 const blpapi_Name_t *name);
300
302
315BLPAPI_EXPORT
316int blpapi_Element_hasElement(const blpapi_Element_t *element,
317 const char *nameString,
318 const blpapi_Name_t *name);
319
321
337BLPAPI_EXPORT
338int blpapi_Element_hasElementEx(const blpapi_Element_t *element,
339 const char *nameString,
340 const blpapi_Name_t *name,
341 int excludeNullElements,
342 int reserved);
343
345
356BLPAPI_EXPORT
357int blpapi_Element_getValueAsBool(
358 const blpapi_Element_t *element, blpapi_Bool_t *buffer, size_t index);
359
361
371BLPAPI_EXPORT
372int blpapi_Element_getValueAsChar(
373 const blpapi_Element_t *element, blpapi_Char_t *buffer, size_t index);
374
376
386BLPAPI_EXPORT
387int blpapi_Element_getValueAsInt32(
388 const blpapi_Element_t *element, blpapi_Int32_t *buffer, size_t index);
389
391
401BLPAPI_EXPORT
402int blpapi_Element_getValueAsInt64(
403 const blpapi_Element_t *element, blpapi_Int64_t *buffer, size_t index);
404
406
416BLPAPI_EXPORT
417int blpapi_Element_getValueAsFloat32(const blpapi_Element_t *element,
418 blpapi_Float32_t *buffer,
419 size_t index);
420
422
432BLPAPI_EXPORT
433int blpapi_Element_getValueAsFloat64(const blpapi_Element_t *element,
434 blpapi_Float64_t *buffer,
435 size_t index);
436
438
449BLPAPI_EXPORT
450int blpapi_Element_getValueAsString(
451 const blpapi_Element_t *element, const char **buffer, size_t index);
452
454
464BLPAPI_EXPORT
465int blpapi_Element_getValueAsDatetime(const blpapi_Element_t *element,
466 blpapi_Datetime_t *buffer,
467 size_t index);
468
470
480BLPAPI_EXPORT
481int blpapi_Element_getValueAsHighPrecisionDatetime(
482 const blpapi_Element_t *element,
483 blpapi_HighPrecisionDatetime_t *buffer,
484 size_t index);
485
487
498BLPAPI_EXPORT
499int blpapi_Element_getValueAsElement(const blpapi_Element_t *element,
500 blpapi_Element_t **buffer,
501 size_t index);
502
504
515BLPAPI_EXPORT
516int blpapi_Element_getValueAsName(
517 const blpapi_Element_t *element, blpapi_Name_t **buffer, size_t index);
518
520
533BLPAPI_EXPORT
534int blpapi_Element_getValueAsBytes(const blpapi_Element_t *element,
535 const char **buffer,
536 size_t *length,
537 size_t index);
538
540
550BLPAPI_EXPORT
551int blpapi_Element_getChoice(
552 const blpapi_Element_t *element, blpapi_Element_t **result);
553
555
566BLPAPI_EXPORT
567int blpapi_Element_setValueBool(
568 blpapi_Element_t *element, blpapi_Bool_t value, size_t index);
569
571
581BLPAPI_EXPORT
582int blpapi_Element_setValueChar(
583 blpapi_Element_t *element, blpapi_Char_t value, size_t index);
584
586
596BLPAPI_EXPORT
597int blpapi_Element_setValueInt32(
598 blpapi_Element_t *element, blpapi_Int32_t value, size_t index);
599
601
611BLPAPI_EXPORT
612int blpapi_Element_setValueInt64(
613 blpapi_Element_t *element, blpapi_Int64_t value, size_t index);
614
616
626BLPAPI_EXPORT
627int blpapi_Element_setValueFloat32(
628 blpapi_Element_t *element, blpapi_Float32_t value, size_t index);
629
631
641BLPAPI_EXPORT
642int blpapi_Element_setValueFloat64(
643 blpapi_Element_t *element, blpapi_Float64_t value, size_t index);
644
646
656BLPAPI_EXPORT
657int blpapi_Element_setValueString(
658 blpapi_Element_t *element, const char *value, size_t index);
659
661
671BLPAPI_EXPORT
672int blpapi_Element_setValueDatetime(blpapi_Element_t *element,
673 const blpapi_Datetime_t *value,
674 size_t index);
675
677
687BLPAPI_EXPORT
688int blpapi_Element_setValueHighPrecisionDatetime(blpapi_Element_t *element,
689 const blpapi_HighPrecisionDatetime_t *value,
690 size_t index);
691
693
704BLPAPI_EXPORT
705int blpapi_Element_setValueBytes(blpapi_Element_t *element,
706 const char *value,
707 size_t length,
708 size_t index);
709
711
721BLPAPI_EXPORT
722int blpapi_Element_setValueFromElement(
723 blpapi_Element_t *element, blpapi_Element_t *value, size_t index);
724
726
736BLPAPI_EXPORT
737int blpapi_Element_setValueFromName(
738 blpapi_Element_t *element, const blpapi_Name_t *value, size_t index);
739
741
754BLPAPI_EXPORT
755int blpapi_Element_setElementBool(blpapi_Element_t *element,
756 const char *nameString,
757 const blpapi_Name_t *name,
758 blpapi_Bool_t value);
759
761
774BLPAPI_EXPORT
775int blpapi_Element_setElementChar(blpapi_Element_t *element,
776 const char *nameString,
777 const blpapi_Name_t *name,
778 blpapi_Char_t value);
779
781
794BLPAPI_EXPORT
795int blpapi_Element_setElementInt32(blpapi_Element_t *element,
796 const char *nameString,
797 const blpapi_Name_t *name,
798 blpapi_Int32_t value);
799
801
814BLPAPI_EXPORT
815int blpapi_Element_setElementInt64(blpapi_Element_t *element,
816 const char *nameString,
817 const blpapi_Name_t *name,
818 blpapi_Int64_t value);
819
821
835BLPAPI_EXPORT
836int blpapi_Element_setElementFloat32(blpapi_Element_t *element,
837 const char *nameString,
838 const blpapi_Name_t *name,
839 blpapi_Float32_t value);
840
842
856BLPAPI_EXPORT
857int blpapi_Element_setElementFloat64(blpapi_Element_t *element,
858 const char *nameString,
859 const blpapi_Name_t *name,
860 blpapi_Float64_t value);
861
863
877BLPAPI_EXPORT
878int blpapi_Element_setElementString(blpapi_Element_t *element,
879 const char *nameString,
880 const blpapi_Name_t *name,
881 const char *value);
882
884
897BLPAPI_EXPORT
898int blpapi_Element_setElementDatetime(blpapi_Element_t *element,
899 const char *nameString,
900 const blpapi_Name_t *name,
901 const blpapi_Datetime_t *value);
902
904
918BLPAPI_EXPORT
919int blpapi_Element_setElementHighPrecisionDatetime(blpapi_Element_t *element,
920 const char *nameString,
921 const blpapi_Name_t *name,
922 const blpapi_HighPrecisionDatetime_t *value);
923
925
939BLPAPI_EXPORT
940int blpapi_Element_setElementBytes(blpapi_Element_t *element,
941 const char *nameString,
942 const blpapi_Name_t *name,
943 const char *value,
944 size_t length);
945
947
960BLPAPI_EXPORT
961int blpapi_Element_setElementFromField(blpapi_Element_t *element,
962 const char *nameString,
963 const blpapi_Name_t *name,
964 blpapi_Element_t *sourcebuffer);
965
967
980BLPAPI_EXPORT
981int blpapi_Element_setElementFromName(blpapi_Element_t *element,
982 const char *elementName,
983 const blpapi_Name_t *name,
984 const blpapi_Name_t *buffer);
985
987
997BLPAPI_EXPORT
998int blpapi_Element_appendElement(
999 blpapi_Element_t *element, blpapi_Element_t **appendedElement);
1000
1002
1018BLPAPI_EXPORT
1019int blpapi_Element_setChoice(blpapi_Element_t *element,
1020 blpapi_Element_t **resultElement,
1021 const char *nameCstr,
1022 const blpapi_Name_t *name,
1023 size_t index);
1024
1027
1028#ifdef __cplusplus
1029}
1030
1031#include <blpapi_exception.h>
1032
1033#include <cassert>
1034#include <sstream>
1035#include <string>
1036#include <type_traits>
1037
1044
1045namespace BloombergLP {
1046namespace blpapi {
1047
1167class Element {
1168
1169 blpapi_Element_t *d_handle_p;
1170
1171 public:
1172 Element();
1178
1179 explicit Element(blpapi_Element_t *element);
1180
1181 // MANIPULATORS
1182
1183 void rebind(blpapi_Element_t *element);
1184
1185 BLPAPI_DEPRECATE_STRING_NAME void setElement(const char *name, bool value);
1197
1198 BLPAPI_DEPRECATE_STRING_NAME void setElement(const char *name, char value);
1210
1211 BLPAPI_DEPRECATE_STRING_NAME void setElement(
1212 const char *name, Int32 value);
1224
1225 BLPAPI_DEPRECATE_STRING_NAME void setElement(
1226 const char *name, Int64 value);
1238
1239 BLPAPI_DEPRECATE_STRING_NAME void setElement(
1240 const char *name, Float32 value);
1252
1253 BLPAPI_DEPRECATE_STRING_NAME void setElement(
1254 const char *name, Float64 value);
1266
1267 BLPAPI_DEPRECATE_STRING_NAME void setElement(
1268 const char *name, const Datetime& value);
1280
1281 BLPAPI_DEPRECATE_STRING_NAME void setElement(
1282 const char *name, const char *value);
1294
1295 BLPAPI_DEPRECATE_STRING_NAME void setElement(
1296 const char *name, const Name& value);
1309
1310 void setElement(const Name& name, bool value);
1320
1321 void setElement(const Name& name, char value);
1331
1332 void setElement(const Name& name, Int32 value);
1342
1343 void setElement(const Name& name, Int64 value);
1353
1354 void setElement(const Name& name, Float32 value);
1364
1365 void setElement(const Name& name, Float64 value);
1375
1376 void setElement(const Name& name, const Datetime& value);
1386
1387 void setElement(const Name& name, const char *value);
1397
1398 void setElement(const Name& name, const std::string& value);
1409
1410 void setElement(const Name& name, const Name& value);
1420
1421 void setElement(const Name& name, const void *value, size_t length);
1431
1432 template <typename BYTES,
1433 typename std::enable_if<IsByteSequence<BYTES>::value, bool>::type
1434 = true>
1435 void setElement(const Name& name, const BYTES& value);
1450
1451 void setValue(bool value, size_t index = 0);
1459
1460 void setValue(char value, size_t index = 0);
1468
1469 void setValue(Int32 value, size_t index = 0);
1477
1478 void setValue(Int64 value, size_t index = 0);
1486
1487 void setValue(Float32 value, size_t index = 0);
1495
1496 void setValue(Float64 value, size_t index = 0);
1504
1505 void setValue(const Datetime& value, size_t index = 0);
1513
1514 void setValue(const char *value, size_t index = 0);
1522
1523 void setValue(const std::string& value, size_t index = 0);
1532
1533 void setValue(const Name& valueName, size_t index = 0);
1542
1543 void setValue(const void *value, size_t length, size_t index);
1551
1552 template <typename BYTES,
1553 typename std::enable_if<IsByteSequence<BYTES>::value, bool>::type
1554 = true>
1555 void setValue(const BYTES& value, size_t index = 0);
1568
1569 void appendValue(bool value);
1578
1579 void appendValue(char value);
1588
1589 void appendValue(Int32 value);
1598
1599 void appendValue(Int64 value);
1608
1609 void appendValue(Float32 value);
1618
1619 void appendValue(Float64 value);
1628
1629 void appendValue(const Datetime& value);
1638
1639 void appendValue(const char *value);
1648
1649 void appendValue(const std::string& value);
1660
1661 void appendValue(const Name& value);
1671
1678
1679 BLPAPI_DEPRECATE_STRING_NAME Element setChoice(const char *selectionName);
1688
1689 Element setChoice(const Name& selectionName);
1696
1697 blpapi_Element_t *handle();
1698
1699 // ACCESSORS
1700
1701 Name name() const;
1709
1710 int datatype() const;
1717
1718 bool isComplexType() const;
1723
1724 bool isArray() const;
1730
1731 bool isNull() const;
1735
1736 bool isReadOnly() const;
1740
1746
1747 size_t numValues() const;
1756
1757 size_t numElements() const;
1764
1765 bool isValid() const;
1771
1772 bool isNullValue(size_t position = 0) const;
1779
1780 BLPAPI_DEPRECATE_STRING_NAME bool hasElement(
1781 const char *name, bool excludeNullElements = false) const;
1789
1790 bool hasElement(const Name& name, bool excludeNullElements = false) const;
1798
1799 int getValueAs(bool *result, size_t index = 0) const;
1807
1808 int getValueAs(char *result, size_t index = 0) const;
1816
1817 int getValueAs(Int32 *result, size_t index = 0) const;
1825
1826 int getValueAs(Int64 *result, size_t index = 0) const;
1834
1835 int getValueAs(Float32 *result, size_t index = 0) const;
1843
1844 int getValueAs(Float64 *result, size_t index = 0) const;
1852
1853 int getValueAs(Datetime *result, size_t index = 0) const;
1864
1865 int getValueAs(std::string *result, size_t index = 0) const;
1873
1874 int getValueAs(Bytes *result, size_t index = 0) const;
1881
1882 int getValueAs(Element *result, size_t index = 0) const;
1890
1891 int getValueAs(Name *result, size_t index = 0) const;
1898
1899 bool getValueAsBool(size_t index = 0) const;
1905
1906 char getValueAsChar(size_t index = 0) const;
1912
1913 Int32 getValueAsInt32(size_t index = 0) const;
1919
1920 Int64 getValueAsInt64(size_t index = 0) const;
1926
1927 Float32 getValueAsFloat32(size_t index = 0) const;
1933
1934 Float64 getValueAsFloat64(size_t index = 0) const;
1940
1941 Datetime getValueAsDatetime(size_t index = 0) const;
1951
1952 const char *getValueAsString(size_t index = 0) const;
1960
1961 Bytes getValueAsBytes(size_t index = 0) const;
1968
1969 Element getValueAsElement(size_t index = 0) const;
1976
1977 Name getValueAsName(size_t index = 0) const;
1983
1984 BLPAPI_DEPRECATE_STRING_NAME int getElement(
1985 Element *result, const char *name) const;
1995
1996 int getElement(Element *result, const Name& name) const;
2004
2005 int getElement(Element *result, size_t position) const;
2013
2014 Element getElement(size_t position) const;
2021
2022 Element getElement(const Name& name) const;
2029
2030 BLPAPI_DEPRECATE_STRING_NAME Element getElement(const char *name) const;
2040
2041 BLPAPI_DEPRECATE_STRING_NAME bool getElementAsBool(const char *name) const;
2051
2052 bool getElementAsBool(const Name& name) const;
2060
2061 BLPAPI_DEPRECATE_STRING_NAME char getElementAsChar(const char *name) const;
2071
2072 char getElementAsChar(const Name& name) const;
2080
2081 BLPAPI_DEPRECATE_STRING_NAME Int32 getElementAsInt32(
2082 const char *name) const;
2092
2093 Int32 getElementAsInt32(const Name& name) const;
2101
2102 BLPAPI_DEPRECATE_STRING_NAME Int64 getElementAsInt64(
2103 const char *name) const;
2113
2114 Int64 getElementAsInt64(const Name& name) const;
2122
2123 BLPAPI_DEPRECATE_STRING_NAME Float32 getElementAsFloat32(
2124 const char *name) const;
2134
2135 Float32 getElementAsFloat32(const Name& name) const;
2143
2144 BLPAPI_DEPRECATE_STRING_NAME Float64 getElementAsFloat64(
2145 const char *name) const;
2155
2156 Float64 getElementAsFloat64(const Name& name) const;
2164
2165 BLPAPI_DEPRECATE_STRING_NAME Datetime getElementAsDatetime(
2166 const char *name) const;
2180
2181 Datetime getElementAsDatetime(const Name& name) const;
2192
2193 BLPAPI_DEPRECATE_STRING_NAME const char *getElementAsString(
2194 const char *name) const;
2205
2206 const char *getElementAsString(const Name& name) const;
2215
2216 Bytes getElementAsBytes(const Name& name) const;
2225
2226 BLPAPI_DEPRECATE_STRING_NAME Name getElementAsName(const char *name) const;
2236
2237 Name getElementAsName(const Name& name) const;
2245
2246 Element getChoice() const;
2251
2252 const blpapi_Element_t *handle() const;
2253
2254 std::ostream& print(
2255 std::ostream& stream, int level = 0, int spacesPerLevel = 4) const;
2268
2269 std::string toJson() const;
2275
2276 void fromJson(const char *json);
2285
2286 void fromJson(const std::string& json);
2296};
2297
2300
2301// FREE OPERATORS
2302std::ostream& operator<<(std::ostream& stream, const Element& element);
2315
2316// ============================================================================
2317// INLINE AND TEMPLATE FUNCTION IMPLEMENTATIONS
2318// ============================================================================
2319
2320// -------------
2321// class Element
2322// -------------
2323
2325 : d_handle_p(0)
2326{
2327}
2328
2329inline Element::Element(blpapi_Element_t *newHandle)
2330 : d_handle_p(newHandle)
2331{
2332}
2333
2334inline void Element::rebind(blpapi_Element_t *element)
2335{
2336 d_handle_p = element;
2337}
2338
2339inline void Element::setElement(const char *elementName, bool value)
2340{
2341 ExceptionUtil::throwOnError(blpapi_Element_setElementBool(
2342 d_handle_p, elementName, 0, value ? 1 : 0));
2343}
2344
2345inline void Element::setElement(const char *elementName, char value)
2346{
2348 blpapi_Element_setElementChar(d_handle_p, elementName, 0, value));
2349}
2350
2351inline void Element::setElement(const char *elementName, Int32 value)
2352{
2354 blpapi_Element_setElementInt32(d_handle_p, elementName, 0, value));
2355}
2356
2357inline void Element::setElement(const char *elementName, Int64 value)
2358{
2360 blpapi_Element_setElementInt64(d_handle_p, elementName, 0, value));
2361}
2362
2363inline void Element::setElement(const char *elementName, Float32 value)
2364{
2365 ExceptionUtil::throwOnError(blpapi_Element_setElementFloat32(
2366 d_handle_p, elementName, 0, value));
2367}
2368
2369inline void Element::setElement(const char *elementName, Float64 value)
2370{
2371 ExceptionUtil::throwOnError(blpapi_Element_setElementFloat64(
2372 d_handle_p, elementName, 0, value));
2373}
2374
2375inline void Element::setElement(const char *elementName, const Datetime& value)
2376{
2379 elementName,
2380 0,
2381 &value.rawHighPrecisionValue()));
2382}
2383
2384inline void Element::setElement(const char *elementName, const char *value)
2385{
2386 ExceptionUtil::throwOnError(blpapi_Element_setElementString(
2387 d_handle_p, elementName, 0, value));
2388}
2389
2390inline void Element::setElement(const char *elementName, const Name& value)
2391{
2392 ExceptionUtil::throwOnError(blpapi_Element_setElementFromName(
2393 d_handle_p, elementName, 0, value.impl()));
2394}
2395
2396inline void Element::setElement(const Name& elementName, bool value)
2397{
2398 ExceptionUtil::throwOnError(blpapi_Element_setElementBool(
2399 d_handle_p, 0, elementName.impl(), value ? 1 : 0));
2400}
2401
2402inline void Element::setElement(const Name& elementName, char value)
2403{
2404 ExceptionUtil::throwOnError(blpapi_Element_setElementChar(
2405 d_handle_p, 0, elementName.impl(), value));
2406}
2407
2408inline void Element::setElement(const Name& elementName, Int32 value)
2409{
2410 ExceptionUtil::throwOnError(blpapi_Element_setElementInt32(
2411 d_handle_p, 0, elementName.impl(), value));
2412}
2413
2414inline void Element::setElement(const Name& elementName, Int64 value)
2415{
2416 ExceptionUtil::throwOnError(blpapi_Element_setElementInt64(
2417 d_handle_p, 0, elementName.impl(), value));
2418}
2419
2420inline void Element::setElement(const Name& elementName, Float32 value)
2421{
2422 ExceptionUtil::throwOnError(blpapi_Element_setElementFloat32(
2423 d_handle_p, 0, elementName.impl(), value));
2424}
2425
2426inline void Element::setElement(const Name& elementName, Float64 value)
2427{
2428 ExceptionUtil::throwOnError(blpapi_Element_setElementFloat64(
2429 d_handle_p, 0, elementName.impl(), value));
2430}
2431
2432inline void Element::setElement(const Name& elementName, const Datetime& value)
2433{
2436 0,
2437 elementName.impl(),
2438 &value.rawHighPrecisionValue()));
2439}
2440
2441inline void Element::setElement(const Name& elementName, const char *value)
2442{
2443 ExceptionUtil::throwOnError(blpapi_Element_setElementString(
2444 d_handle_p, 0, elementName.impl(), value));
2445}
2446
2448 const Name& elementName, const std::string& value)
2449{
2450 setElement(elementName, value.c_str());
2451}
2452
2453inline void Element::setElement(const Name& elementName, const Name& value)
2454{
2455 ExceptionUtil::throwOnError(blpapi_Element_setElementFromName(
2456 d_handle_p, 0, elementName.impl(), value.impl()));
2457}
2458
2460 const Name& elementName, const void *value, size_t length)
2461{
2463 BLPAPI_CALL(blpapi_Element_setElementBytes)(d_handle_p,
2464 0,
2465 elementName.impl(),
2466 reinterpret_cast<const char *>(value),
2467 length));
2468}
2469
2470template <typename BYTES,
2471 typename std::enable_if<IsByteSequence<BYTES>::value, bool>::type>
2472inline void Element::setElement(const Name& elementName, const BYTES& value)
2473{
2474 setElement(elementName, value.data(), value.size());
2475}
2476
2477inline void Element::setValue(bool value, size_t index)
2478{
2480 blpapi_Element_setValueBool(d_handle_p, value, index));
2481}
2482
2483inline void Element::setValue(char value, size_t index)
2484{
2486 blpapi_Element_setValueChar(d_handle_p, value, index));
2487}
2488
2489inline void Element::setValue(Int32 value, size_t index)
2490{
2492 blpapi_Element_setValueInt32(d_handle_p, value, index));
2493}
2494
2495inline void Element::setValue(Int64 value, size_t index)
2496{
2498 blpapi_Element_setValueInt64(d_handle_p, value, index));
2499}
2500
2501inline void Element::setValue(Float32 value, size_t index)
2502{
2504 blpapi_Element_setValueFloat32(d_handle_p, value, index));
2505}
2506
2507inline void Element::setValue(Float64 value, size_t index)
2508{
2510 blpapi_Element_setValueFloat64(d_handle_p, value, index));
2511}
2512
2513inline void Element::setValue(const Datetime& value, size_t index)
2514{
2517 d_handle_p, &value.rawHighPrecisionValue(), index));
2518}
2519
2520inline void Element::setValue(const char *value, size_t index)
2521{
2523 blpapi_Element_setValueString(d_handle_p, value, index));
2524}
2525
2526inline void Element::setValue(const std::string& value, size_t index)
2527{
2528 setValue(value.c_str(), index);
2529}
2530
2531inline void Element::setValue(const Name& valueName, size_t index)
2532{
2533 ExceptionUtil::throwOnError(blpapi_Element_setValueFromName(
2534 d_handle_p, valueName.impl(), index));
2535}
2536
2537inline void Element::setValue(const void *value, size_t length, size_t index)
2538{
2539 ExceptionUtil::throwOnError(BLPAPI_CALL(blpapi_Element_setValueBytes)(
2540 d_handle_p, reinterpret_cast<const char *>(value), length, index));
2541}
2542
2543template <typename BYTES,
2544 typename std::enable_if<IsByteSequence<BYTES>::value, bool>::type>
2545inline void Element::setValue(const BYTES& value, size_t index)
2546{
2547 setValue(value.data(), value.size(), index);
2548}
2549
2550inline void Element::appendValue(bool value)
2551{
2552 ExceptionUtil::throwOnError(blpapi_Element_setValueBool(
2553 d_handle_p, value, BLPAPI_ELEMENT_INDEX_END));
2554}
2555
2556inline void Element::appendValue(char value)
2557{
2558 ExceptionUtil::throwOnError(blpapi_Element_setValueChar(
2559 d_handle_p, value, BLPAPI_ELEMENT_INDEX_END));
2560}
2561
2562inline void Element::appendValue(Int32 value)
2563{
2564 ExceptionUtil::throwOnError(blpapi_Element_setValueInt32(
2565 d_handle_p, value, BLPAPI_ELEMENT_INDEX_END));
2566}
2567
2568inline void Element::appendValue(Int64 value)
2569{
2570 ExceptionUtil::throwOnError(blpapi_Element_setValueInt64(
2571 d_handle_p, value, BLPAPI_ELEMENT_INDEX_END));
2572}
2573
2575{
2576 ExceptionUtil::throwOnError(blpapi_Element_setValueFloat32(
2577 d_handle_p, value, BLPAPI_ELEMENT_INDEX_END));
2578}
2579
2581{
2582 ExceptionUtil::throwOnError(blpapi_Element_setValueFloat64(
2583 d_handle_p, value, BLPAPI_ELEMENT_INDEX_END));
2584}
2585
2586inline void Element::appendValue(const Datetime& value)
2587{
2590 &value.rawHighPrecisionValue(),
2591 BLPAPI_ELEMENT_INDEX_END));
2592}
2593
2594inline void Element::appendValue(const char *value)
2595{
2596 ExceptionUtil::throwOnError(blpapi_Element_setValueString(
2597 d_handle_p, value, BLPAPI_ELEMENT_INDEX_END));
2598}
2599
2600inline void Element::appendValue(const std::string& value)
2601{
2602 appendValue(value.c_str());
2603}
2604
2605inline void Element::appendValue(const Name& valueName)
2606{
2607 ExceptionUtil::throwOnError(blpapi_Element_setValueFromName(
2608 d_handle_p, valueName.impl(), BLPAPI_ELEMENT_INDEX_END));
2609}
2610
2612{
2613 blpapi_Element_t *appendedElement = 0;
2615 blpapi_Element_appendElement(d_handle_p, &appendedElement));
2616 return Element(appendedElement);
2617}
2618
2619inline Element Element::setChoice(const char *selectionName)
2620{
2621 blpapi_Element_t *resultElement = 0;
2622 ExceptionUtil::throwOnError(blpapi_Element_setChoice(
2623 d_handle_p, &resultElement, selectionName, 0, 0));
2624 return Element(resultElement);
2625}
2626
2627inline Element Element::setChoice(const Name& selectionName)
2628{
2629 blpapi_Element_t *resultElement = 0;
2630 ExceptionUtil::throwOnError(blpapi_Element_setChoice(
2631 d_handle_p, &resultElement, 0, selectionName.impl(), 0));
2632 return Element(resultElement);
2633}
2634
2635inline blpapi_Element_t *Element::handle() { return d_handle_p; }
2636
2637inline Name Element::name() const
2638{
2639 return Name(blpapi_Element_name(d_handle_p));
2640}
2641
2642inline int Element::getElement(Element *element, const char *nameString) const
2643{
2644 assert(element);
2645
2646 blpapi_Element_t *fldt = 0;
2647 int rc = blpapi_Element_getElement(d_handle_p, &fldt, nameString, 0);
2648 if (!rc) {
2649 element->rebind(fldt);
2650 }
2651
2652 return rc;
2653}
2654
2655inline int Element::getElement(Element *element, const Name& elementName) const
2656{
2657 assert(element);
2658
2659 blpapi_Element_t *fldt = 0;
2660 int rc = blpapi_Element_getElement(
2661 d_handle_p, &fldt, 0, elementName.impl());
2662 if (!rc) {
2663 element->rebind(fldt);
2664 }
2665
2666 return rc;
2667}
2668
2669inline int Element::getElement(Element *element, size_t position) const
2670{
2671 assert(element);
2672
2673 blpapi_Element_t *fldt = 0;
2674 int rc = blpapi_Element_getElementAt(d_handle_p, &fldt, position);
2675 if (!rc) {
2676 element->rebind(fldt);
2677 }
2678
2679 return rc;
2680}
2681
2682inline int Element::datatype() const
2683{
2684 return blpapi_Element_datatype(d_handle_p);
2685}
2686
2687inline bool Element::isComplexType() const
2688{
2689 return blpapi_Element_isComplexType(d_handle_p) ? true : false;
2690}
2691
2692inline bool Element::isArray() const
2693{
2694 return blpapi_Element_isArray(d_handle_p) ? true : false;
2695}
2696
2697inline bool Element::isNull() const
2698{
2699 return blpapi_Element_isNull(d_handle_p) ? true : false;
2700}
2701
2702inline bool Element::isReadOnly() const
2703{
2704 return blpapi_Element_isReadOnly(d_handle_p) ? true : false;
2705}
2706
2708{
2709 return SchemaElementDefinition(blpapi_Element_definition(d_handle_p));
2710}
2711
2712inline size_t Element::numValues() const
2713{
2714 return blpapi_Element_numValues(d_handle_p);
2715}
2716
2717inline size_t Element::numElements() const
2718{
2719 return blpapi_Element_numElements(d_handle_p);
2720}
2721
2722inline bool Element::isValid() const { return d_handle_p ? true : false; }
2723
2724inline bool Element::isNullValue(size_t position) const
2725{
2726 int rc = blpapi_Element_isNullValue(d_handle_p, position);
2727 if (rc != 0 && rc != 1) {
2729 }
2730 return rc ? true : false;
2731}
2732
2734 const char *nameString, bool excludeNullElements) const
2735{
2736 if (excludeNullElements) {
2737 return (blpapi_Element_hasElementEx(
2738 d_handle_p, nameString, 0, excludeNullElements, 0)
2739 ? true
2740 : false);
2741 }
2742 return blpapi_Element_hasElement(d_handle_p, nameString, 0) ? true : false;
2743}
2744
2746 const Name& elementName, bool excludeNullElements) const
2747{
2748 if (excludeNullElements) {
2749 return (blpapi_Element_hasElementEx(d_handle_p,
2750 0,
2751 elementName.impl(),
2752 excludeNullElements,
2753 0)
2754 ? true
2755 : false);
2756 }
2757 return blpapi_Element_hasElement(d_handle_p, 0, elementName.impl())
2758 ? true
2759 : false;
2760}
2761
2762inline Element Element::getElement(const Name& elementName) const
2763{
2764 blpapi_Element_t *fldt = 0;
2765 ExceptionUtil::throwOnError(blpapi_Element_getElement(
2766 d_handle_p, &fldt, 0, elementName.impl()));
2767 return Element(fldt);
2768}
2769
2770inline Element Element::getElement(const char *elementName) const
2771{
2772 blpapi_Element_t *fldt = 0;
2774 blpapi_Element_getElement(d_handle_p, &fldt, elementName, 0));
2775 return Element(fldt);
2776}
2777
2778inline Element Element::getElement(size_t position) const
2779{
2780 blpapi_Element_t *element = 0;
2782 blpapi_Element_getElementAt(d_handle_p, &element, position));
2783 return Element(element);
2784}
2785
2786inline int Element::getValueAs(bool *buffer, size_t index) const
2787{
2788 assert(buffer);
2789
2790 blpapi_Bool_t tmp = false;
2791
2792 int res = blpapi_Element_getValueAsBool(d_handle_p, &tmp, index);
2793 *buffer = tmp ? true : false;
2794 return res;
2795}
2796
2797inline int Element::getValueAs(char *buffer, size_t index) const
2798{
2799 return blpapi_Element_getValueAsChar(d_handle_p, buffer, index);
2800}
2801
2802inline int Element::getValueAs(Int32 *buffer, size_t index) const
2803{
2804 return blpapi_Element_getValueAsInt32(d_handle_p, buffer, index);
2805}
2806
2807inline int Element::getValueAs(Int64 *buffer, size_t index) const
2808{
2809 return blpapi_Element_getValueAsInt64(d_handle_p, buffer, index);
2810}
2811
2812inline int Element::getValueAs(Float32 *buffer, size_t index) const
2813{
2814 return blpapi_Element_getValueAsFloat32(d_handle_p, buffer, index);
2815}
2816
2817inline int Element::getValueAs(Float64 *buffer, size_t index) const
2818{
2819 return blpapi_Element_getValueAsFloat64(d_handle_p, buffer, index);
2820}
2821
2822inline int Element::getValueAs(Datetime *buffer, size_t index) const
2823{
2825 d_handle_p, buffer, index);
2826}
2827
2828inline int Element::getValueAs(std::string *result, size_t index) const
2829{
2830 assert(result);
2831
2832 const char *buffer = 0;
2833 int rc = blpapi_Element_getValueAsString(d_handle_p, &buffer, index);
2834 if (!rc) {
2835 *result = buffer;
2836 }
2837 return rc;
2838}
2839
2840inline int Element::getValueAs(Bytes *result, size_t index) const
2841{
2842 assert(result);
2843
2844 const char *buffer = 0;
2845 size_t length = 0;
2846 const int rc = BLPAPI_CALL(blpapi_Element_getValueAsBytes)(
2847 d_handle_p, &buffer, &length, index);
2848 if (!rc) {
2849 result->assign(buffer, length);
2850 }
2851 return rc;
2852}
2853
2854inline int Element::getValueAs(Element *buffer, size_t index) const
2855{
2856 assert(buffer);
2857
2858 return blpapi_Element_getValueAsElement(
2859 d_handle_p, &buffer->d_handle_p, index);
2860}
2861
2862inline int Element::getValueAs(Name *buffer, size_t index) const
2863{
2864 assert(buffer);
2865
2866 blpapi_Name_t *tmpName = 0;
2867 int res = blpapi_Element_getValueAsName(d_handle_p, &tmpName, index);
2868 if (!res) {
2869 *buffer = Name(tmpName);
2870 }
2871 return res;
2872}
2873
2874inline bool Element::getValueAsBool(size_t index) const
2875{
2876 bool value = false;
2878 return value;
2879}
2880
2881inline char Element::getValueAsChar(size_t index) const
2882{
2883 char value = 0;
2885 return value;
2886}
2887
2888inline Int32 Element::getValueAsInt32(size_t index) const
2889{
2890 Int32 value = 0;
2892 return value;
2893}
2894
2895inline Int64 Element::getValueAsInt64(size_t index) const
2896{
2897 Int64 value = 0;
2899 return value;
2900}
2901
2902inline Float32 Element::getValueAsFloat32(size_t index) const
2903{
2904 Float32 value = 0.0;
2906 return value;
2907}
2908
2909inline Float64 Element::getValueAsFloat64(size_t index) const
2910{
2911 Float64 value = 0.0;
2913 return value;
2914}
2915
2916inline Datetime Element::getValueAsDatetime(size_t index) const
2917{
2918 Datetime value;
2920 return value;
2921}
2922
2923inline const char *Element::getValueAsString(size_t index) const
2924{
2925 const char *tmpStringBuffer = 0;
2926 ExceptionUtil::throwOnError(blpapi_Element_getValueAsString(
2927 d_handle_p, &tmpStringBuffer, index));
2928 return tmpStringBuffer;
2929}
2930
2931inline Bytes Element::getValueAsBytes(size_t index) const
2932{
2933 Bytes value;
2935 return value;
2936}
2937
2938inline Element Element::getValueAsElement(size_t index) const
2939{
2940 blpapi_Element_t *element = 0;
2942 blpapi_Element_getValueAsElement(d_handle_p, &element, index));
2943 return Element(element);
2944}
2945
2946inline Name Element::getValueAsName(size_t index) const
2947{
2948 blpapi_Name_t *nameValue = 0;
2950 blpapi_Element_getValueAsName(d_handle_p, &nameValue, index));
2951 return Name(nameValue);
2952}
2953
2955{
2956 blpapi_Element_t *element = 0;
2958 blpapi_Element_getChoice(d_handle_p, &element));
2959 return Element(element);
2960}
2961
2962inline bool Element::getElementAsBool(const char *elementName) const
2963{
2964 return getElement(Name(elementName)).getValueAsBool();
2965}
2966
2967inline bool Element::getElementAsBool(const Name& elementName) const
2968{
2969 return getElement(elementName).getValueAsBool();
2970}
2971
2972inline char Element::getElementAsChar(const char *elementName) const
2973{
2974 return getElement(Name(elementName)).getValueAsChar();
2975}
2976
2977inline char Element::getElementAsChar(const Name& elementName) const
2978{
2979 return getElement(elementName).getValueAsChar();
2980}
2981
2982inline Int32 Element::getElementAsInt32(const char *elementName) const
2983{
2984 return getElement(Name(elementName)).getValueAsInt32();
2985}
2986
2987inline Int32 Element::getElementAsInt32(const Name& elementName) const
2988{
2989 return getElement(elementName).getValueAsInt32();
2990}
2991
2992inline Int64 Element::getElementAsInt64(const char *elementName) const
2993{
2994 return getElement(Name(elementName)).getValueAsInt64();
2995}
2996
2997inline Int64 Element::getElementAsInt64(const Name& elementName) const
2998{
2999 return getElement(elementName).getValueAsInt64();
3000}
3001
3002inline Float32 Element::getElementAsFloat32(const char *elementName) const
3003{
3004 return getElement(Name(elementName)).getValueAsFloat32();
3005}
3006
3007inline Float32 Element::getElementAsFloat32(const Name& elementName) const
3008{
3009 return getElement(elementName).getValueAsFloat32();
3010}
3011
3012inline Float64 Element::getElementAsFloat64(const char *elementName) const
3013{
3014 return getElement(Name(elementName)).getValueAsFloat64();
3015}
3016
3017inline Float64 Element::getElementAsFloat64(const Name& elementName) const
3018{
3019 return getElement(elementName).getValueAsFloat64();
3020}
3021
3022inline Datetime Element::getElementAsDatetime(const char *elementName) const
3023{
3024 return getElement(Name(elementName)).getValueAsDatetime();
3025}
3026
3027inline Datetime Element::getElementAsDatetime(const Name& elementName) const
3028{
3029 return getElement(elementName).getValueAsDatetime();
3030}
3031
3032inline const char *Element::getElementAsString(const char *elementName) const
3033{
3034 return getElement(Name(elementName)).getValueAsString();
3035}
3036
3037inline const char *Element::getElementAsString(const Name& elementName) const
3038{
3039 return getElement(elementName).getValueAsString();
3040}
3041
3042inline Bytes Element::getElementAsBytes(const Name& elementName) const
3043{
3044 return getElement(elementName).getValueAsBytes();
3045}
3046
3047inline Name Element::getElementAsName(const char *elementName) const
3048{
3049 return getElement(Name(elementName)).getValueAsName();
3050}
3051
3052inline Name Element::getElementAsName(const Name& elementName) const
3053{
3054 return getElement(elementName).getValueAsName();
3055}
3056
3057inline const blpapi_Element_t *Element::handle() const { return d_handle_p; }
3058
3059inline std::ostream& Element::print(
3060 std::ostream& stream, int level, int spacesPerLevel) const
3061{
3062 blpapi_Element_print(d_handle_p,
3064 &stream,
3065 level,
3066 spacesPerLevel);
3067 return stream;
3068}
3069
3070inline std::string Element::toJson() const
3071{
3072 std::ostringstream stream;
3073 ExceptionUtil::throwOnError(blpapi_Element_toJson(
3074 d_handle_p, StreamProxyOstream::writeToStream, &stream));
3075 return stream.str();
3076}
3077
3078inline void Element::fromJson(const char *json)
3079{
3080 ExceptionUtil::throwOnError(blpapi_Element_fromJson(d_handle_p, json));
3081}
3082
3083inline void Element::fromJson(const std::string& json)
3084{
3085 fromJson(json.c_str());
3086}
3087
3088inline std::ostream& operator<<(std::ostream& stream, const Element& element)
3089{
3090 element.print(stream, 0, -1);
3091 return stream;
3092}
3093
3094} // close namespace blpapi
3095} // close namespace BloombergLP
3096
3097#endif // #ifdef __cplusplus
3098#endif // #ifndef INCLUDED_BLPAPI_ELEMENT
Provide functions for dispatchtbl.
#define BLPAPI_CALL_ELEMENT_GETVALUEASHIGHPRECISIONDATETIME(a1, a2, a3)
Definition blpapi_call.h:411
#define BLPAPI_CALL_ELEMENT_SETELEMENTHIGHPRECISIONDATETIME(a1, a2, a3, a4)
Definition blpapi_call.h:409
#define BLPAPI_CALL_ELEMENT_SETVALUEHIGHPRECISIONDATETIME(a1, a2, a3)
Definition blpapi_call.h:407
#define BLPAPI_CALL(FUNCNAME)
Definition blpapi_call.h:361
Represents a date and/or time.
Common definitions used by the library.
Defines Exceptions that can be thrown by the blpapi library.
Provide a representation of strings for use as container keys.
Provide a representation of a schema describing structured messages.
A signature for callback on print and default C++ implementation.
Provide BLPAPI types.
Definition blpapi_types.h:323
void assign(pointer ptr, size_type length) noexcept
Definition blpapi_types.h:507
Definition blpapi_datetime.h:273
blpapi_HighPrecisionDatetime_t & rawHighPrecisionValue()
Definition blpapi_datetime.h:1982
Definition blpapi_element.h:1167
Datetime getElementAsDatetime(const char *name) const
Definition blpapi_element.h:3022
Name name() const
Definition blpapi_element.h:2637
void rebind(blpapi_Element_t *element)
Definition blpapi_element.h:2334
int getValueAs(bool *result, size_t index=0) const
Definition blpapi_element.h:2786
Element setChoice(const char *selectionName)
Definition blpapi_element.h:2619
Bytes getElementAsBytes(const Name &name) const
Definition blpapi_element.h:3042
bool isNullValue(size_t position=0) const
Definition blpapi_element.h:2724
int getElement(Element *result, const char *name) const
Definition blpapi_element.h:2642
Float64 getValueAsFloat64(size_t index=0) const
Definition blpapi_element.h:2909
Element getValueAsElement(size_t index=0) const
Definition blpapi_element.h:2938
Name getValueAsName(size_t index=0) const
Definition blpapi_element.h:2946
int datatype() const
Definition blpapi_element.h:2682
Name getElementAsName(const char *name) const
Definition blpapi_element.h:3047
Int64 getValueAsInt64(size_t index=0) const
Definition blpapi_element.h:2895
Bytes getValueAsBytes(size_t index=0) const
Definition blpapi_element.h:2931
blpapi_Element_t * handle()
Definition blpapi_element.h:2635
Float64 getElementAsFloat64(const char *name) const
Definition blpapi_element.h:3012
size_t numValues() const
Definition blpapi_element.h:2712
bool isReadOnly() const
Definition blpapi_element.h:2702
bool hasElement(const char *name, bool excludeNullElements=false) const
Definition blpapi_element.h:2733
void appendValue(bool value)
Definition blpapi_element.h:2550
bool isValid() const
Definition blpapi_element.h:2722
bool getElementAsBool(const char *name) const
Definition blpapi_element.h:2962
bool getValueAsBool(size_t index=0) const
Definition blpapi_element.h:2874
std::ostream & print(std::ostream &stream, int level=0, int spacesPerLevel=4) const
Definition blpapi_element.h:3059
void setValue(bool value, size_t index=0)
Definition blpapi_element.h:2477
char getElementAsChar(const char *name) const
Definition blpapi_element.h:2972
Element appendElement()
Definition blpapi_element.h:2611
const char * getValueAsString(size_t index=0) const
Definition blpapi_element.h:2923
bool isComplexType() const
Definition blpapi_element.h:2687
char getValueAsChar(size_t index=0) const
Definition blpapi_element.h:2881
void setElement(const char *name, bool value)
Definition blpapi_element.h:2339
std::string toJson() const
Definition blpapi_element.h:3070
void fromJson(const char *json)
Definition blpapi_element.h:3078
Element()
Definition blpapi_element.h:2324
Datetime getValueAsDatetime(size_t index=0) const
Definition blpapi_element.h:2916
bool isNull() const
Definition blpapi_element.h:2697
SchemaElementDefinition elementDefinition() const
Definition blpapi_element.h:2707
Int64 getElementAsInt64(const char *name) const
Definition blpapi_element.h:2992
Int32 getElementAsInt32(const char *name) const
Definition blpapi_element.h:2982
Element getChoice() const
Definition blpapi_element.h:2954
Float32 getValueAsFloat32(size_t index=0) const
Definition blpapi_element.h:2902
bool isArray() const
Definition blpapi_element.h:2692
Int32 getValueAsInt32(size_t index=0) const
Definition blpapi_element.h:2888
const char * getElementAsString(const char *name) const
Definition blpapi_element.h:3032
Float32 getElementAsFloat32(const char *name) const
Definition blpapi_element.h:3002
size_t numElements() const
Definition blpapi_element.h:2717
static void throwOnError(int errorCode)
Definition blpapi_exception.h:541
Definition blpapi_name.h:242
blpapi_Name_t * impl() const
Definition blpapi_name.h:495
Definition blpapi_schema.h:342
Definition blpapi_abstractsession.h:212
blpapi_Float64_t Float64
Definition blpapi_types.h:485
blpapi_Float32_t Float32
Definition blpapi_types.h:484
blpapi_Int64_t Int64
Definition blpapi_types.h:482
std::ostream & operator<<(std::ostream &os, const CorrelationId &correlator)
Definition blpapi_correlationid.h:680
blpapi_Int32_t Int32
Definition blpapi_types.h:480
Definition blpapi_abstractsession.h:211
static int writeToStream(const char *data, int length, void *stream)
Definition blpapi_streamproxy.h:109