BLPAPI C++  3.24.6
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_event.h>
62 #include <blpapi_topic.h>
63 #include <blpapi_types.h>
64 
65 #include <stddef.h>
66 
67 #ifdef __cplusplus
68 extern "C" {
69 #endif
70 
73 
76 
79  const char *typeString,
80  blpapi_Name_t *typeName,
81  const blpapi_Topic_t *topic);
82 
85  const char *typeString,
86  blpapi_Name_t *typeName,
87  const blpapi_Topic_t *topic,
88  unsigned int sequenceNumber,
89  unsigned int);
90 
93  const char *typeString,
94  blpapi_Name_t *typeName);
95 
98  blpapi_EventFormatter_t *formatter,
99  const blpapi_Topic_t *topic,
100  const blpapi_CorrelationId_t *cid);
101 
104  blpapi_EventFormatter_t *formatter,
105  const blpapi_Topic_t *topic,
106  const blpapi_CorrelationId_t *cid,
107  unsigned int sequenceNumber,
108  unsigned int);
109 
112  blpapi_EventFormatter_t *formatter,
113  const char *typeString,
114  blpapi_Name_t *typeName,
115  const blpapi_Topic_t *topic,
116  const blpapi_CorrelationId_t *cid,
117  int fragmentType);
118 
121  blpapi_EventFormatter_t *formatter,
122  const char *typeString,
123  blpapi_Name_t *typeName,
124  const blpapi_Topic_t *topic,
125  int fragmentType,
126  unsigned int sequenceNumber);
127 
130  const char *typeString,
131  const blpapi_Name_t *typeName,
132  blpapi_Bool_t value);
133 
136  const char *typeString,
137  const blpapi_Name_t *typeName,
138  char value);
139 
142  const char *typeString,
143  const blpapi_Name_t *typeName,
144  blpapi_Int32_t value);
145 
148  const char *typeString,
149  const blpapi_Name_t *typeName,
150  blpapi_Int64_t value);
151 
154  const char *typeString,
155  const blpapi_Name_t *typeName,
156  blpapi_Float32_t value);
157 
160  const char *typeString,
161  const blpapi_Name_t *typeName,
162  blpapi_Float64_t value);
163 
166  const char *typeString,
167  const blpapi_Name_t *typeName,
168  const blpapi_Datetime_t *value);
169 
172  blpapi_EventFormatter_t *formatter,
173  const char *typeString,
174  const blpapi_Name_t *typeName,
175  const blpapi_HighPrecisionDatetime_t *value);
176 
179  const char *typeString,
180  const blpapi_Name_t *typeName,
181  const char *value);
182 
185  const char *typeString,
186  const blpapi_Name_t *typeName,
187  const blpapi_Name_t *value);
188 
191  const char *typeString,
192  const blpapi_Name_t *typeName,
193  const char *value,
194  size_t length);
195 
198  const char *typeString,
199  const blpapi_Name_t *typeName);
200 
203  const char *typeString,
204  const blpapi_Name_t *typeName);
205 
208 
211  blpapi_EventFormatter_t *formatter, blpapi_Bool_t value);
212 
215  blpapi_EventFormatter_t *formatter, char value);
216 
219  blpapi_EventFormatter_t *formatter, blpapi_Int32_t value);
220 
223  blpapi_EventFormatter_t *formatter, blpapi_Int64_t value);
224 
227  blpapi_EventFormatter_t *formatter, blpapi_Float32_t value);
228 
231  blpapi_EventFormatter_t *formatter, blpapi_Float64_t value);
232 
235  blpapi_EventFormatter_t *formatter, const blpapi_Datetime_t *value);
236 
239  blpapi_EventFormatter_t *formatter,
240  const blpapi_HighPrecisionDatetime_t *value);
241 
244  blpapi_EventFormatter_t *formatter, const char *value);
245 
248  blpapi_EventFormatter_t *formatter, const blpapi_Name_t *value);
249 
252 
255  blpapi_EventFormatter_t *formatter,
256  blpapi_SchemaElementDefinition_t **definition);
257 
258 #ifdef __cplusplus
259 }
260 
261 #include <string>
262 #include <type_traits>
263 
271 namespace BloombergLP {
272 namespace blpapi {
273 
312 
313  blpapi_EventFormatter_t *d_handle;
314 
315  private:
316  EventFormatter& operator=(const EventFormatter&);
318  EventFormatter();
319 
320  public:
321  explicit EventFormatter(Event& event);
329  ~EventFormatter();
334  void appendMessage(const Name& messageType, const Topic& topic);
342  void appendMessage(const Name& messageType,
343  const Topic& topic,
344  unsigned int sequenceNumber);
356  void appendResponse(const Name& operationName);
368  void appendRecapMessage(const Topic& topic, const CorrelationId *cid = 0);
388  void appendRecapMessage(
389  const Topic& topic, Message::Fragment fragmentType);
405  void appendRecapMessage(const Name& messageType,
406  const Topic& topic,
425  void appendRecapMessage(const Topic& topic,
426  unsigned int sequenceNumber,
427  const CorrelationId *cid = 0);
450  void appendRecapMessage(const Name& messageType,
451  const Topic& topic,
452  unsigned int sequenceNumber);
466  void appendRecapMessage(const Topic& topic,
467  Message::Fragment fragmentType,
468  unsigned int sequenceNumber);
489  void appendRecapMessage(const Name& messageType,
490  const Topic& topic,
491  Message::Fragment fragmentType,
492  unsigned int sequenceNumber);
513  void appendRecapMessage(const CorrelationId& cid,
534  void appendRecapMessage(const Name& messageType,
535  const CorrelationId& cid,
556  void setElement(const Name& name, bool value);
566  void setElement(const Name& name, char value);
576  void setElement(const Name& name, Int32 value);
586  void setElement(const Name& name, Int64 value);
596  void setElement(const Name& name, Float32 value);
606  void setElement(const Name& name, Float64 value);
616  void setElement(const Name& name, const Datetime& value);
627  void setElement(const Name& name, const Datetime::HighPrecision& value);
639  void setElement(const Name& name, const char *value);
652  void setElement(const Name& name, const std::string& value);
663  void setElement(const Name& name, const Name& value);
673  void setElement(const Name& name, const void *value, size_t length);
687  template <typename BYTES,
688  typename std::enable_if<IsByteSequence<BYTES>::value, bool>::type
689  = true>
690  void setElement(const Name& name, const BYTES& value);
706  void setElementNull(const Name& name);
717  void pushElement(const Name& name);
735  void popElement();
745  void appendValue(bool value);
752  void appendValue(char value);
759  void appendValue(Int32 value);
766  void appendValue(Int64 value);
773  void appendValue(Float32 value);
780  void appendValue(Float64 value);
787  void appendValue(const char *value);
794  void appendValue(const std::string& value);
801  void appendValue(const Name& value);
808  void appendValue(const Datetime& value);
815  void appendValue(const Datetime::HighPrecision& value);
822  void appendElement();
833  [[deprecated("Use the form that takes Name instead of const char*")]] void
834  appendMessage(const char *messageType, const Topic& topic);
844  [[deprecated("Use the form that takes Name instead of const char*")]] void
845  appendMessage(const char *messageType,
846  const Topic& topic,
847  unsigned int sequenceNumber);
861  [[deprecated("Use the form that takes Name instead of const char*")]] void
862  appendResponse(const char *operationName);
875  [[deprecated("Use the form that takes Name instead of const char*")]] void
876  appendRecapMessage(const char *messageType,
877  const Topic& topic,
899  [[deprecated("Use the form that takes Name instead of const char*")]] void
900  appendRecapMessage(const char *messageType,
901  const Topic& topic,
902  unsigned int sequenceNumber);
918  [[deprecated("Use the form that takes Name instead of const char*")]] void
919  appendRecapMessage(const char *messageType,
920  const Topic& topic,
921  Message::Fragment fragmentType,
922  unsigned int sequenceNumber);
945  [[deprecated("Use the form that takes Name instead of const char*")]] void
946  appendRecapMessage(const char *messageType,
947  const CorrelationId& cid,
970  [[deprecated("Use the form that takes Name instead of const char*")]] void
971  setElement(const char *name, bool value);
987  [[deprecated("Use the form that takes Name instead of const char*")]] void
988  setElement(const char *name, char value);
1004  [[deprecated("Use the form that takes Name instead of const char*")]] void
1005  setElement(const char *name, Int32 value);
1021  [[deprecated("Use the form that takes Name instead of const char*")]] void
1022  setElement(const char *name, Int64 value);
1038  [[deprecated("Use the form that takes Name instead of const char*")]] void
1039  setElement(const char *name, Float32 value);
1055  [[deprecated("Use the form that takes Name instead of const char*")]] void
1056  setElement(const char *name, Float64 value);
1072  [[deprecated("Use the form that takes Name instead of const char*")]] void
1073  setElement(const char *name, const Datetime& value);
1090  [[deprecated("Use the form that takes Name instead of const char*")]] void
1091  setElement(const char *name, const Datetime::HighPrecision& value);
1109  [[deprecated("Use the form that takes Name instead of const char*")]] void
1110  setElement(const char *name, const char *value);
1129  [[deprecated("Use the form that takes Name instead of const char*")]] void
1130  setElement(const char *name, const Name& value);
1146  [[deprecated("Use the form that takes Name instead of const char*")]] void
1147  setElementNull(const char *name);
1164  [[deprecated("Use the form that takes Name instead of const char*")]] void
1165  pushElement(const char *name);
1174  const blpapi_EventFormatter_t *handle() const;
1180  blpapi_EventFormatter_t *handle();
1184 };
1186 
1190 // ============================================================================
1191 // INLINE AND TEMPLATE FUNCTION IMPLEMENTATIONS
1192 // ============================================================================
1193 
1194 // --------------------
1195 // class EventFormatter
1196 // --------------------
1197 
1198 inline EventFormatter::EventFormatter(Event& event)
1199 {
1200  d_handle = blpapi_EventFormatter_create(event.impl());
1201 }
1202 
1204 {
1206 }
1207 
1209  const char *messageType, const Topic& topic)
1210 {
1212  d_handle, messageType, 0, topic.impl()));
1213 }
1214 
1216  const Name& messageType, const Topic& topic)
1217 {
1219  d_handle, 0, messageType.impl(), topic.impl()));
1220 }
1221 
1222 inline void EventFormatter::appendMessage(const char *messageType,
1223  const Topic& topic,
1224  unsigned int sequenceNumber)
1225 {
1227  d_handle, messageType, 0, topic.impl(), sequenceNumber, 0));
1228 }
1229 
1230 inline void EventFormatter::appendMessage(const Name& messageType,
1231  const Topic& topic,
1232  unsigned int sequenceNumber)
1233 {
1235  d_handle, 0, messageType.impl(), topic.impl(), sequenceNumber, 0));
1236 }
1237 
1238 inline void EventFormatter::appendResponse(const char *operationName)
1239 {
1241  blpapi_EventFormatter_appendResponse(d_handle, operationName, 0));
1242 }
1243 
1244 inline void EventFormatter::appendResponse(const Name& operationName)
1245 {
1247  d_handle, 0, operationName.impl()));
1248 }
1249 
1251  const Topic& topic, const CorrelationId *cid)
1252 {
1254  d_handle, topic.impl(), cid ? &cid->impl() : 0));
1255 }
1256 
1258  const Topic& topic, Message::Fragment fragmentType)
1259 {
1262  0, // 'typeString'
1263  0, // 'typeName'
1264  topic.impl(), // 'topic'
1265  0, // 'cid'
1266  static_cast<int>(fragmentType)));
1267 }
1268 
1269 inline void EventFormatter::appendRecapMessage(const Name& messageType,
1270  const Topic& topic,
1271  Message::Fragment fragmentType)
1272 {
1275  0, // 'typeString'
1276  messageType.impl(), // 'typeName'
1277  topic.impl(), // 'topic'
1278  0, // 'cid'
1279  static_cast<int>(fragmentType)));
1280 }
1281 
1282 inline void EventFormatter::appendRecapMessage(const char *messageType,
1283  const Topic& topic,
1284  Message::Fragment fragmentType)
1285 {
1288  messageType, // 'typeString'
1289  0, // 'typeName'
1290  topic.impl(), // 'topic'
1291  0, // 'cid'
1292  static_cast<int>(fragmentType)));
1293 }
1294 
1296  unsigned int sequenceNumber,
1297  const CorrelationId *cid)
1298 {
1301  topic.impl(),
1302  cid ? &cid->impl() : 0,
1303  sequenceNumber,
1304  0));
1305 }
1306 
1307 inline void EventFormatter::appendRecapMessage(const Name& messageType,
1308  const Topic& topic,
1309  unsigned int sequenceNumber)
1310 {
1313  0, // 'typeString'
1314  messageType.impl(), // 'typeName'
1315  topic.impl(), // 'topic'
1316  static_cast<int>(Message::FRAGMENT_NONE),
1317  sequenceNumber));
1318 }
1319 
1320 inline void EventFormatter::appendRecapMessage(const char *messageType,
1321  const Topic& topic,
1322  unsigned int sequenceNumber)
1323 {
1326  messageType, // 'typeString'
1327  0, // 'typeName'
1328  topic.impl(), // 'topic'
1329  static_cast<int>(Message::FRAGMENT_NONE),
1330  sequenceNumber));
1331 }
1332 
1334  Message::Fragment fragmentType,
1335  unsigned int sequenceNumber)
1336 {
1339  0, // 'typeString'
1340  0, // 'typeName'
1341  topic.impl(), // 'topic'
1342  static_cast<int>(fragmentType),
1343  sequenceNumber));
1344 }
1345 
1346 inline void EventFormatter::appendRecapMessage(const Name& messageType,
1347  const Topic& topic,
1348  Message::Fragment fragmentType,
1349  unsigned int sequenceNumber)
1350 {
1353  0, // 'typeString'
1354  messageType.impl(), // 'typeName'
1355  topic.impl(), // 'topic'
1356  static_cast<int>(fragmentType),
1357  sequenceNumber));
1358 }
1359 
1360 inline void EventFormatter::appendRecapMessage(const char *messageType,
1361  const Topic& topic,
1362  Message::Fragment fragmentType,
1363  unsigned int sequenceNumber)
1364 {
1367  messageType, // 'typeString'
1368  0, // 'typeName'
1369  topic.impl(), // 'topic'
1370  static_cast<int>(fragmentType),
1371  sequenceNumber));
1372 }
1373 
1375  const CorrelationId& cid, Message::Fragment fragmentType)
1376 {
1379  0, // 'typeString'
1380  0, // 'typeName'
1381  0, // 'topic'
1382  &cid.impl(), // 'cid'
1383  static_cast<int>(fragmentType)));
1384 }
1385 
1386 inline void EventFormatter::appendRecapMessage(const Name& messageType,
1387  const CorrelationId& cid,
1388  Message::Fragment fragmentType)
1389 {
1392  0, // 'typeString'
1393  messageType.impl(), // 'typeName'
1394  0, // 'topic'
1395  &cid.impl(), // 'cid'
1396  static_cast<int>(fragmentType)));
1397 }
1398 
1399 inline void EventFormatter::appendRecapMessage(const char *messageType,
1400  const CorrelationId& cid,
1401  Message::Fragment fragmentType)
1402 {
1405  messageType, // 'typeString'
1406  0, // 'typeName'
1407  0, // 'topic'
1408  &cid.impl(), // 'cid'
1409  static_cast<int>(fragmentType)));
1410 }
1411 
1412 inline void EventFormatter::setElement(const char *name, bool value)
1413 {
1415  blpapi_EventFormatter_setValueBool(d_handle, name, 0, value));
1416 }
1417 
1418 inline void EventFormatter::setElement(const char *name, char value)
1419 {
1421  blpapi_EventFormatter_setValueChar(d_handle, name, 0, value));
1422 }
1423 
1424 inline void EventFormatter::setElement(const char *name, Int32 value)
1425 {
1427  blpapi_EventFormatter_setValueInt32(d_handle, name, 0, value));
1428 }
1429 
1430 inline void EventFormatter::setElement(const char *name, Int64 value)
1431 {
1433  blpapi_EventFormatter_setValueInt64(d_handle, name, 0, value));
1434 }
1435 
1436 inline void EventFormatter::setElement(const char *name, Float32 value)
1437 {
1439  blpapi_EventFormatter_setValueFloat32(d_handle, name, 0, value));
1440 }
1441 
1442 inline void EventFormatter::setElement(const char *name, Float64 value)
1443 {
1445  blpapi_EventFormatter_setValueFloat64(d_handle, name, 0, value));
1446 }
1447 
1448 inline void EventFormatter::setElement(const char *name, const Datetime& value)
1449 {
1451  d_handle, name, 0, &value.rawValue()));
1452 }
1453 
1455  const char *name, const Datetime::HighPrecision& value)
1456 {
1459  d_handle, name, 0, &value));
1460 }
1461 
1462 inline void EventFormatter::setElement(const char *name, const char *value)
1463 {
1465  blpapi_EventFormatter_setValueString(d_handle, name, 0, value));
1466 }
1467 
1468 inline void EventFormatter::setElement(const char *name, const Name& value)
1469 {
1471  d_handle, name, 0, value.impl()));
1472 }
1473 
1474 inline void EventFormatter::setElementNull(const char *name)
1475 {
1477  BLPAPI_CALL_EVENTFORMATTER_SETVALUENULL(d_handle, name, 0));
1478 }
1479 
1480 inline void EventFormatter::setElement(const Name& name, bool value)
1481 {
1483  d_handle, 0, name.impl(), value));
1484 }
1485 
1486 inline void EventFormatter::setElement(const Name& name, char value)
1487 {
1489  d_handle, 0, name.impl(), value));
1490 }
1491 
1492 inline void EventFormatter::setElement(const Name& name, Int32 value)
1493 {
1495  d_handle, 0, name.impl(), value));
1496 }
1497 
1498 inline void EventFormatter::setElement(const Name& name, Int64 value)
1499 {
1501  d_handle, 0, name.impl(), value));
1502 }
1503 
1504 inline void EventFormatter::setElement(const Name& name, Float32 value)
1505 {
1507  d_handle, 0, name.impl(), value));
1508 }
1509 inline void EventFormatter::setElement(const Name& name, Float64 value)
1510 {
1512  d_handle, 0, name.impl(), value));
1513 }
1514 
1515 inline void EventFormatter::setElement(const Name& name, const Datetime& value)
1516 {
1518  d_handle, 0, name.impl(), &value.rawValue()));
1519 }
1520 
1522  const Name& name, const Datetime::HighPrecision& value)
1523 {
1526  d_handle, 0, name.impl(), &value));
1527 }
1528 
1529 inline void EventFormatter::setElement(const Name& name, const char *value)
1530 {
1532  d_handle, 0, name.impl(), value));
1533 }
1534 
1536  const Name& name, const std::string& value)
1537 {
1538  setElement(name, value.c_str());
1539 }
1540 
1541 inline void EventFormatter::setElement(const Name& name, const Name& value)
1542 {
1544  d_handle, 0, name.impl(), value.impl()));
1545 }
1546 
1548  const Name& name, const void *value, size_t length)
1549 {
1552  0,
1553  name.impl(),
1554  reinterpret_cast<const char *>(value),
1555  length));
1556 }
1557 
1558 template <typename BYTES,
1559  typename std::enable_if<IsByteSequence<BYTES>::value, bool>::type>
1560 inline void EventFormatter::setElement(const Name& name, const BYTES& value)
1561 {
1562  setElement(name, value.data(), value.size());
1563 }
1564 
1565 inline void EventFormatter::setElementNull(const Name& name)
1566 {
1568  BLPAPI_CALL_EVENTFORMATTER_SETVALUENULL(d_handle, 0, name.impl()));
1569 }
1570 
1571 inline void EventFormatter::pushElement(const char *name)
1572 {
1574  blpapi_EventFormatter_pushElement(d_handle, name, 0));
1575 }
1576 
1577 inline void EventFormatter::pushElement(const Name& name)
1578 {
1580  blpapi_EventFormatter_pushElement(d_handle, 0, name.impl()));
1581 }
1582 
1584 {
1586 }
1587 
1588 inline void EventFormatter::appendValue(bool value)
1589 {
1591  blpapi_EventFormatter_appendValueBool(d_handle, value));
1592 }
1593 
1594 inline void EventFormatter::appendValue(char value)
1595 {
1597  blpapi_EventFormatter_appendValueChar(d_handle, value));
1598 }
1599 
1601 {
1603  blpapi_EventFormatter_appendValueInt32(d_handle, value));
1604 }
1605 
1607 {
1609  blpapi_EventFormatter_appendValueInt64(d_handle, value));
1610 }
1611 
1613 {
1615  blpapi_EventFormatter_appendValueFloat32(d_handle, value));
1616 }
1617 
1619 {
1621  blpapi_EventFormatter_appendValueFloat64(d_handle, value));
1622 }
1623 
1624 inline void EventFormatter::appendValue(const Datetime& value)
1625 {
1627  d_handle, &value.rawValue()));
1628 }
1629 
1631 {
1634  d_handle, &value));
1635 }
1636 
1637 inline void EventFormatter::appendValue(const char *value)
1638 {
1640  blpapi_EventFormatter_appendValueString(d_handle, value));
1641 }
1642 
1643 inline void EventFormatter::appendValue(const std::string& value)
1644 {
1645  appendValue(value.c_str());
1646 }
1647 
1648 inline void EventFormatter::appendValue(const Name& value)
1649 {
1651  blpapi_EventFormatter_appendValueFromName(d_handle, value.impl()));
1652 }
1653 
1655 {
1657 }
1658 
1659 inline const blpapi_EventFormatter_t *EventFormatter::handle() const
1660 {
1661  return d_handle;
1662 }
1663 
1664 inline blpapi_EventFormatter_t *EventFormatter::handle() { return d_handle; }
1665 
1666 } // close namespace blpapi
1667 } // close namespace BloombergLP
1668 
1669 #endif // #ifdef __cplusplus
1670 #endif // #ifndef INCLUDED_BLPAPI_EVENTFORMATTER
int blpapi_EventFormatter_setValueFloat32(blpapi_EventFormatter_t *formatter, const char *typeString, const blpapi_Name_t *typeName, blpapi_Float32_t value)
void blpapi_EventFormatter_destroy(blpapi_EventFormatter_t *victim)
message is not fragmented
Definition: blpapi_message.h:172
int blpapi_EventFormatter_appendValueFloat64(blpapi_EventFormatter_t *formatter, blpapi_Float64_t value)
int blpapi_EventFormatter_appendValueChar(blpapi_EventFormatter_t *formatter, char value)
int blpapi_EventFormatter_appendElement(blpapi_EventFormatter_t *formatter)
int blpapi_EventFormatter_setValueDatetime(blpapi_EventFormatter_t *formatter, const char *typeString, const blpapi_Name_t *typeName, const blpapi_Datetime_t *value)
Common definitions used by the library.
int blpapi_EventFormatter_setValueBytes(blpapi_EventFormatter_t *formatter, const char *typeString, const blpapi_Name_t *typeName, const char *value, size_t length)
struct blpapi_Event blpapi_Event_t
Definition: blpapi_types.h:139
blpapi_Int32_t Int32
Definition: blpapi_types.h:469
int blpapi_EventFormatter_setValueNull(blpapi_EventFormatter_t *formatter, const char *typeString, const blpapi_Name_t *typeName)
Definition: blpapi_abstractsession.h:220
#define BLPAPI_CALL_EVENTFORMATTER_APPENDMESSAGESEQ(a1, a2, a3, a4, a5, a6)
Definition: blpapi_call.h:356
int blpapi_EventFormatter_appendValueHighPrecisionDatetime(blpapi_EventFormatter_t *formatter, const blpapi_HighPrecisionDatetime_t *value)
Definition: blpapi_name.h:150
#define BLPAPI_CALL(FUNCNAME)
Definition: blpapi_call.h:353
blpapi_Float64_t Float64
Definition: blpapi_types.h:474
void pushElement(const Name &name)
Definition: blpapi_eventformatter.h:1577
void setElement(const Name &name, bool value)
Definition: blpapi_eventformatter.h:1480
void setElementNull(const Name &name)
Definition: blpapi_eventformatter.h:1565
int blpapi_EventFormatter_appendMessage(blpapi_EventFormatter_t *formatter, const char *typeString, blpapi_Name_t *typeName, const blpapi_Topic_t *topic)
blpapi_Name_t * impl() const
Definition: blpapi_name.h:403
int blpapi_EventFormatter_appendRecapMessageSeq(blpapi_EventFormatter_t *formatter, const blpapi_Topic_t *topic, const blpapi_CorrelationId_t *cid, unsigned int sequenceNumber, unsigned int)
int blpapi_Int32_t
Definition: blpapi_types.h:67
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)
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)
struct blpapi_Name blpapi_Name_t
Definition: blpapi_types.h:154
int blpapi_EventFormatter_appendValueFromName(blpapi_EventFormatter_t *formatter, const blpapi_Name_t *value)
int blpapi_EventFormatter_appendResponse(blpapi_EventFormatter_t *formatter, const char *typeString, blpapi_Name_t *typeName)
#define BLPAPI_CALL_EVENTFORMATTER_APPENDRECAPMESSAGESEQ(a1, a2, a3, a4, a5)
Definition: blpapi_call.h:358
int blpapi_Bool_t
Definition: blpapi_types.h:62
blpapi_Float32_t Float32
Definition: blpapi_types.h:473
A component which defines events related operations.
struct blpapi_SchemaElementDefinition blpapi_SchemaElementDefinition_t
Definition: blpapi_types.h:191
void appendElement()
Definition: blpapi_eventformatter.h:1654
int blpapi_EventFormatter_setValueChar(blpapi_EventFormatter_t *formatter, const char *typeString, const blpapi_Name_t *typeName, char value)
static void throwOnError(int errorCode)
Definition: blpapi_exception.h:526
~EventFormatter()
Definition: blpapi_eventformatter.h:1203
int blpapi_EventFormatter_setValueFloat64(blpapi_EventFormatter_t *formatter, const char *typeString, const blpapi_Name_t *typeName, blpapi_Float64_t value)
const blpapi_Topic_t * impl() const
Definition: blpapi_topic.h:221
#define BLPAPI_CALL_EVENTFORMATTER_SETVALUENULL(a1, a2, a3)
Definition: blpapi_call.h:409
int blpapi_EventFormatter_appendValueInt64(blpapi_EventFormatter_t *formatter, blpapi_Int64_t value)
blpapi_Datetime_t & rawValue()
Definition: blpapi_datetime.h:1952
int blpapi_EventFormatter_appendValueInt32(blpapi_EventFormatter_t *formatter, blpapi_Int32_t value)
Definition: blpapi_correlationid.h:201
void appendResponse(const Name &operationName)
Definition: blpapi_eventformatter.h:1244
Definition: blpapi_eventformatter.h:311
Provide representation of a Topic.
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_Int64_t Int64
Definition: blpapi_types.h:471
struct blpapi_Topic blpapi_Topic_t
Definition: blpapi_dispatchtbl.h:75
int blpapi_EventFormatter_appendValueString(blpapi_EventFormatter_t *formatter, const char *value)
Definition: blpapi_datetime.h:102
int blpapi_EventFormatter_setValueInt64(blpapi_EventFormatter_t *formatter, const char *typeString, const blpapi_Name_t *typeName, blpapi_Int64_t value)
int blpapi_EventFormatter_setValueString(blpapi_EventFormatter_t *formatter, const char *typeString, const blpapi_Name_t *typeName, const char *value)
int blpapi_EventFormatter_appendValueFloat32(blpapi_EventFormatter_t *formatter, blpapi_Float32_t value)
struct blpapi_EventFormatter blpapi_EventFormatter_t
Definition: blpapi_types.h:145
int blpapi_EventFormatter_setValueInt32(blpapi_EventFormatter_t *formatter, const char *typeString, const blpapi_Name_t *typeName, blpapi_Int32_t value)
void appendMessage(const Name &messageType, const Topic &topic)
Definition: blpapi_eventformatter.h:1215
double blpapi_Float64_t
Definition: blpapi_types.h:72
Definition: blpapi_topic.h:114
Fragment
Definition: blpapi_message.h:170
int blpapi_EventFormatter_setValueFromName(blpapi_EventFormatter_t *formatter, const char *typeString, const blpapi_Name_t *typeName, const blpapi_Name_t *value)
int blpapi_EventFormatter_appendValueBool(blpapi_EventFormatter_t *formatter, blpapi_Bool_t value)
long long blpapi_Int64_t
Definition: blpapi_types.h:69
void appendValue(bool value)
Definition: blpapi_eventformatter.h:1588
Definition: blpapi_event.h:196
int blpapi_EventFormatter_popElement(blpapi_EventFormatter_t *formatter)
int blpapi_EventFormatter_appendRecapMessage(blpapi_EventFormatter_t *formatter, const blpapi_Topic_t *topic, const blpapi_CorrelationId_t *cid)
int blpapi_EventFormatter_setValueHighPrecisionDatetime(blpapi_EventFormatter_t *formatter, const char *typeString, const blpapi_Name_t *typeName, const blpapi_HighPrecisionDatetime_t *value)
int blpapi_EventFormatter_appendValueDatetime(blpapi_EventFormatter_t *formatter, const blpapi_Datetime_t *value)
float blpapi_Float32_t
Definition: blpapi_types.h:71
int blpapi_EventFormatter_setValueBool(blpapi_EventFormatter_t *formatter, const char *typeString, const blpapi_Name_t *typeName, blpapi_Bool_t value)
blpapi_EventFormatter_t * blpapi_EventFormatter_create(blpapi_Event_t *event)
#define BLPAPI_EXPORT
Definition: blpapi_defs.h:171
Definition: blpapi_datetime.h:245
Provide functions for dispatchtbl.
int blpapi_EventFormatter_pushElement(blpapi_EventFormatter_t *formatter, const char *typeString, const blpapi_Name_t *typeName)
void appendRecapMessage(const Topic &topic, const CorrelationId *cid=0)
Definition: blpapi_eventformatter.h:1250
blpapi_Event_t * impl() const
Definition: blpapi_event.h:553
Provide BLPAPI types.
int blpapi_EventFormatter_getElementDefinition(blpapi_EventFormatter_t *formatter, blpapi_SchemaElementDefinition_t **definition)
void popElement()
Definition: blpapi_eventformatter.h:1583
Definition: blpapi_datetime.h:115