BLPAPI C++  3.24.2
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  void appendMessage(const char *messageType, const Topic& topic);
843  void appendMessage(const char *messageType,
844  const Topic& topic,
845  unsigned int sequenceNumber);
860  void appendResponse(const char *operationName);
874  void appendRecapMessage(const char *messageType,
875  const Topic& topic,
898  void appendRecapMessage(const char *messageType,
899  const Topic& topic,
900  unsigned int sequenceNumber);
917  void appendRecapMessage(const char *messageType,
918  const Topic& topic,
919  Message::Fragment fragmentType,
920  unsigned int sequenceNumber);
944  void appendRecapMessage(const char *messageType,
945  const CorrelationId& cid,
969  void setElement(const char *name, bool value);
986  void setElement(const char *name, char value);
1003  void setElement(const char *name, Int32 value);
1020  void setElement(const char *name, Int64 value);
1037  void setElement(const char *name, Float32 value);
1054  void setElement(const char *name, Float64 value);
1071  void setElement(const char *name, const Datetime& value);
1089  void setElement(const char *name, const Datetime::HighPrecision& value);
1108  void setElement(const char *name, const char *value);
1128  void setElement(const char *name, const Name& value);
1145  void setElementNull(const char *name);
1163  void pushElement(const char *name);
1172 };
1173 
1177 // ============================================================================
1178 // INLINE AND TEMPLATE FUNCTION IMPLEMENTATIONS
1179 // ============================================================================
1180 
1181 // --------------------
1182 // class EventFormatter
1183 // --------------------
1184 
1185 inline EventFormatter::EventFormatter(Event& event)
1186 {
1187  d_handle = blpapi_EventFormatter_create(event.impl());
1188 }
1189 
1191 {
1193 }
1194 
1196  const char *messageType, const Topic& topic)
1197 {
1199  d_handle, messageType, 0, topic.impl()));
1200 }
1201 
1203  const Name& messageType, const Topic& topic)
1204 {
1206  d_handle, 0, messageType.impl(), topic.impl()));
1207 }
1208 
1209 inline void EventFormatter::appendMessage(const char *messageType,
1210  const Topic& topic,
1211  unsigned int sequenceNumber)
1212 {
1214  d_handle, messageType, 0, topic.impl(), sequenceNumber, 0));
1215 }
1216 
1217 inline void EventFormatter::appendMessage(const Name& messageType,
1218  const Topic& topic,
1219  unsigned int sequenceNumber)
1220 {
1222  d_handle, 0, messageType.impl(), topic.impl(), sequenceNumber, 0));
1223 }
1224 
1225 inline void EventFormatter::appendResponse(const char *operationName)
1226 {
1228  blpapi_EventFormatter_appendResponse(d_handle, operationName, 0));
1229 }
1230 
1231 inline void EventFormatter::appendResponse(const Name& operationName)
1232 {
1234  d_handle, 0, operationName.impl()));
1235 }
1236 
1238  const Topic& topic, const CorrelationId *cid)
1239 {
1241  d_handle, topic.impl(), cid ? &cid->impl() : 0));
1242 }
1243 
1245  const Topic& topic, Message::Fragment fragmentType)
1246 {
1249  0, // 'typeString'
1250  0, // 'typeName'
1251  topic.impl(), // 'topic'
1252  0, // 'cid'
1253  static_cast<int>(fragmentType)));
1254 }
1255 
1256 inline void EventFormatter::appendRecapMessage(const Name& messageType,
1257  const Topic& topic,
1258  Message::Fragment fragmentType)
1259 {
1262  0, // 'typeString'
1263  messageType.impl(), // 'typeName'
1264  topic.impl(), // 'topic'
1265  0, // 'cid'
1266  static_cast<int>(fragmentType)));
1267 }
1268 
1269 inline void EventFormatter::appendRecapMessage(const char *messageType,
1270  const Topic& topic,
1271  Message::Fragment fragmentType)
1272 {
1275  messageType, // 'typeString'
1276  0, // 'typeName'
1277  topic.impl(), // 'topic'
1278  0, // 'cid'
1279  static_cast<int>(fragmentType)));
1280 }
1281 
1283  unsigned int sequenceNumber,
1284  const CorrelationId *cid)
1285 {
1288  topic.impl(),
1289  cid ? &cid->impl() : 0,
1290  sequenceNumber,
1291  0));
1292 }
1293 
1294 inline void EventFormatter::appendRecapMessage(const Name& messageType,
1295  const Topic& topic,
1296  unsigned int sequenceNumber)
1297 {
1300  0, // 'typeString'
1301  messageType.impl(), // 'typeName'
1302  topic.impl(), // 'topic'
1303  static_cast<int>(Message::FRAGMENT_NONE),
1304  sequenceNumber));
1305 }
1306 
1307 inline void EventFormatter::appendRecapMessage(const char *messageType,
1308  const Topic& topic,
1309  unsigned int sequenceNumber)
1310 {
1313  messageType, // 'typeString'
1314  0, // 'typeName'
1315  topic.impl(), // 'topic'
1316  static_cast<int>(Message::FRAGMENT_NONE),
1317  sequenceNumber));
1318 }
1319 
1321  Message::Fragment fragmentType,
1322  unsigned int sequenceNumber)
1323 {
1326  0, // 'typeString'
1327  0, // 'typeName'
1328  topic.impl(), // 'topic'
1329  static_cast<int>(fragmentType),
1330  sequenceNumber));
1331 }
1332 
1333 inline void EventFormatter::appendRecapMessage(const Name& messageType,
1334  const Topic& topic,
1335  Message::Fragment fragmentType,
1336  unsigned int sequenceNumber)
1337 {
1340  0, // 'typeString'
1341  messageType.impl(), // 'typeName'
1342  topic.impl(), // 'topic'
1343  static_cast<int>(fragmentType),
1344  sequenceNumber));
1345 }
1346 
1347 inline void EventFormatter::appendRecapMessage(const char *messageType,
1348  const Topic& topic,
1349  Message::Fragment fragmentType,
1350  unsigned int sequenceNumber)
1351 {
1354  messageType, // 'typeString'
1355  0, // 'typeName'
1356  topic.impl(), // 'topic'
1357  static_cast<int>(fragmentType),
1358  sequenceNumber));
1359 }
1360 
1362  const CorrelationId& cid, Message::Fragment fragmentType)
1363 {
1366  0, // 'typeString'
1367  0, // 'typeName'
1368  0, // 'topic'
1369  &cid.impl(), // 'cid'
1370  static_cast<int>(fragmentType)));
1371 }
1372 
1373 inline void EventFormatter::appendRecapMessage(const Name& messageType,
1374  const CorrelationId& cid,
1375  Message::Fragment fragmentType)
1376 {
1379  0, // 'typeString'
1380  messageType.impl(), // 'typeName'
1381  0, // 'topic'
1382  &cid.impl(), // 'cid'
1383  static_cast<int>(fragmentType)));
1384 }
1385 
1386 inline void EventFormatter::appendRecapMessage(const char *messageType,
1387  const CorrelationId& cid,
1388  Message::Fragment fragmentType)
1389 {
1392  messageType, // 'typeString'
1393  0, // 'typeName'
1394  0, // 'topic'
1395  &cid.impl(), // 'cid'
1396  static_cast<int>(fragmentType)));
1397 }
1398 
1399 inline void EventFormatter::setElement(const char *name, bool value)
1400 {
1402  blpapi_EventFormatter_setValueBool(d_handle, name, 0, value));
1403 }
1404 
1405 inline void EventFormatter::setElement(const char *name, char value)
1406 {
1408  blpapi_EventFormatter_setValueChar(d_handle, name, 0, value));
1409 }
1410 
1411 inline void EventFormatter::setElement(const char *name, Int32 value)
1412 {
1414  blpapi_EventFormatter_setValueInt32(d_handle, name, 0, value));
1415 }
1416 
1417 inline void EventFormatter::setElement(const char *name, Int64 value)
1418 {
1420  blpapi_EventFormatter_setValueInt64(d_handle, name, 0, value));
1421 }
1422 
1423 inline void EventFormatter::setElement(const char *name, Float32 value)
1424 {
1426  blpapi_EventFormatter_setValueFloat32(d_handle, name, 0, value));
1427 }
1428 
1429 inline void EventFormatter::setElement(const char *name, Float64 value)
1430 {
1432  blpapi_EventFormatter_setValueFloat64(d_handle, name, 0, value));
1433 }
1434 
1435 inline void EventFormatter::setElement(const char *name, const Datetime& value)
1436 {
1438  d_handle, name, 0, &value.rawValue()));
1439 }
1440 
1442  const char *name, const Datetime::HighPrecision& value)
1443 {
1446  d_handle, name, 0, &value));
1447 }
1448 
1449 inline void EventFormatter::setElement(const char *name, const char *value)
1450 {
1452  blpapi_EventFormatter_setValueString(d_handle, name, 0, value));
1453 }
1454 
1455 inline void EventFormatter::setElement(const char *name, const Name& value)
1456 {
1458  d_handle, name, 0, value.impl()));
1459 }
1460 
1461 inline void EventFormatter::setElementNull(const char *name)
1462 {
1464  BLPAPI_CALL_EVENTFORMATTER_SETVALUENULL(d_handle, name, 0));
1465 }
1466 
1467 inline void EventFormatter::setElement(const Name& name, bool value)
1468 {
1470  d_handle, 0, name.impl(), value));
1471 }
1472 
1473 inline void EventFormatter::setElement(const Name& name, char value)
1474 {
1476  d_handle, 0, name.impl(), value));
1477 }
1478 
1479 inline void EventFormatter::setElement(const Name& name, Int32 value)
1480 {
1482  d_handle, 0, name.impl(), value));
1483 }
1484 
1485 inline void EventFormatter::setElement(const Name& name, Int64 value)
1486 {
1488  d_handle, 0, name.impl(), value));
1489 }
1490 
1491 inline void EventFormatter::setElement(const Name& name, Float32 value)
1492 {
1494  d_handle, 0, name.impl(), value));
1495 }
1496 inline void EventFormatter::setElement(const Name& name, Float64 value)
1497 {
1499  d_handle, 0, name.impl(), value));
1500 }
1501 
1502 inline void EventFormatter::setElement(const Name& name, const Datetime& value)
1503 {
1505  d_handle, 0, name.impl(), &value.rawValue()));
1506 }
1507 
1509  const Name& name, const Datetime::HighPrecision& value)
1510 {
1513  d_handle, 0, name.impl(), &value));
1514 }
1515 
1516 inline void EventFormatter::setElement(const Name& name, const char *value)
1517 {
1519  d_handle, 0, name.impl(), value));
1520 }
1521 
1523  const Name& name, const std::string& value)
1524 {
1525  setElement(name, value.c_str());
1526 }
1527 
1528 inline void EventFormatter::setElement(const Name& name, const Name& value)
1529 {
1531  d_handle, 0, name.impl(), value.impl()));
1532 }
1533 
1535  const Name& name, const void *value, size_t length)
1536 {
1539  0,
1540  name.impl(),
1541  reinterpret_cast<const char *>(value),
1542  length));
1543 }
1544 
1545 template <typename BYTES,
1546  typename std::enable_if<IsByteSequence<BYTES>::value, bool>::type>
1547 inline void EventFormatter::setElement(const Name& name, const BYTES& value)
1548 {
1549  setElement(name, value.data(), value.size());
1550 }
1551 
1552 inline void EventFormatter::setElementNull(const Name& name)
1553 {
1555  BLPAPI_CALL_EVENTFORMATTER_SETVALUENULL(d_handle, 0, name.impl()));
1556 }
1557 
1558 inline void EventFormatter::pushElement(const char *name)
1559 {
1561  blpapi_EventFormatter_pushElement(d_handle, name, 0));
1562 }
1563 
1564 inline void EventFormatter::pushElement(const Name& name)
1565 {
1567  blpapi_EventFormatter_pushElement(d_handle, 0, name.impl()));
1568 }
1569 
1571 {
1573 }
1574 
1575 inline void EventFormatter::appendValue(bool value)
1576 {
1578  blpapi_EventFormatter_appendValueBool(d_handle, value));
1579 }
1580 
1581 inline void EventFormatter::appendValue(char value)
1582 {
1584  blpapi_EventFormatter_appendValueChar(d_handle, value));
1585 }
1586 
1588 {
1590  blpapi_EventFormatter_appendValueInt32(d_handle, value));
1591 }
1592 
1594 {
1596  blpapi_EventFormatter_appendValueInt64(d_handle, value));
1597 }
1598 
1600 {
1602  blpapi_EventFormatter_appendValueFloat32(d_handle, value));
1603 }
1604 
1606 {
1608  blpapi_EventFormatter_appendValueFloat64(d_handle, value));
1609 }
1610 
1611 inline void EventFormatter::appendValue(const Datetime& value)
1612 {
1614  d_handle, &value.rawValue()));
1615 }
1616 
1618 {
1621  d_handle, &value));
1622 }
1623 
1624 inline void EventFormatter::appendValue(const char *value)
1625 {
1627  blpapi_EventFormatter_appendValueString(d_handle, value));
1628 }
1629 
1630 inline void EventFormatter::appendValue(const std::string& value)
1631 {
1632  appendValue(value.c_str());
1633 }
1634 
1635 inline void EventFormatter::appendValue(const Name& value)
1636 {
1638  blpapi_EventFormatter_appendValueFromName(d_handle, value.impl()));
1639 }
1640 
1642 {
1644 }
1645 
1646 } // close namespace blpapi
1647 } // close namespace BloombergLP
1648 
1649 #endif // #ifdef __cplusplus
1650 #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:171
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:1564
void setElement(const Name &name, bool value)
Definition: blpapi_eventformatter.h:1467
void setElementNull(const Name &name)
Definition: blpapi_eventformatter.h:1552
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:1641
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:1190
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:1231
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:1202
double blpapi_Float64_t
Definition: blpapi_types.h:72
Definition: blpapi_topic.h:114
Fragment
Definition: blpapi_message.h:169
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:1575
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:1237
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:1570
Definition: blpapi_datetime.h:115