38#ifndef INCLUDED_BLPAPI_MESSAGEFORMATTER
39#define INCLUDED_BLPAPI_MESSAGEFORMATTER
114int blpapi_MessageFormatter_setValueBool(blpapi_MessageFormatter_t *formatter,
115 const blpapi_Name_t *typeName,
116 blpapi_Bool_t value);
136int blpapi_MessageFormatter_setValueChar(blpapi_MessageFormatter_t *formatter,
137 const blpapi_Name_t *typeName,
158int blpapi_MessageFormatter_setValueInt32(blpapi_MessageFormatter_t *formatter,
159 const blpapi_Name_t *typeName,
160 blpapi_Int32_t value);
180int blpapi_MessageFormatter_setValueInt64(blpapi_MessageFormatter_t *formatter,
181 const blpapi_Name_t *typeName,
182 blpapi_Int64_t value);
202int blpapi_MessageFormatter_setValueFloat32(
203 blpapi_MessageFormatter_t *formatter,
204 const blpapi_Name_t *typeName,
205 blpapi_Float32_t value);
225int blpapi_MessageFormatter_setValueFloat64(
226 blpapi_MessageFormatter_t *formatter,
227 const blpapi_Name_t *typeName,
228 blpapi_Float64_t value);
249int blpapi_MessageFormatter_setValueDatetime(
250 blpapi_MessageFormatter_t *formatter,
251 const blpapi_Name_t *typeName,
252 const blpapi_Datetime_t *value);
274int blpapi_MessageFormatter_setValueHighPrecisionDatetime(
275 blpapi_MessageFormatter_t *formatter,
276 const blpapi_Name_t *typeName,
277 const blpapi_HighPrecisionDatetime_t *value);
299int blpapi_MessageFormatter_setValueString(
300 blpapi_MessageFormatter_t *formatter,
301 const blpapi_Name_t *typeName,
324int blpapi_MessageFormatter_setValueFromName(
325 blpapi_MessageFormatter_t *formatter,
326 const blpapi_Name_t *typeName,
327 const blpapi_Name_t *value);
350int blpapi_MessageFormatter_setValueBytes(blpapi_MessageFormatter_t *formatter,
351 const blpapi_Name_t *typeName,
373int blpapi_MessageFormatter_setValueNull(
374 blpapi_MessageFormatter_t *formatter,
const blpapi_Name_t *typeName);
399int blpapi_MessageFormatter_pushElement(
400 blpapi_MessageFormatter_t *formatter,
const blpapi_Name_t *typeName);
418int blpapi_MessageFormatter_popElement(blpapi_MessageFormatter_t *formatter);
435int blpapi_MessageFormatter_appendValueBool(
436 blpapi_MessageFormatter_t *formatter, blpapi_Bool_t value);
453int blpapi_MessageFormatter_appendValueChar(
454 blpapi_MessageFormatter_t *formatter,
char value);
471int blpapi_MessageFormatter_appendValueInt32(
472 blpapi_MessageFormatter_t *formatter, blpapi_Int32_t value);
489int blpapi_MessageFormatter_appendValueInt64(
490 blpapi_MessageFormatter_t *formatter, blpapi_Int64_t value);
508int blpapi_MessageFormatter_appendValueFloat32(
509 blpapi_MessageFormatter_t *formatter, blpapi_Float32_t value);
527int blpapi_MessageFormatter_appendValueFloat64(
528 blpapi_MessageFormatter_t *formatter, blpapi_Float64_t value);
547int blpapi_MessageFormatter_appendValueDatetime(
548 blpapi_MessageFormatter_t *formatter,
const blpapi_Datetime_t *value);
568int blpapi_MessageFormatter_appendValueHighPrecisionDatetime(
569 blpapi_MessageFormatter_t *formatter,
570 const blpapi_HighPrecisionDatetime_t *value);
589int blpapi_MessageFormatter_appendValueString(
590 blpapi_MessageFormatter_t *formatter,
const char *value);
608int blpapi_MessageFormatter_appendValueFromName(
609 blpapi_MessageFormatter_t *formatter,
const blpapi_Name_t *value);
627int blpapi_MessageFormatter_appendElement(
628 blpapi_MessageFormatter_t *formatter);
650int blpapi_MessageFormatter_FormatMessageJson(
651 blpapi_MessageFormatter_t *formatter,
const char *message);
673int blpapi_MessageFormatter_FormatMessageXml(
674 blpapi_MessageFormatter_t *formatter,
const char *message);
694int blpapi_MessageFormatter_copy(blpapi_MessageFormatter_t **formatter,
695 const blpapi_MessageFormatter_t *original);
712int blpapi_MessageFormatter_assign(
713 blpapi_MessageFormatter_t **lhs,
const blpapi_MessageFormatter_t *rhs);
730int blpapi_MessageFormatter_destroy(blpapi_MessageFormatter_t *formatter);
749int blpapi_MessageFormatter_getElementDefinition(
750 blpapi_MessageFormatter_t *formatter,
751 blpapi_SchemaElementDefinition_t **definition);
770int blpapi_MessageFormatter_getElement(
771 blpapi_MessageFormatter_t *formatter, blpapi_Element_t **element);
780#include <type_traits>
811 blpapi_MessageFormatter_t *d_handle;
942 void setElement(
const Name& name,
const void *value,
size_t length);
955 template <
typename BYTES,
956 typename std::enable_if<IsByteSequence<BYTES>::value,
bool>::type
1130 blpapi_MessageFormatter_t *impl()
const;
1157 BLPAPI_CALL_UNCHECKED(blpapi_MessageFormatter_destroy)(d_handle);
1164 &d_handle, original.impl()));
1171 &d_handle, rhs.impl()));
1178 BLPAPI_CALL(blpapi_MessageFormatter_setValueBool)(
1179 d_handle, name.impl(), value));
1185 BLPAPI_CALL(blpapi_MessageFormatter_setValueChar)(
1186 d_handle, name.impl(), value));
1192 BLPAPI_CALL(blpapi_MessageFormatter_setValueInt32)(
1193 d_handle, name.impl(), value));
1199 BLPAPI_CALL(blpapi_MessageFormatter_setValueInt64)(
1200 d_handle, name.impl(), value));
1206 BLPAPI_CALL(blpapi_MessageFormatter_setValueFloat32)(
1207 d_handle, name.impl(), value));
1213 BLPAPI_CALL(blpapi_MessageFormatter_setValueFloat64)(
1214 d_handle, name.impl(), value));
1221 BLPAPI_CALL(blpapi_MessageFormatter_setValueDatetime)(
1222 d_handle, name.impl(), &value.
rawValue()));
1229 BLPAPI_CALL(blpapi_MessageFormatter_setValueHighPrecisionDatetime)(
1230 d_handle, name.impl(), &value));
1236 BLPAPI_CALL(blpapi_MessageFormatter_setValueString)(
1237 d_handle, name.impl(), value));
1241 const Name& name,
const std::string& value)
1249 BLPAPI_CALL(blpapi_MessageFormatter_setValueFromName)(
1250 d_handle, name.impl(), value.impl()));
1254 const Name& name,
const void *value,
size_t length)
1257 BLPAPI_CALL(blpapi_MessageFormatter_setValueBytes)(d_handle,
1259 reinterpret_cast<const char *
>(value),
1263template <
typename BYTES,
1264 typename std::enable_if<IsByteSequence<BYTES>::value,
bool>::type>
1267 setElement(name, value.data(), value.size());
1273 blpapi_MessageFormatter_setValueNull)(d_handle, name.impl()));
1279 blpapi_MessageFormatter_pushElement)(d_handle, name.impl()));
1285 BLPAPI_CALL(blpapi_MessageFormatter_popElement)(d_handle));
1291 blpapi_MessageFormatter_appendValueBool)(d_handle, value));
1297 blpapi_MessageFormatter_appendValueChar)(d_handle, value));
1303 blpapi_MessageFormatter_appendValueInt32)(d_handle, value));
1309 blpapi_MessageFormatter_appendValueInt64)(d_handle, value));
1315 blpapi_MessageFormatter_appendValueFloat32)(d_handle, value));
1321 blpapi_MessageFormatter_appendValueFloat64)(d_handle, value));
1327 BLPAPI_CALL(blpapi_MessageFormatter_appendValueDatetime)(
1334 blpapi_MessageFormatter_appendValueHighPrecisionDatetime)(
1341 blpapi_MessageFormatter_appendValueString)(d_handle, value));
1352 BLPAPI_CALL(blpapi_MessageFormatter_appendValueFromName)(
1353 d_handle, value.impl()));
1359 BLPAPI_CALL(blpapi_MessageFormatter_appendElement)(d_handle));
1363inline blpapi_MessageFormatter_t *MessageFormatter::impl()
const
1372 blpapi_MessageFormatter_FormatMessageJson)(d_handle, message));
1378 blpapi_MessageFormatter_FormatMessageXml)(d_handle, message));
Provide functions for dispatchtbl.
Common definitions used by the library.
A component which defines events related operations.
Provide representation of a Topic.
Definition blpapi_datetime.h:312
blpapi_HighPrecisionDatetime_t HighPrecision
Definition blpapi_datetime.h:338
blpapi_Datetime_t & rawValue()
Definition blpapi_datetime.h:2018
static void throwOnError(int errorCode)
Definition blpapi_exception.h:556
Definition blpapi_name.h:228
Definition blpapi_messageformatter.h:791
Definition blpapi_abstractsession.h:452
blpapi_Float64_t Float64
64-bit IEEE 754 float type alias.
Definition blpapi_types.h:559
blpapi_Float32_t Float32
32-bit IEEE 754 float type alias.
Definition blpapi_types.h:558
blpapi_Int64_t Int64
64-bit signed integer type alias.
Definition blpapi_types.h:556
blpapi_Int32_t Int32
32-bit signed integer type alias.
Definition blpapi_types.h:554
Definition blpapi_abstractsession.h:451