36#ifndef INCLUDED_BLPAPI_MESSAGEFORMATTER
37#define INCLUDED_BLPAPI_MESSAGEFORMATTER
98int blpapi_MessageFormatter_setValueBool(blpapi_MessageFormatter_t *formatter,
99 const blpapi_Name_t *typeName,
100 blpapi_Bool_t value);
103int blpapi_MessageFormatter_setValueChar(blpapi_MessageFormatter_t *formatter,
104 const blpapi_Name_t *typeName,
108int blpapi_MessageFormatter_setValueInt32(blpapi_MessageFormatter_t *formatter,
109 const blpapi_Name_t *typeName,
110 blpapi_Int32_t value);
113int blpapi_MessageFormatter_setValueInt64(blpapi_MessageFormatter_t *formatter,
114 const blpapi_Name_t *typeName,
115 blpapi_Int64_t value);
118int blpapi_MessageFormatter_setValueFloat32(
119 blpapi_MessageFormatter_t *formatter,
120 const blpapi_Name_t *typeName,
121 blpapi_Float32_t value);
124int blpapi_MessageFormatter_setValueFloat64(
125 blpapi_MessageFormatter_t *formatter,
126 const blpapi_Name_t *typeName,
127 blpapi_Float64_t value);
130int blpapi_MessageFormatter_setValueDatetime(
131 blpapi_MessageFormatter_t *formatter,
132 const blpapi_Name_t *typeName,
133 const blpapi_Datetime_t *value);
136int blpapi_MessageFormatter_setValueHighPrecisionDatetime(
137 blpapi_MessageFormatter_t *formatter,
138 const blpapi_Name_t *typeName,
139 const blpapi_HighPrecisionDatetime_t *value);
142int blpapi_MessageFormatter_setValueString(
143 blpapi_MessageFormatter_t *formatter,
144 const blpapi_Name_t *typeName,
148int blpapi_MessageFormatter_setValueFromName(
149 blpapi_MessageFormatter_t *formatter,
150 const blpapi_Name_t *typeName,
151 const blpapi_Name_t *value);
154int blpapi_MessageFormatter_setValueBytes(blpapi_MessageFormatter_t *formatter,
155 const blpapi_Name_t *typeName,
160int blpapi_MessageFormatter_setValueNull(
161 blpapi_MessageFormatter_t *formatter,
const blpapi_Name_t *typeName);
164int blpapi_MessageFormatter_pushElement(
165 blpapi_MessageFormatter_t *formatter,
const blpapi_Name_t *typeName);
168int blpapi_MessageFormatter_popElement(blpapi_MessageFormatter_t *formatter);
171int blpapi_MessageFormatter_appendValueBool(
172 blpapi_MessageFormatter_t *formatter, blpapi_Bool_t value);
175int blpapi_MessageFormatter_appendValueChar(
176 blpapi_MessageFormatter_t *formatter,
char value);
179int blpapi_MessageFormatter_appendValueInt32(
180 blpapi_MessageFormatter_t *formatter, blpapi_Int32_t value);
183int blpapi_MessageFormatter_appendValueInt64(
184 blpapi_MessageFormatter_t *formatter, blpapi_Int64_t value);
187int blpapi_MessageFormatter_appendValueFloat32(
188 blpapi_MessageFormatter_t *formatter, blpapi_Float32_t value);
191int blpapi_MessageFormatter_appendValueFloat64(
192 blpapi_MessageFormatter_t *formatter, blpapi_Float64_t value);
195int blpapi_MessageFormatter_appendValueDatetime(
196 blpapi_MessageFormatter_t *formatter,
const blpapi_Datetime_t *value);
199int blpapi_MessageFormatter_appendValueHighPrecisionDatetime(
200 blpapi_MessageFormatter_t *formatter,
201 const blpapi_HighPrecisionDatetime_t *value);
204int blpapi_MessageFormatter_appendValueString(
205 blpapi_MessageFormatter_t *formatter,
const char *value);
208int blpapi_MessageFormatter_appendValueFromName(
209 blpapi_MessageFormatter_t *formatter,
const blpapi_Name_t *value);
212int blpapi_MessageFormatter_appendElement(
213 blpapi_MessageFormatter_t *formatter);
216int blpapi_MessageFormatter_FormatMessageJson(
217 blpapi_MessageFormatter_t *formatter,
const char *message);
220int blpapi_MessageFormatter_FormatMessageXml(
221 blpapi_MessageFormatter_t *formatter,
const char *message);
224int blpapi_MessageFormatter_copy(blpapi_MessageFormatter_t **formatter,
225 const blpapi_MessageFormatter_t *original);
228int blpapi_MessageFormatter_assign(
229 blpapi_MessageFormatter_t **lhs,
const blpapi_MessageFormatter_t *rhs);
232int blpapi_MessageFormatter_destroy(blpapi_MessageFormatter_t *formatter);
235int blpapi_MessageFormatter_getElementDefinition(
236 blpapi_MessageFormatter_t *formatter,
237 blpapi_SchemaElementDefinition_t **definition);
240int blpapi_MessageFormatter_getElement(
241 blpapi_MessageFormatter_t *formatter, blpapi_Element_t **element);
250#include <type_traits>
281 blpapi_MessageFormatter_t *d_handle;
412 void setElement(
const Name& name,
const void *value,
size_t length);
425 template <
typename BYTES,
426 typename std::enable_if<IsByteSequence<BYTES>::value,
bool>::type
600 blpapi_MessageFormatter_t *
impl()
const;
633 &d_handle, original.
impl()));
640 &d_handle, rhs.
impl()));
648 d_handle, name.
impl(), value));
655 d_handle, name.
impl(), value));
661 BLPAPI_CALL(blpapi_MessageFormatter_setValueInt32)(
662 d_handle, name.
impl(), value));
668 BLPAPI_CALL(blpapi_MessageFormatter_setValueInt64)(
669 d_handle, name.
impl(), value));
675 BLPAPI_CALL(blpapi_MessageFormatter_setValueFloat32)(
676 d_handle, name.
impl(), value));
682 BLPAPI_CALL(blpapi_MessageFormatter_setValueFloat64)(
683 d_handle, name.
impl(), value));
690 BLPAPI_CALL(blpapi_MessageFormatter_setValueDatetime)(
698 BLPAPI_CALL(blpapi_MessageFormatter_setValueHighPrecisionDatetime)(
699 d_handle, name.
impl(), &value));
705 BLPAPI_CALL(blpapi_MessageFormatter_setValueString)(
706 d_handle, name.
impl(), value));
710 const Name& name,
const std::string& value)
718 BLPAPI_CALL(blpapi_MessageFormatter_setValueFromName)(
719 d_handle, name.
impl(), value.
impl()));
723 const Name& name,
const void *value,
size_t length)
726 BLPAPI_CALL(blpapi_MessageFormatter_setValueBytes)(d_handle,
728 reinterpret_cast<const char *
>(value),
732template <
typename BYTES,
733 typename std::enable_if<IsByteSequence<BYTES>::value,
bool>::type>
742 blpapi_MessageFormatter_setValueNull)(d_handle, name.
impl()));
748 blpapi_MessageFormatter_pushElement)(d_handle, name.
impl()));
754 BLPAPI_CALL(blpapi_MessageFormatter_popElement)(d_handle));
760 blpapi_MessageFormatter_appendValueBool)(d_handle, value));
766 blpapi_MessageFormatter_appendValueChar)(d_handle, value));
772 blpapi_MessageFormatter_appendValueInt32)(d_handle, value));
778 blpapi_MessageFormatter_appendValueInt64)(d_handle, value));
784 blpapi_MessageFormatter_appendValueFloat32)(d_handle, value));
790 blpapi_MessageFormatter_appendValueFloat64)(d_handle, value));
796 BLPAPI_CALL(blpapi_MessageFormatter_appendValueDatetime)(
803 blpapi_MessageFormatter_appendValueHighPrecisionDatetime)(
810 blpapi_MessageFormatter_appendValueString)(d_handle, value));
821 BLPAPI_CALL(blpapi_MessageFormatter_appendValueFromName)(
822 d_handle, value.
impl()));
828 BLPAPI_CALL(blpapi_MessageFormatter_appendElement)(d_handle));
839 blpapi_MessageFormatter_FormatMessageJson)(d_handle, message));
845 blpapi_MessageFormatter_FormatMessageXml)(d_handle, message));
Provide functions for dispatchtbl.
#define BLPAPI_CALL_UNCHECKED(FUNCNAME)
Definition blpapi_call.h:362
#define BLPAPI_CALL(FUNCNAME)
Definition blpapi_call.h:361
Common definitions used by the library.
A component which defines events related operations.
Provide representation of a Topic.
Definition blpapi_datetime.h:273
blpapi_HighPrecisionDatetime_t HighPrecision
Definition blpapi_datetime.h:299
blpapi_Datetime_t & rawValue()
Definition blpapi_datetime.h:1980
static void throwOnError(int errorCode)
Definition blpapi_exception.h:541
Definition blpapi_name.h:242
blpapi_Name_t * impl() const
Definition blpapi_name.h:495
Definition blpapi_messageformatter.h:261
Definition blpapi_abstractsession.h:212
blpapi_Float64_t Float64
Definition blpapi_types.h:485
blpapi_Float32_t Float32
Definition blpapi_types.h:484
blpapi_Int64_t Int64
Definition blpapi_types.h:482
blpapi_Int32_t Int32
Definition blpapi_types.h:480
Definition blpapi_abstractsession.h:211