BLPAPI C++ 3.25.12
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);
395 const Topic& topic, Message::Fragment fragmentType);
411 void appendRecapMessage(const Name& messageType,
412 const Topic& topic,
431 void appendRecapMessage(const Topic& topic,
432 unsigned int sequenceNumber,
433 const CorrelationId *cid = 0);
456 void appendRecapMessage(const Name& messageType,
457 const Topic& topic,
458 unsigned int sequenceNumber);
472 void appendRecapMessage(const Topic& topic,
473 Message::Fragment fragmentType,
474 unsigned int sequenceNumber);
495 void appendRecapMessage(const Name& messageType,
496 const Topic& topic,
497 Message::Fragment fragmentType,
498 unsigned int sequenceNumber);
519 void appendRecapMessage(const CorrelationId& cid,
540 void appendRecapMessage(const Name& messageType,
541 const CorrelationId& cid,
562 void setElement(const Name& name, bool value);
572 void setElement(const Name& name, char value);
582 void setElement(const Name& name, Int32 value);
592 void setElement(const Name& name, Int64 value);
602 void setElement(const Name& name, Float32 value);
612 void setElement(const Name& name, Float64 value);
622 void setElement(const Name& name, const Datetime& value);
633 void setElement(const Name& name, const Datetime::HighPrecision& value);
645 void setElement(const Name& name, const char *value);
658 void setElement(const Name& name, const std::string& value);
669 void setElement(const Name& name, const Name& value);
679 void setElement(const Name& name, const void *value, size_t length);
693 template <typename BYTES,
694 typename std::enable_if<IsByteSequence<BYTES>::value, bool>::type
695 = true>
696 void setElement(const Name& name, const BYTES& value);
712 void setElementNull(const Name& name);
723 void pushElement(const Name& name);
741 void popElement();
751 void appendValue(bool value);
758 void appendValue(char value);
765 void appendValue(Int32 value);
772 void appendValue(Int64 value);
779 void appendValue(Float32 value);
786 void appendValue(Float64 value);
793 void appendValue(const char *value);
800 void appendValue(const std::string& value);
807 void appendValue(const Name& value);
814 void appendValue(const Datetime& value);
821 void appendValue(const Datetime::HighPrecision& value);
828 void appendElement();
839 BLPAPI_DEPRECATE_STRING_NAME void appendMessage(
840 const char *messageType, const Topic& topic);
850 BLPAPI_DEPRECATE_STRING_NAME void appendMessage(const char *messageType,
851 const Topic& topic,
852 unsigned int sequenceNumber);
866 BLPAPI_DEPRECATE_STRING_NAME void appendResponse(
867 const char *operationName);
880 BLPAPI_DEPRECATE_STRING_NAME void appendRecapMessage(
881 const char *messageType,
882 const Topic& topic,
904 BLPAPI_DEPRECATE_STRING_NAME void appendRecapMessage(
905 const char *messageType,
906 const Topic& topic,
907 unsigned int sequenceNumber);
923 BLPAPI_DEPRECATE_STRING_NAME void appendRecapMessage(
924 const char *messageType,
925 const Topic& topic,
926 Message::Fragment fragmentType,
927 unsigned int sequenceNumber);
950 BLPAPI_DEPRECATE_STRING_NAME void appendRecapMessage(
951 const char *messageType,
952 const CorrelationId& cid,
975 BLPAPI_DEPRECATE_STRING_NAME void setElement(const char *name, bool value);
991 BLPAPI_DEPRECATE_STRING_NAME void setElement(const char *name, char value);
1007 BLPAPI_DEPRECATE_STRING_NAME void setElement(
1008 const char *name, Int32 value);
1024 BLPAPI_DEPRECATE_STRING_NAME void setElement(
1025 const char *name, Int64 value);
1041 BLPAPI_DEPRECATE_STRING_NAME void setElement(
1042 const char *name, Float32 value);
1058 BLPAPI_DEPRECATE_STRING_NAME void setElement(
1059 const char *name, Float64 value);
1075 BLPAPI_DEPRECATE_STRING_NAME void setElement(
1076 const char *name, const Datetime& value);
1093 BLPAPI_DEPRECATE_STRING_NAME void setElement(
1094 const char *name, const Datetime::HighPrecision& value);
1112 BLPAPI_DEPRECATE_STRING_NAME void setElement(
1113 const char *name, const char *value);
1132 BLPAPI_DEPRECATE_STRING_NAME void setElement(
1133 const char *name, const Name& value);
1149 BLPAPI_DEPRECATE_STRING_NAME void setElementNull(const char *name);
1166 BLPAPI_DEPRECATE_STRING_NAME void pushElement(const char *name);
1190 void fromJson(const char *json);
1203 void fromJson(const std::string& json);
1218 const blpapi_EventFormatter_t *handle() const;
1223 blpapi_EventFormatter_t *handle();
1228};
1229
1233// ============================================================================
1234// INLINE AND TEMPLATE FUNCTION IMPLEMENTATIONS
1235// ============================================================================
1236
1237// --------------------
1238// class EventFormatter
1239// --------------------
1240
1241inline EventFormatter::EventFormatter(Event& event)
1242{
1243 d_handle = blpapi_EventFormatter_create(event.impl());
1244}
1245
1250
1252 const char *messageType, const Topic& topic)
1253{
1255 d_handle, messageType, 0, topic.impl()));
1256}
1257
1259 const Name& messageType, const Topic& topic)
1260{
1262 d_handle, 0, messageType.impl(), topic.impl()));
1263}
1264
1265inline void EventFormatter::appendMessage(const char *messageType,
1266 const Topic& topic,
1267 unsigned int sequenceNumber)
1268{
1270 d_handle, messageType, 0, topic.impl(), sequenceNumber, 0));
1271}
1272
1273inline void EventFormatter::appendMessage(const Name& messageType,
1274 const Topic& topic,
1275 unsigned int sequenceNumber)
1276{
1278 d_handle, 0, messageType.impl(), topic.impl(), sequenceNumber, 0));
1279}
1280
1281inline void EventFormatter::appendResponse(const char *operationName)
1282{
1284 blpapi_EventFormatter_appendResponse(d_handle, operationName, 0));
1285}
1286
1287inline void EventFormatter::appendResponse(const Name& operationName)
1288{
1290 d_handle, 0, operationName.impl()));
1291}
1292
1294 const Topic& topic, const CorrelationId *cid)
1295{
1297 d_handle, topic.impl(), cid ? &cid->impl() : 0));
1298}
1299
1301 const Topic& topic, Message::Fragment fragmentType)
1302{
1305 0, // 'typeString'
1306 0, // 'typeName'
1307 topic.impl(), // 'topic'
1308 0, // 'cid'
1309 static_cast<int>(fragmentType)));
1310}
1311
1312inline void EventFormatter::appendRecapMessage(const Name& messageType,
1313 const Topic& topic,
1314 Message::Fragment fragmentType)
1315{
1318 0, // 'typeString'
1319 messageType.impl(), // 'typeName'
1320 topic.impl(), // 'topic'
1321 0, // 'cid'
1322 static_cast<int>(fragmentType)));
1323}
1324
1325inline void EventFormatter::appendRecapMessage(const char *messageType,
1326 const Topic& topic,
1327 Message::Fragment fragmentType)
1328{
1331 messageType, // 'typeString'
1332 0, // 'typeName'
1333 topic.impl(), // 'topic'
1334 0, // 'cid'
1335 static_cast<int>(fragmentType)));
1336}
1337
1339 unsigned int sequenceNumber,
1340 const CorrelationId *cid)
1341{
1344 topic.impl(),
1345 cid ? &cid->impl() : 0,
1346 sequenceNumber,
1347 0));
1348}
1349
1350inline void EventFormatter::appendRecapMessage(const Name& messageType,
1351 const Topic& topic,
1352 unsigned int sequenceNumber)
1353{
1356 0, // 'typeString'
1357 messageType.impl(), // 'typeName'
1358 topic.impl(), // 'topic'
1359 static_cast<int>(Message::FRAGMENT_NONE),
1360 sequenceNumber));
1361}
1362
1363inline void EventFormatter::appendRecapMessage(const char *messageType,
1364 const Topic& topic,
1365 unsigned int sequenceNumber)
1366{
1369 messageType, // 'typeString'
1370 0, // 'typeName'
1371 topic.impl(), // 'topic'
1372 static_cast<int>(Message::FRAGMENT_NONE),
1373 sequenceNumber));
1374}
1375
1377 Message::Fragment fragmentType,
1378 unsigned int sequenceNumber)
1379{
1382 0, // 'typeString'
1383 0, // 'typeName'
1384 topic.impl(), // 'topic'
1385 static_cast<int>(fragmentType),
1386 sequenceNumber));
1387}
1388
1389inline void EventFormatter::appendRecapMessage(const Name& messageType,
1390 const Topic& topic,
1391 Message::Fragment fragmentType,
1392 unsigned int sequenceNumber)
1393{
1396 0, // 'typeString'
1397 messageType.impl(), // 'typeName'
1398 topic.impl(), // 'topic'
1399 static_cast<int>(fragmentType),
1400 sequenceNumber));
1401}
1402
1403inline void EventFormatter::appendRecapMessage(const char *messageType,
1404 const Topic& topic,
1405 Message::Fragment fragmentType,
1406 unsigned int sequenceNumber)
1407{
1410 messageType, // 'typeString'
1411 0, // 'typeName'
1412 topic.impl(), // 'topic'
1413 static_cast<int>(fragmentType),
1414 sequenceNumber));
1415}
1416
1418 const CorrelationId& cid, Message::Fragment fragmentType)
1419{
1422 0, // 'typeString'
1423 0, // 'typeName'
1424 0, // 'topic'
1425 &cid.impl(), // 'cid'
1426 static_cast<int>(fragmentType)));
1427}
1428
1429inline void EventFormatter::appendRecapMessage(const Name& messageType,
1430 const CorrelationId& cid,
1431 Message::Fragment fragmentType)
1432{
1435 0, // 'typeString'
1436 messageType.impl(), // 'typeName'
1437 0, // 'topic'
1438 &cid.impl(), // 'cid'
1439 static_cast<int>(fragmentType)));
1440}
1441
1442inline void EventFormatter::appendRecapMessage(const char *messageType,
1443 const CorrelationId& cid,
1444 Message::Fragment fragmentType)
1445{
1448 messageType, // 'typeString'
1449 0, // 'typeName'
1450 0, // 'topic'
1451 &cid.impl(), // 'cid'
1452 static_cast<int>(fragmentType)));
1453}
1454
1455inline void EventFormatter::setElement(const char *name, bool value)
1456{
1458 blpapi_EventFormatter_setValueBool(d_handle, name, 0, value));
1459}
1460
1461inline void EventFormatter::setElement(const char *name, char value)
1462{
1464 blpapi_EventFormatter_setValueChar(d_handle, name, 0, value));
1465}
1466
1467inline void EventFormatter::setElement(const char *name, Int32 value)
1468{
1470 blpapi_EventFormatter_setValueInt32(d_handle, name, 0, value));
1471}
1472
1473inline void EventFormatter::setElement(const char *name, Int64 value)
1474{
1476 blpapi_EventFormatter_setValueInt64(d_handle, name, 0, value));
1477}
1478
1479inline void EventFormatter::setElement(const char *name, Float32 value)
1480{
1482 blpapi_EventFormatter_setValueFloat32(d_handle, name, 0, value));
1483}
1484
1485inline void EventFormatter::setElement(const char *name, Float64 value)
1486{
1488 blpapi_EventFormatter_setValueFloat64(d_handle, name, 0, value));
1489}
1490
1491inline void EventFormatter::setElement(const char *name, const Datetime& value)
1492{
1494 d_handle, name, 0, &value.rawValue()));
1495}
1496
1498 const char *name, const Datetime::HighPrecision& value)
1499{
1502 d_handle, name, 0, &value));
1503}
1504
1505inline void EventFormatter::setElement(const char *name, const char *value)
1506{
1508 blpapi_EventFormatter_setValueString(d_handle, name, 0, value));
1509}
1510
1511inline void EventFormatter::setElement(const char *name, const Name& value)
1512{
1514 d_handle, name, 0, value.impl()));
1515}
1516
1517inline void EventFormatter::setElementNull(const char *name)
1518{
1520 BLPAPI_CALL_EVENTFORMATTER_SETVALUENULL(d_handle, name, 0));
1521}
1522
1523inline void EventFormatter::setElement(const Name& name, bool value)
1524{
1526 d_handle, 0, name.impl(), value));
1527}
1528
1529inline void EventFormatter::setElement(const Name& name, char value)
1530{
1532 d_handle, 0, name.impl(), value));
1533}
1534
1535inline void EventFormatter::setElement(const Name& name, Int32 value)
1536{
1538 d_handle, 0, name.impl(), value));
1539}
1540
1541inline void EventFormatter::setElement(const Name& name, Int64 value)
1542{
1544 d_handle, 0, name.impl(), value));
1545}
1546
1547inline void EventFormatter::setElement(const Name& name, Float32 value)
1548{
1550 d_handle, 0, name.impl(), value));
1551}
1552inline void EventFormatter::setElement(const Name& name, Float64 value)
1553{
1555 d_handle, 0, name.impl(), value));
1556}
1557
1558inline void EventFormatter::setElement(const Name& name, const Datetime& value)
1559{
1561 d_handle, 0, name.impl(), &value.rawValue()));
1562}
1563
1565 const Name& name, const Datetime::HighPrecision& value)
1566{
1569 d_handle, 0, name.impl(), &value));
1570}
1571
1572inline void EventFormatter::setElement(const Name& name, const char *value)
1573{
1575 d_handle, 0, name.impl(), value));
1576}
1577
1579 const Name& name, const std::string& value)
1580{
1581 setElement(name, value.c_str());
1582}
1583
1584inline void EventFormatter::setElement(const Name& name, const Name& value)
1585{
1587 d_handle, 0, name.impl(), value.impl()));
1588}
1589
1591 const Name& name, const void *value, size_t length)
1592{
1595 0,
1596 name.impl(),
1597 reinterpret_cast<const char *>(value),
1598 length));
1599}
1600
1601template <typename BYTES,
1602 typename std::enable_if<IsByteSequence<BYTES>::value, bool>::type>
1603inline void EventFormatter::setElement(const Name& name, const BYTES& value)
1604{
1605 setElement(name, value.data(), value.size());
1606}
1607
1608inline void EventFormatter::setElementNull(const Name& name)
1609{
1611 BLPAPI_CALL_EVENTFORMATTER_SETVALUENULL(d_handle, 0, name.impl()));
1612}
1613
1614inline void EventFormatter::pushElement(const char *name)
1615{
1617 blpapi_EventFormatter_pushElement(d_handle, name, 0));
1618}
1619
1620inline void EventFormatter::pushElement(const Name& name)
1621{
1623 blpapi_EventFormatter_pushElement(d_handle, 0, name.impl()));
1624}
1625
1630
1631inline void EventFormatter::appendValue(bool value)
1632{
1634 blpapi_EventFormatter_appendValueBool(d_handle, value));
1635}
1636
1637inline void EventFormatter::appendValue(char value)
1638{
1640 blpapi_EventFormatter_appendValueChar(d_handle, value));
1641}
1642
1648
1654
1660
1666
1672
1679
1680inline void EventFormatter::appendValue(const char *value)
1681{
1684}
1685
1686inline void EventFormatter::appendValue(const std::string& value)
1687{
1688 appendValue(value.c_str());
1689}
1690
1691inline void EventFormatter::appendValue(const Name& value)
1692{
1695}
1696
1701
1703{
1704 blpapi_Element_t *element = nullptr;
1706 blpapi_EventFormatter_getElement(d_handle, &element));
1707 if (element == nullptr) {
1708 throw blpapi::InvalidStateException("Not a valid element");
1709 }
1710 return blpapi::Element(element);
1711}
1712
1713inline void EventFormatter::fromJson(const char *json)
1714{
1715 getElement().fromJson(json);
1716}
1717
1718inline void EventFormatter::fromJson(const std::string& json)
1719{
1720 fromJson(json.c_str());
1721}
1722
1723inline const blpapi_EventFormatter_t *EventFormatter::handle() const
1724{
1725 return d_handle;
1726}
1727
1728inline blpapi_EventFormatter_t *EventFormatter::handle() { return d_handle; }
1729
1730} // close namespace blpapi
1731} // close namespace BloombergLP
1732
1733#endif // #ifdef __cplusplus
1734#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:2382
Definition blpapi_eventformatter.h:317
blpapi::Element getElement()
Definition blpapi_eventformatter.h:1702
void appendValue(bool value)
Definition blpapi_eventformatter.h:1631
void appendMessage(const Name &messageType, const Topic &topic)
Definition blpapi_eventformatter.h:1258
void setElementNull(const Name &name)
Definition blpapi_eventformatter.h:1608
void setElement(const Name &name, bool value)
Definition blpapi_eventformatter.h:1523
void appendRecapMessage(const Topic &topic, const CorrelationId *cid=0)
Definition blpapi_eventformatter.h:1293
void appendResponse(const Name &operationName)
Definition blpapi_eventformatter.h:1287
~EventFormatter()
Definition blpapi_eventformatter.h:1246
void appendElement()
Definition blpapi_eventformatter.h:1697
void fromJson(const char *json)
Definition blpapi_eventformatter.h:1713
void popElement()
Definition blpapi_eventformatter.h:1626
void pushElement(const Name &name)
Definition blpapi_eventformatter.h:1620
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