BLPAPI C++ 3.26.4
Loading...
Searching...
No Matches
blpapi_eventformatter.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_EVENTFORMATTER
29#define INCLUDED_BLPAPI_EVENTFORMATTER
30
59#include <blpapi_call.h>
60#include <blpapi_defs.h>
61#include <blpapi_deprecate.h>
62#include <blpapi_element.h>
63#include <blpapi_event.h>
64#include <blpapi_topic.h>
65#include <blpapi_types.h>
66
67#include <stddef.h>
68
69#ifdef __cplusplus
70extern "C" {
71#endif
72
75
78
81 const char *typeString,
82 blpapi_Name_t *typeName,
83 const blpapi_Topic_t *topic);
84
87 const char *typeString,
88 blpapi_Name_t *typeName,
89 const blpapi_Topic_t *topic,
90 unsigned int sequenceNumber,
91 unsigned int);
92
95 const char *typeString,
96 blpapi_Name_t *typeName);
97
100 blpapi_EventFormatter_t *formatter,
101 const blpapi_Topic_t *topic,
102 const blpapi_CorrelationId_t *cid);
103
106 blpapi_EventFormatter_t *formatter,
107 const blpapi_Topic_t *topic,
108 const blpapi_CorrelationId_t *cid,
109 unsigned int sequenceNumber,
110 unsigned int);
111
114 blpapi_EventFormatter_t *formatter,
115 const char *typeString,
116 blpapi_Name_t *typeName,
117 const blpapi_Topic_t *topic,
118 const blpapi_CorrelationId_t *cid,
119 int fragmentType);
120
123 blpapi_EventFormatter_t *formatter,
124 const char *typeString,
125 blpapi_Name_t *typeName,
126 const blpapi_Topic_t *topic,
127 int fragmentType,
128 unsigned int sequenceNumber);
129
132 const char *typeString,
133 const blpapi_Name_t *typeName,
134 blpapi_Bool_t value);
135
138 const char *typeString,
139 const blpapi_Name_t *typeName,
140 char value);
141
144 const char *typeString,
145 const blpapi_Name_t *typeName,
146 blpapi_Int32_t value);
147
150 const char *typeString,
151 const blpapi_Name_t *typeName,
152 blpapi_Int64_t value);
153
156 const char *typeString,
157 const blpapi_Name_t *typeName,
158 blpapi_Float32_t value);
159
162 const char *typeString,
163 const blpapi_Name_t *typeName,
164 blpapi_Float64_t value);
165
168 const char *typeString,
169 const blpapi_Name_t *typeName,
170 const blpapi_Datetime_t *value);
171
174 blpapi_EventFormatter_t *formatter,
175 const char *typeString,
176 const blpapi_Name_t *typeName,
177 const blpapi_HighPrecisionDatetime_t *value);
178
181 const char *typeString,
182 const blpapi_Name_t *typeName,
183 const char *value);
184
187 const char *typeString,
188 const blpapi_Name_t *typeName,
189 const blpapi_Name_t *value);
190
193 const char *typeString,
194 const blpapi_Name_t *typeName,
195 const char *value,
196 size_t length);
197
200 const char *typeString,
201 const blpapi_Name_t *typeName);
202
205 const char *typeString,
206 const blpapi_Name_t *typeName);
207
210
213 blpapi_EventFormatter_t *formatter, blpapi_Bool_t value);
214
217 blpapi_EventFormatter_t *formatter, char value);
218
221 blpapi_EventFormatter_t *formatter, blpapi_Int32_t value);
222
225 blpapi_EventFormatter_t *formatter, blpapi_Int64_t value);
226
229 blpapi_EventFormatter_t *formatter, blpapi_Float32_t value);
230
233 blpapi_EventFormatter_t *formatter, blpapi_Float64_t value);
234
237 blpapi_EventFormatter_t *formatter, const blpapi_Datetime_t *value);
238
241 blpapi_EventFormatter_t *formatter,
242 const blpapi_HighPrecisionDatetime_t *value);
243
246 blpapi_EventFormatter_t *formatter, const char *value);
247
250 blpapi_EventFormatter_t *formatter, const blpapi_Name_t *value);
251
254
257 blpapi_EventFormatter_t *formatter,
259
262 blpapi_EventFormatter_t *formatter, blpapi_Element_t **element);
263
264#ifdef __cplusplus
265}
266
267#include <string>
268#include <type_traits>
269
277namespace BloombergLP {
278namespace blpapi {
279
318
319 blpapi_EventFormatter_t *d_handle;
320
321 private:
322 EventFormatter& operator=(const EventFormatter&);
325
326 public:
327 explicit EventFormatter(Event& event);
340 void appendMessage(const Name& messageType, const Topic& topic);
348 void appendMessage(const Name& messageType,
349 const Topic& topic,
350 unsigned int sequenceNumber);
362 void appendResponse(const Name& operationName);
374 void appendRecapMessage(const Topic& topic, const CorrelationId *cid = 0);
394 const Topic& topic, Message::Fragment fragmentType);
410 void appendRecapMessage(const Name& messageType,
411 const Topic& topic,
430 void appendRecapMessage(const Topic& topic,
431 unsigned int sequenceNumber,
432 const CorrelationId *cid = 0);
455 void appendRecapMessage(const Name& messageType,
456 const Topic& topic,
457 unsigned int sequenceNumber);
471 void appendRecapMessage(const Topic& topic,
472 Message::Fragment fragmentType,
473 unsigned int sequenceNumber);
494 void appendRecapMessage(const Name& messageType,
495 const Topic& topic,
496 Message::Fragment fragmentType,
497 unsigned int sequenceNumber);
518 void appendRecapMessage(const CorrelationId& cid,
539 void appendRecapMessage(const Name& messageType,
540 const CorrelationId& cid,
561 void setElement(const Name& name, bool value);
571 void setElement(const Name& name, char value);
581 void setElement(const Name& name, Int32 value);
591 void setElement(const Name& name, Int64 value);
601 void setElement(const Name& name, Float32 value);
611 void setElement(const Name& name, Float64 value);
621 void setElement(const Name& name, const Datetime& value);
632 void setElement(const Name& name, const Datetime::HighPrecision& value);
644 void setElement(const Name& name, const char *value);
657 void setElement(const Name& name, const std::string& value);
668 void setElement(const Name& name, const Name& value);
678 void setElement(const Name& name, const void *value, size_t length);
692 template <typename BYTES,
693 typename std::enable_if<IsByteSequence<BYTES>::value, bool>::type
694 = true>
695 void setElement(const Name& name, const BYTES& value);
711 void setElementNull(const Name& name);
722 void pushElement(const Name& name);
740 void popElement();
750 void appendValue(bool value);
757 void appendValue(char value);
764 void appendValue(Int32 value);
771 void appendValue(Int64 value);
778 void appendValue(Float32 value);
785 void appendValue(Float64 value);
792 void appendValue(const char *value);
799 void appendValue(const std::string& value);
806 void appendValue(const Name& value);
813 void appendValue(const Datetime& value);
820 void appendValue(const Datetime::HighPrecision& value);
827 void appendElement();
838 BLPAPI_DEPRECATE_STRING_NAME void appendMessage(
839 const char *messageType, const Topic& topic);
849 BLPAPI_DEPRECATE_STRING_NAME void appendMessage(const char *messageType,
850 const Topic& topic,
851 unsigned int sequenceNumber);
865 BLPAPI_DEPRECATE_STRING_NAME void appendResponse(
866 const char *operationName);
879 BLPAPI_DEPRECATE_STRING_NAME void appendRecapMessage(
880 const char *messageType,
881 const Topic& topic,
903 BLPAPI_DEPRECATE_STRING_NAME void appendRecapMessage(
904 const char *messageType,
905 const Topic& topic,
906 unsigned int sequenceNumber);
922 BLPAPI_DEPRECATE_STRING_NAME void appendRecapMessage(
923 const char *messageType,
924 const Topic& topic,
925 Message::Fragment fragmentType,
926 unsigned int sequenceNumber);
949 BLPAPI_DEPRECATE_STRING_NAME void appendRecapMessage(
950 const char *messageType,
951 const CorrelationId& cid,
974 BLPAPI_DEPRECATE_STRING_NAME void setElement(const char *name, bool value);
990 BLPAPI_DEPRECATE_STRING_NAME void setElement(const char *name, char value);
1006 BLPAPI_DEPRECATE_STRING_NAME void setElement(
1007 const char *name, Int32 value);
1023 BLPAPI_DEPRECATE_STRING_NAME void setElement(
1024 const char *name, Int64 value);
1040 BLPAPI_DEPRECATE_STRING_NAME void setElement(
1041 const char *name, Float32 value);
1057 BLPAPI_DEPRECATE_STRING_NAME void setElement(
1058 const char *name, Float64 value);
1074 BLPAPI_DEPRECATE_STRING_NAME void setElement(
1075 const char *name, const Datetime& value);
1092 BLPAPI_DEPRECATE_STRING_NAME void setElement(
1093 const char *name, const Datetime::HighPrecision& value);
1111 BLPAPI_DEPRECATE_STRING_NAME void setElement(
1112 const char *name, const char *value);
1131 BLPAPI_DEPRECATE_STRING_NAME void setElement(
1132 const char *name, const Name& value);
1148 BLPAPI_DEPRECATE_STRING_NAME void setElementNull(const char *name);
1165 BLPAPI_DEPRECATE_STRING_NAME void pushElement(const char *name);
1189 void fromJson(const char *json);
1202 void fromJson(const std::string& json);
1217 const blpapi_EventFormatter_t *handle() const;
1222 blpapi_EventFormatter_t *handle();
1227};
1228
1232// ============================================================================
1233// INLINE AND TEMPLATE FUNCTION IMPLEMENTATIONS
1234// ============================================================================
1235
1236// --------------------
1237// class EventFormatter
1238// --------------------
1239
1240inline EventFormatter::EventFormatter(Event& event)
1241{
1242 d_handle = blpapi_EventFormatter_create(event.impl());
1243}
1244
1249
1251 const char *messageType, const Topic& topic)
1252{
1254 d_handle, messageType, 0, topic.impl()));
1255}
1256
1258 const Name& messageType, const Topic& topic)
1259{
1261 d_handle, 0, messageType.impl(), topic.impl()));
1262}
1263
1264inline void EventFormatter::appendMessage(const char *messageType,
1265 const Topic& topic,
1266 unsigned int sequenceNumber)
1267{
1269 d_handle, messageType, 0, topic.impl(), sequenceNumber, 0));
1270}
1271
1272inline void EventFormatter::appendMessage(const Name& messageType,
1273 const Topic& topic,
1274 unsigned int sequenceNumber)
1275{
1277 d_handle, 0, messageType.impl(), topic.impl(), sequenceNumber, 0));
1278}
1279
1280inline void EventFormatter::appendResponse(const char *operationName)
1281{
1283 blpapi_EventFormatter_appendResponse(d_handle, operationName, 0));
1284}
1285
1286inline void EventFormatter::appendResponse(const Name& operationName)
1287{
1289 d_handle, 0, operationName.impl()));
1290}
1291
1293 const Topic& topic, const CorrelationId *cid)
1294{
1296 d_handle, topic.impl(), cid ? &cid->impl() : 0));
1297}
1298
1300 const Topic& topic, Message::Fragment fragmentType)
1301{
1304 0, // 'typeString'
1305 0, // 'typeName'
1306 topic.impl(), // 'topic'
1307 0, // 'cid'
1308 static_cast<int>(fragmentType)));
1309}
1310
1311inline void EventFormatter::appendRecapMessage(const Name& messageType,
1312 const Topic& topic,
1313 Message::Fragment fragmentType)
1314{
1317 0, // 'typeString'
1318 messageType.impl(), // 'typeName'
1319 topic.impl(), // 'topic'
1320 0, // 'cid'
1321 static_cast<int>(fragmentType)));
1322}
1323
1324inline void EventFormatter::appendRecapMessage(const char *messageType,
1325 const Topic& topic,
1326 Message::Fragment fragmentType)
1327{
1330 messageType, // 'typeString'
1331 0, // 'typeName'
1332 topic.impl(), // 'topic'
1333 0, // 'cid'
1334 static_cast<int>(fragmentType)));
1335}
1336
1338 unsigned int sequenceNumber,
1339 const CorrelationId *cid)
1340{
1343 topic.impl(),
1344 cid ? &cid->impl() : 0,
1345 sequenceNumber,
1346 0));
1347}
1348
1349inline void EventFormatter::appendRecapMessage(const Name& messageType,
1350 const Topic& topic,
1351 unsigned int sequenceNumber)
1352{
1355 0, // 'typeString'
1356 messageType.impl(), // 'typeName'
1357 topic.impl(), // 'topic'
1358 static_cast<int>(Message::FRAGMENT_NONE),
1359 sequenceNumber));
1360}
1361
1362inline void EventFormatter::appendRecapMessage(const char *messageType,
1363 const Topic& topic,
1364 unsigned int sequenceNumber)
1365{
1368 messageType, // 'typeString'
1369 0, // 'typeName'
1370 topic.impl(), // 'topic'
1371 static_cast<int>(Message::FRAGMENT_NONE),
1372 sequenceNumber));
1373}
1374
1376 Message::Fragment fragmentType,
1377 unsigned int sequenceNumber)
1378{
1381 0, // 'typeString'
1382 0, // 'typeName'
1383 topic.impl(), // 'topic'
1384 static_cast<int>(fragmentType),
1385 sequenceNumber));
1386}
1387
1388inline void EventFormatter::appendRecapMessage(const Name& messageType,
1389 const Topic& topic,
1390 Message::Fragment fragmentType,
1391 unsigned int sequenceNumber)
1392{
1395 0, // 'typeString'
1396 messageType.impl(), // 'typeName'
1397 topic.impl(), // 'topic'
1398 static_cast<int>(fragmentType),
1399 sequenceNumber));
1400}
1401
1402inline void EventFormatter::appendRecapMessage(const char *messageType,
1403 const Topic& topic,
1404 Message::Fragment fragmentType,
1405 unsigned int sequenceNumber)
1406{
1409 messageType, // 'typeString'
1410 0, // 'typeName'
1411 topic.impl(), // 'topic'
1412 static_cast<int>(fragmentType),
1413 sequenceNumber));
1414}
1415
1417 const CorrelationId& cid, Message::Fragment fragmentType)
1418{
1421 0, // 'typeString'
1422 0, // 'typeName'
1423 0, // 'topic'
1424 &cid.impl(), // 'cid'
1425 static_cast<int>(fragmentType)));
1426}
1427
1428inline void EventFormatter::appendRecapMessage(const Name& messageType,
1429 const CorrelationId& cid,
1430 Message::Fragment fragmentType)
1431{
1434 0, // 'typeString'
1435 messageType.impl(), // 'typeName'
1436 0, // 'topic'
1437 &cid.impl(), // 'cid'
1438 static_cast<int>(fragmentType)));
1439}
1440
1441inline void EventFormatter::appendRecapMessage(const char *messageType,
1442 const CorrelationId& cid,
1443 Message::Fragment fragmentType)
1444{
1447 messageType, // 'typeString'
1448 0, // 'typeName'
1449 0, // 'topic'
1450 &cid.impl(), // 'cid'
1451 static_cast<int>(fragmentType)));
1452}
1453
1454inline void EventFormatter::setElement(const char *name, bool value)
1455{
1457 blpapi_EventFormatter_setValueBool(d_handle, name, 0, value));
1458}
1459
1460inline void EventFormatter::setElement(const char *name, char value)
1461{
1463 blpapi_EventFormatter_setValueChar(d_handle, name, 0, value));
1464}
1465
1466inline void EventFormatter::setElement(const char *name, Int32 value)
1467{
1469 blpapi_EventFormatter_setValueInt32(d_handle, name, 0, value));
1470}
1471
1472inline void EventFormatter::setElement(const char *name, Int64 value)
1473{
1475 blpapi_EventFormatter_setValueInt64(d_handle, name, 0, value));
1476}
1477
1478inline void EventFormatter::setElement(const char *name, Float32 value)
1479{
1481 blpapi_EventFormatter_setValueFloat32(d_handle, name, 0, value));
1482}
1483
1484inline void EventFormatter::setElement(const char *name, Float64 value)
1485{
1487 blpapi_EventFormatter_setValueFloat64(d_handle, name, 0, value));
1488}
1489
1490inline void EventFormatter::setElement(const char *name, const Datetime& value)
1491{
1493 d_handle, name, 0, &value.rawValue()));
1494}
1495
1497 const char *name, const Datetime::HighPrecision& value)
1498{
1501 d_handle, name, 0, &value));
1502}
1503
1504inline void EventFormatter::setElement(const char *name, const char *value)
1505{
1507 blpapi_EventFormatter_setValueString(d_handle, name, 0, value));
1508}
1509
1510inline void EventFormatter::setElement(const char *name, const Name& value)
1511{
1513 d_handle, name, 0, value.impl()));
1514}
1515
1516inline void EventFormatter::setElementNull(const char *name)
1517{
1519 BLPAPI_CALL_EVENTFORMATTER_SETVALUENULL(d_handle, name, 0));
1520}
1521
1522inline void EventFormatter::setElement(const Name& name, bool value)
1523{
1525 d_handle, 0, name.impl(), value));
1526}
1527
1528inline void EventFormatter::setElement(const Name& name, char value)
1529{
1531 d_handle, 0, name.impl(), value));
1532}
1533
1534inline void EventFormatter::setElement(const Name& name, Int32 value)
1535{
1537 d_handle, 0, name.impl(), value));
1538}
1539
1540inline void EventFormatter::setElement(const Name& name, Int64 value)
1541{
1543 d_handle, 0, name.impl(), value));
1544}
1545
1546inline void EventFormatter::setElement(const Name& name, Float32 value)
1547{
1549 d_handle, 0, name.impl(), value));
1550}
1551inline void EventFormatter::setElement(const Name& name, Float64 value)
1552{
1554 d_handle, 0, name.impl(), value));
1555}
1556
1557inline void EventFormatter::setElement(const Name& name, const Datetime& value)
1558{
1560 d_handle, 0, name.impl(), &value.rawValue()));
1561}
1562
1564 const Name& name, const Datetime::HighPrecision& value)
1565{
1568 d_handle, 0, name.impl(), &value));
1569}
1570
1571inline void EventFormatter::setElement(const Name& name, const char *value)
1572{
1574 d_handle, 0, name.impl(), value));
1575}
1576
1578 const Name& name, const std::string& value)
1579{
1580 setElement(name, value.c_str());
1581}
1582
1583inline void EventFormatter::setElement(const Name& name, const Name& value)
1584{
1586 d_handle, 0, name.impl(), value.impl()));
1587}
1588
1590 const Name& name, const void *value, size_t length)
1591{
1594 0,
1595 name.impl(),
1596 reinterpret_cast<const char *>(value),
1597 length));
1598}
1599
1600template <typename BYTES,
1601 typename std::enable_if<IsByteSequence<BYTES>::value, bool>::type>
1602inline void EventFormatter::setElement(const Name& name, const BYTES& value)
1603{
1604 setElement(name, value.data(), value.size());
1605}
1606
1607inline void EventFormatter::setElementNull(const Name& name)
1608{
1610 BLPAPI_CALL_EVENTFORMATTER_SETVALUENULL(d_handle, 0, name.impl()));
1611}
1612
1613inline void EventFormatter::pushElement(const char *name)
1614{
1616 blpapi_EventFormatter_pushElement(d_handle, name, 0));
1617}
1618
1619inline void EventFormatter::pushElement(const Name& name)
1620{
1622 blpapi_EventFormatter_pushElement(d_handle, 0, name.impl()));
1623}
1624
1629
1630inline void EventFormatter::appendValue(bool value)
1631{
1633 blpapi_EventFormatter_appendValueBool(d_handle, value));
1634}
1635
1636inline void EventFormatter::appendValue(char value)
1637{
1639 blpapi_EventFormatter_appendValueChar(d_handle, value));
1640}
1641
1647
1653
1659
1665
1671
1678
1679inline void EventFormatter::appendValue(const char *value)
1680{
1683}
1684
1685inline void EventFormatter::appendValue(const std::string& value)
1686{
1687 appendValue(value.c_str());
1688}
1689
1690inline void EventFormatter::appendValue(const Name& value)
1691{
1694}
1695
1700
1702{
1703 blpapi_Element_t *element = nullptr;
1705 blpapi_EventFormatter_getElement(d_handle, &element));
1706 if (element == nullptr) {
1707 throw blpapi::InvalidStateException("Not a valid element");
1708 }
1709 return blpapi::Element(element);
1710}
1711
1712inline void EventFormatter::fromJson(const char *json)
1713{
1714 getElement().fromJson(json);
1715}
1716
1717inline void EventFormatter::fromJson(const std::string& json)
1718{
1719 fromJson(json.c_str());
1720}
1721
1722inline const blpapi_EventFormatter_t *EventFormatter::handle() const
1723{
1724 return d_handle;
1725}
1726
1727inline blpapi_EventFormatter_t *EventFormatter::handle() { return d_handle; }
1728
1729} // close namespace blpapi
1730} // close namespace BloombergLP
1731
1732#endif // #ifdef __cplusplus
1733#endif // #ifndef INCLUDED_BLPAPI_EVENTFORMATTER
Provide functions for dispatchtbl.
#define BLPAPI_CALL_EVENTFORMATTER_APPENDRECAPMESSAGESEQ(a1, a2, a3, a4, a5)
Definition blpapi_call.h:358
#define BLPAPI_CALL_EVENTFORMATTER_APPENDMESSAGESEQ(a1, a2, a3, a4, a5, a6)
Definition blpapi_call.h:356
#define BLPAPI_CALL_EVENTFORMATTER_SETVALUENULL(a1, a2, a3)
Definition blpapi_call.h:409
#define BLPAPI_CALL(FUNCNAME)
Definition blpapi_call.h:353
Common definitions used by the library.
#define BLPAPI_EXPORT
Definition blpapi_defs.h:172
struct blpapi_CorrelationId_t_ blpapi_CorrelationId_t
Definition blpapi_dispatchtbl.h:74
struct blpapi_Topic blpapi_Topic_t
Definition blpapi_dispatchtbl.h:77
Provide a representation of an item in a message.
A component which defines events related operations.
BLPAPI_EXPORT int blpapi_EventFormatter_pushElement(blpapi_EventFormatter_t *formatter, const char *typeString, const blpapi_Name_t *typeName)
BLPAPI_EXPORT blpapi_EventFormatter_t * blpapi_EventFormatter_create(blpapi_Event_t *event)
BLPAPI_EXPORT int blpapi_EventFormatter_setValueInt64(blpapi_EventFormatter_t *formatter, const char *typeString, const blpapi_Name_t *typeName, blpapi_Int64_t value)
BLPAPI_EXPORT int blpapi_EventFormatter_popElement(blpapi_EventFormatter_t *formatter)
BLPAPI_EXPORT int blpapi_EventFormatter_appendValueBool(blpapi_EventFormatter_t *formatter, blpapi_Bool_t value)
BLPAPI_EXPORT int blpapi_EventFormatter_appendRecapMessageSeq(blpapi_EventFormatter_t *formatter, const blpapi_Topic_t *topic, const blpapi_CorrelationId_t *cid, unsigned int sequenceNumber, unsigned int)
BLPAPI_EXPORT int blpapi_EventFormatter_setValueFloat32(blpapi_EventFormatter_t *formatter, const char *typeString, const blpapi_Name_t *typeName, blpapi_Float32_t value)
BLPAPI_EXPORT int blpapi_EventFormatter_setValueHighPrecisionDatetime(blpapi_EventFormatter_t *formatter, const char *typeString, const blpapi_Name_t *typeName, const blpapi_HighPrecisionDatetime_t *value)
BLPAPI_EXPORT int blpapi_EventFormatter_setValueInt32(blpapi_EventFormatter_t *formatter, const char *typeString, const blpapi_Name_t *typeName, blpapi_Int32_t value)
BLPAPI_EXPORT int blpapi_EventFormatter_appendFragmentedRecapMessageSeq(blpapi_EventFormatter_t *formatter, const char *typeString, blpapi_Name_t *typeName, const blpapi_Topic_t *topic, int fragmentType, unsigned int sequenceNumber)
BLPAPI_EXPORT int blpapi_EventFormatter_setValueFloat64(blpapi_EventFormatter_t *formatter, const char *typeString, const blpapi_Name_t *typeName, blpapi_Float64_t value)
BLPAPI_EXPORT int blpapi_EventFormatter_setValueString(blpapi_EventFormatter_t *formatter, const char *typeString, const blpapi_Name_t *typeName, const char *value)
BLPAPI_EXPORT int blpapi_EventFormatter_getElement(blpapi_EventFormatter_t *formatter, blpapi_Element_t **element)
BLPAPI_EXPORT int blpapi_EventFormatter_appendMessageSeq(blpapi_EventFormatter_t *formatter, const char *typeString, blpapi_Name_t *typeName, const blpapi_Topic_t *topic, unsigned int sequenceNumber, unsigned int)
BLPAPI_EXPORT int blpapi_EventFormatter_appendValueFromName(blpapi_EventFormatter_t *formatter, const blpapi_Name_t *value)
BLPAPI_EXPORT int blpapi_EventFormatter_appendElement(blpapi_EventFormatter_t *formatter)
BLPAPI_EXPORT int blpapi_EventFormatter_setValueChar(blpapi_EventFormatter_t *formatter, const char *typeString, const blpapi_Name_t *typeName, char value)
BLPAPI_EXPORT int blpapi_EventFormatter_appendValueFloat64(blpapi_EventFormatter_t *formatter, blpapi_Float64_t value)
BLPAPI_EXPORT int blpapi_EventFormatter_setValueNull(blpapi_EventFormatter_t *formatter, const char *typeString, const blpapi_Name_t *typeName)
BLPAPI_EXPORT int blpapi_EventFormatter_appendValueHighPrecisionDatetime(blpapi_EventFormatter_t *formatter, const blpapi_HighPrecisionDatetime_t *value)
BLPAPI_EXPORT int blpapi_EventFormatter_appendRecapMessage(blpapi_EventFormatter_t *formatter, const blpapi_Topic_t *topic, const blpapi_CorrelationId_t *cid)
BLPAPI_EXPORT int blpapi_EventFormatter_appendValueChar(blpapi_EventFormatter_t *formatter, char value)
BLPAPI_EXPORT int blpapi_EventFormatter_setValueDatetime(blpapi_EventFormatter_t *formatter, const char *typeString, const blpapi_Name_t *typeName, const blpapi_Datetime_t *value)
BLPAPI_EXPORT int blpapi_EventFormatter_appendValueInt32(blpapi_EventFormatter_t *formatter, blpapi_Int32_t value)
BLPAPI_EXPORT int blpapi_EventFormatter_setValueBytes(blpapi_EventFormatter_t *formatter, const char *typeString, const blpapi_Name_t *typeName, const char *value, size_t length)
BLPAPI_EXPORT void blpapi_EventFormatter_destroy(blpapi_EventFormatter_t *victim)
BLPAPI_EXPORT int blpapi_EventFormatter_appendResponse(blpapi_EventFormatter_t *formatter, const char *typeString, blpapi_Name_t *typeName)
BLPAPI_EXPORT int blpapi_EventFormatter_appendValueInt64(blpapi_EventFormatter_t *formatter, blpapi_Int64_t value)
BLPAPI_EXPORT int blpapi_EventFormatter_setValueFromName(blpapi_EventFormatter_t *formatter, const char *typeString, const blpapi_Name_t *typeName, const blpapi_Name_t *value)
BLPAPI_EXPORT int blpapi_EventFormatter_appendMessage(blpapi_EventFormatter_t *formatter, const char *typeString, blpapi_Name_t *typeName, const blpapi_Topic_t *topic)
BLPAPI_EXPORT int blpapi_EventFormatter_appendValueDatetime(blpapi_EventFormatter_t *formatter, const blpapi_Datetime_t *value)
BLPAPI_EXPORT int blpapi_EventFormatter_appendValueFloat32(blpapi_EventFormatter_t *formatter, blpapi_Float32_t value)
BLPAPI_EXPORT int blpapi_EventFormatter_setValueBool(blpapi_EventFormatter_t *formatter, const char *typeString, const blpapi_Name_t *typeName, blpapi_Bool_t value)
BLPAPI_EXPORT int blpapi_EventFormatter_getElementDefinition(blpapi_EventFormatter_t *formatter, blpapi_SchemaElementDefinition_t **definition)
BLPAPI_EXPORT int blpapi_EventFormatter_appendValueString(blpapi_EventFormatter_t *formatter, const char *value)
BLPAPI_EXPORT int blpapi_EventFormatter_appendFragmentedRecapMessage(blpapi_EventFormatter_t *formatter, const char *typeString, blpapi_Name_t *typeName, const blpapi_Topic_t *topic, const blpapi_CorrelationId_t *cid, int fragmentType)
Provide representation of a Topic.
Provide BLPAPI types.
int blpapi_Bool_t
Definition blpapi_types.h:62
float blpapi_Float32_t
Definition blpapi_types.h:71
long long blpapi_Int64_t
Definition blpapi_types.h:69
int blpapi_Int32_t
Definition blpapi_types.h:67
double blpapi_Float64_t
Definition blpapi_types.h:72
Definition blpapi_correlationid.h:206
Definition blpapi_datetime.h:245
blpapi_Datetime_t & rawValue()
Definition blpapi_datetime.h:1952
Definition blpapi_element.h:473
void fromJson(const char *json)
Definition blpapi_element.h:2384
Definition blpapi_eventformatter.h:317
blpapi::Element getElement()
Definition blpapi_eventformatter.h:1701
void appendValue(bool value)
Definition blpapi_eventformatter.h:1630
void appendMessage(const Name &messageType, const Topic &topic)
Definition blpapi_eventformatter.h:1257
void setElementNull(const Name &name)
Definition blpapi_eventformatter.h:1607
void setElement(const Name &name, bool value)
Definition blpapi_eventformatter.h:1522
void appendRecapMessage(const Topic &topic, const CorrelationId *cid=0)
Definition blpapi_eventformatter.h:1292
void appendResponse(const Name &operationName)
Definition blpapi_eventformatter.h:1286
~EventFormatter()
Definition blpapi_eventformatter.h:1245
void appendElement()
Definition blpapi_eventformatter.h:1696
void fromJson(const char *json)
Definition blpapi_eventformatter.h:1712
void popElement()
Definition blpapi_eventformatter.h:1625
void pushElement(const Name &name)
Definition blpapi_eventformatter.h:1619
Definition blpapi_event.h:196
blpapi_Event_t * impl() const
Definition blpapi_event.h:553
static void throwOnError(int errorCode)
Definition blpapi_exception.h:526
Definition blpapi_exception.h:222
Fragment
Definition blpapi_message.h:171
@ FRAGMENT_NONE
message is not fragmented
Definition blpapi_message.h:173
Definition blpapi_name.h:150
blpapi_Name_t * impl() const
Definition blpapi_name.h:403
Definition blpapi_topic.h:114
const blpapi_Topic_t * impl() const
Definition blpapi_topic.h:221
struct blpapi_Event blpapi_Event_t
Definition blpapi_types.h:139
struct blpapi_EventFormatter blpapi_EventFormatter_t
Definition blpapi_types.h:145
struct blpapi_Name blpapi_Name_t
Definition blpapi_types.h:154
struct blpapi_SchemaElementDefinition blpapi_SchemaElementDefinition_t
Definition blpapi_types.h:191
struct blpapi_Element blpapi_Element_t
Definition blpapi_types.h:136
blpapi_Float64_t Float64
Definition blpapi_types.h:474
blpapi_Float32_t Float32
Definition blpapi_types.h:473
blpapi_Int64_t Int64
Definition blpapi_types.h:471
blpapi_Int32_t Int32
Definition blpapi_types.h:469
Definition blpapi_abstractsession.h:195
Definition blpapi_datetime.h:102
Definition blpapi_datetime.h:115