BLPAPI C++  3.24.4
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);
1173 };
1174 
1178 // ============================================================================
1179 // INLINE AND TEMPLATE FUNCTION IMPLEMENTATIONS
1180 // ============================================================================
1181 
1182 // --------------------
1183 // class EventFormatter
1184 // --------------------
1185 
1186 inline EventFormatter::EventFormatter(Event& event)
1187 {
1188  d_handle = blpapi_EventFormatter_create(event.impl());
1189 }
1190 
1192 {
1194 }
1195 
1197  const char *messageType, const Topic& topic)
1198 {
1200  d_handle, messageType, 0, topic.impl()));
1201 }
1202 
1204  const Name& messageType, const Topic& topic)
1205 {
1207  d_handle, 0, messageType.impl(), topic.impl()));
1208 }
1209 
1210 inline void EventFormatter::appendMessage(const char *messageType,
1211  const Topic& topic,
1212  unsigned int sequenceNumber)
1213 {
1215  d_handle, messageType, 0, topic.impl(), sequenceNumber, 0));
1216 }
1217 
1218 inline void EventFormatter::appendMessage(const Name& messageType,
1219  const Topic& topic,
1220  unsigned int sequenceNumber)
1221 {
1223  d_handle, 0, messageType.impl(), topic.impl(), sequenceNumber, 0));
1224 }
1225 
1226 inline void EventFormatter::appendResponse(const char *operationName)
1227 {
1229  blpapi_EventFormatter_appendResponse(d_handle, operationName, 0));
1230 }
1231 
1232 inline void EventFormatter::appendResponse(const Name& operationName)
1233 {
1235  d_handle, 0, operationName.impl()));
1236 }
1237 
1239  const Topic& topic, const CorrelationId *cid)
1240 {
1242  d_handle, topic.impl(), cid ? &cid->impl() : 0));
1243 }
1244 
1246  const Topic& topic, Message::Fragment fragmentType)
1247 {
1250  0, // 'typeString'
1251  0, // 'typeName'
1252  topic.impl(), // 'topic'
1253  0, // 'cid'
1254  static_cast<int>(fragmentType)));
1255 }
1256 
1257 inline void EventFormatter::appendRecapMessage(const Name& messageType,
1258  const Topic& topic,
1259  Message::Fragment fragmentType)
1260 {
1263  0, // 'typeString'
1264  messageType.impl(), // 'typeName'
1265  topic.impl(), // 'topic'
1266  0, // 'cid'
1267  static_cast<int>(fragmentType)));
1268 }
1269 
1270 inline void EventFormatter::appendRecapMessage(const char *messageType,
1271  const Topic& topic,
1272  Message::Fragment fragmentType)
1273 {
1276  messageType, // 'typeString'
1277  0, // 'typeName'
1278  topic.impl(), // 'topic'
1279  0, // 'cid'
1280  static_cast<int>(fragmentType)));
1281 }
1282 
1284  unsigned int sequenceNumber,
1285  const CorrelationId *cid)
1286 {
1289  topic.impl(),
1290  cid ? &cid->impl() : 0,
1291  sequenceNumber,
1292  0));
1293 }
1294 
1295 inline void EventFormatter::appendRecapMessage(const Name& messageType,
1296  const Topic& topic,
1297  unsigned int sequenceNumber)
1298 {
1301  0, // 'typeString'
1302  messageType.impl(), // 'typeName'
1303  topic.impl(), // 'topic'
1304  static_cast<int>(Message::FRAGMENT_NONE),
1305  sequenceNumber));
1306 }
1307 
1308 inline void EventFormatter::appendRecapMessage(const char *messageType,
1309  const Topic& topic,
1310  unsigned int sequenceNumber)
1311 {
1314  messageType, // 'typeString'
1315  0, // 'typeName'
1316  topic.impl(), // 'topic'
1317  static_cast<int>(Message::FRAGMENT_NONE),
1318  sequenceNumber));
1319 }
1320 
1322  Message::Fragment fragmentType,
1323  unsigned int sequenceNumber)
1324 {
1327  0, // 'typeString'
1328  0, // 'typeName'
1329  topic.impl(), // 'topic'
1330  static_cast<int>(fragmentType),
1331  sequenceNumber));
1332 }
1333 
1334 inline void EventFormatter::appendRecapMessage(const Name& messageType,
1335  const Topic& topic,
1336  Message::Fragment fragmentType,
1337  unsigned int sequenceNumber)
1338 {
1341  0, // 'typeString'
1342  messageType.impl(), // 'typeName'
1343  topic.impl(), // 'topic'
1344  static_cast<int>(fragmentType),
1345  sequenceNumber));
1346 }
1347 
1348 inline void EventFormatter::appendRecapMessage(const char *messageType,
1349  const Topic& topic,
1350  Message::Fragment fragmentType,
1351  unsigned int sequenceNumber)
1352 {
1355  messageType, // 'typeString'
1356  0, // 'typeName'
1357  topic.impl(), // 'topic'
1358  static_cast<int>(fragmentType),
1359  sequenceNumber));
1360 }
1361 
1363  const CorrelationId& cid, Message::Fragment fragmentType)
1364 {
1367  0, // 'typeString'
1368  0, // 'typeName'
1369  0, // 'topic'
1370  &cid.impl(), // 'cid'
1371  static_cast<int>(fragmentType)));
1372 }
1373 
1374 inline void EventFormatter::appendRecapMessage(const Name& messageType,
1375  const CorrelationId& cid,
1376  Message::Fragment fragmentType)
1377 {
1380  0, // 'typeString'
1381  messageType.impl(), // 'typeName'
1382  0, // 'topic'
1383  &cid.impl(), // 'cid'
1384  static_cast<int>(fragmentType)));
1385 }
1386 
1387 inline void EventFormatter::appendRecapMessage(const char *messageType,
1388  const CorrelationId& cid,
1389  Message::Fragment fragmentType)
1390 {
1393  messageType, // 'typeString'
1394  0, // 'typeName'
1395  0, // 'topic'
1396  &cid.impl(), // 'cid'
1397  static_cast<int>(fragmentType)));
1398 }
1399 
1400 inline void EventFormatter::setElement(const char *name, bool value)
1401 {
1403  blpapi_EventFormatter_setValueBool(d_handle, name, 0, value));
1404 }
1405 
1406 inline void EventFormatter::setElement(const char *name, char value)
1407 {
1409  blpapi_EventFormatter_setValueChar(d_handle, name, 0, value));
1410 }
1411 
1412 inline void EventFormatter::setElement(const char *name, Int32 value)
1413 {
1415  blpapi_EventFormatter_setValueInt32(d_handle, name, 0, value));
1416 }
1417 
1418 inline void EventFormatter::setElement(const char *name, Int64 value)
1419 {
1421  blpapi_EventFormatter_setValueInt64(d_handle, name, 0, value));
1422 }
1423 
1424 inline void EventFormatter::setElement(const char *name, Float32 value)
1425 {
1427  blpapi_EventFormatter_setValueFloat32(d_handle, name, 0, value));
1428 }
1429 
1430 inline void EventFormatter::setElement(const char *name, Float64 value)
1431 {
1433  blpapi_EventFormatter_setValueFloat64(d_handle, name, 0, value));
1434 }
1435 
1436 inline void EventFormatter::setElement(const char *name, const Datetime& value)
1437 {
1439  d_handle, name, 0, &value.rawValue()));
1440 }
1441 
1443  const char *name, const Datetime::HighPrecision& value)
1444 {
1447  d_handle, name, 0, &value));
1448 }
1449 
1450 inline void EventFormatter::setElement(const char *name, const char *value)
1451 {
1453  blpapi_EventFormatter_setValueString(d_handle, name, 0, value));
1454 }
1455 
1456 inline void EventFormatter::setElement(const char *name, const Name& value)
1457 {
1459  d_handle, name, 0, value.impl()));
1460 }
1461 
1462 inline void EventFormatter::setElementNull(const char *name)
1463 {
1465  BLPAPI_CALL_EVENTFORMATTER_SETVALUENULL(d_handle, name, 0));
1466 }
1467 
1468 inline void EventFormatter::setElement(const Name& name, bool value)
1469 {
1471  d_handle, 0, name.impl(), value));
1472 }
1473 
1474 inline void EventFormatter::setElement(const Name& name, char value)
1475 {
1477  d_handle, 0, name.impl(), value));
1478 }
1479 
1480 inline void EventFormatter::setElement(const Name& name, Int32 value)
1481 {
1483  d_handle, 0, name.impl(), value));
1484 }
1485 
1486 inline void EventFormatter::setElement(const Name& name, Int64 value)
1487 {
1489  d_handle, 0, name.impl(), value));
1490 }
1491 
1492 inline void EventFormatter::setElement(const Name& name, Float32 value)
1493 {
1495  d_handle, 0, name.impl(), value));
1496 }
1497 inline void EventFormatter::setElement(const Name& name, Float64 value)
1498 {
1500  d_handle, 0, name.impl(), value));
1501 }
1502 
1503 inline void EventFormatter::setElement(const Name& name, const Datetime& value)
1504 {
1506  d_handle, 0, name.impl(), &value.rawValue()));
1507 }
1508 
1510  const Name& name, const Datetime::HighPrecision& value)
1511 {
1514  d_handle, 0, name.impl(), &value));
1515 }
1516 
1517 inline void EventFormatter::setElement(const Name& name, const char *value)
1518 {
1520  d_handle, 0, name.impl(), value));
1521 }
1522 
1524  const Name& name, const std::string& value)
1525 {
1526  setElement(name, value.c_str());
1527 }
1528 
1529 inline void EventFormatter::setElement(const Name& name, const Name& value)
1530 {
1532  d_handle, 0, name.impl(), value.impl()));
1533 }
1534 
1536  const Name& name, const void *value, size_t length)
1537 {
1540  0,
1541  name.impl(),
1542  reinterpret_cast<const char *>(value),
1543  length));
1544 }
1545 
1546 template <typename BYTES,
1547  typename std::enable_if<IsByteSequence<BYTES>::value, bool>::type>
1548 inline void EventFormatter::setElement(const Name& name, const BYTES& value)
1549 {
1550  setElement(name, value.data(), value.size());
1551 }
1552 
1553 inline void EventFormatter::setElementNull(const Name& name)
1554 {
1556  BLPAPI_CALL_EVENTFORMATTER_SETVALUENULL(d_handle, 0, name.impl()));
1557 }
1558 
1559 inline void EventFormatter::pushElement(const char *name)
1560 {
1562  blpapi_EventFormatter_pushElement(d_handle, name, 0));
1563 }
1564 
1565 inline void EventFormatter::pushElement(const Name& name)
1566 {
1568  blpapi_EventFormatter_pushElement(d_handle, 0, name.impl()));
1569 }
1570 
1572 {
1574 }
1575 
1576 inline void EventFormatter::appendValue(bool value)
1577 {
1579  blpapi_EventFormatter_appendValueBool(d_handle, value));
1580 }
1581 
1582 inline void EventFormatter::appendValue(char value)
1583 {
1585  blpapi_EventFormatter_appendValueChar(d_handle, value));
1586 }
1587 
1589 {
1591  blpapi_EventFormatter_appendValueInt32(d_handle, value));
1592 }
1593 
1595 {
1597  blpapi_EventFormatter_appendValueInt64(d_handle, value));
1598 }
1599 
1601 {
1603  blpapi_EventFormatter_appendValueFloat32(d_handle, value));
1604 }
1605 
1607 {
1609  blpapi_EventFormatter_appendValueFloat64(d_handle, value));
1610 }
1611 
1612 inline void EventFormatter::appendValue(const Datetime& value)
1613 {
1615  d_handle, &value.rawValue()));
1616 }
1617 
1619 {
1622  d_handle, &value));
1623 }
1624 
1625 inline void EventFormatter::appendValue(const char *value)
1626 {
1628  blpapi_EventFormatter_appendValueString(d_handle, value));
1629 }
1630 
1631 inline void EventFormatter::appendValue(const std::string& value)
1632 {
1633  appendValue(value.c_str());
1634 }
1635 
1636 inline void EventFormatter::appendValue(const Name& value)
1637 {
1639  blpapi_EventFormatter_appendValueFromName(d_handle, value.impl()));
1640 }
1641 
1643 {
1645 }
1646 
1647 } // close namespace blpapi
1648 } // close namespace BloombergLP
1649 
1650 #endif // #ifdef __cplusplus
1651 #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:1565
void setElement(const Name &name, bool value)
Definition: blpapi_eventformatter.h:1468
void setElementNull(const Name &name)
Definition: blpapi_eventformatter.h:1553
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
struct blpapi_Topic blpapi_Topic_t
Definition: blpapi_topic.h:68
A component which defines events related operations.
struct blpapi_SchemaElementDefinition blpapi_SchemaElementDefinition_t
Definition: blpapi_types.h:191
void appendElement()
Definition: blpapi_eventformatter.h:1642
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:1191
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:1232
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
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:1203
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:1576
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:1238
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:1571
Definition: blpapi_datetime.h:115