28#ifndef INCLUDED_BLPAPI_MESSAGE
29#define INCLUDED_BLPAPI_MESSAGE
64#include <blpapi_deprecate.h>
253 BLPAPI_DEPRECATE_MESSAGE_TOPIC_NAME
const char *
topicName()
const;
311 bool hasElement(
const Name& name,
bool excludeNullElements =
false)
const;
317 const char *name,
bool excludeNullElements =
false)
const;
337 const char *name)
const;
374 const char *name)
const;
387 const char *name)
const;
400 const char *name)
const;
413 const char *name)
const;
426 const char *name)
const;
439 const char *name)
const;
470 std::string
toJson()
const;
511 std::ostream& stream,
int level = 0,
int spacesPerLevel = 4)
const;
542std::ostream&
operator<<(std::ostream& stream,
const Message& message);
565 , d_isCloned(clonable)
573 : d_handle(original.d_handle)
574 , d_elements(original.d_elements)
584 if (d_isCloned && d_handle) {
596 if (d_isCloned && (d_handle == rhs.d_handle)) {
600 if (d_isCloned && d_handle) {
603 d_handle = rhs.d_handle;
604 d_elements = rhs.d_elements;
643 const char *name,
bool excludeNullElements)
const
649 const Name& name,
bool excludeNullElements)
const
651 return d_elements.
hasElement(name, excludeNullElements);
753 const char *requestId = 0;
784 std::ostream& stream,
int level,
int spacesPerLevel)
const
795 return d_elements.
print(stream, level, spacesPerLevel);
801 return message.
print(stream, 0, -1);
Provide functions for dispatchtbl.
#define BLPAPI_CALL_MESSAGE_ADDREF(a1)
Definition blpapi_call.h:360
#define BLPAPI_CALL_MESSAGE_FRAGMENTTYPE(a1)
Definition blpapi_call.h:370
#define BLPAPI_CALL_AVAILABLE(FUNCNAME)
Definition blpapi_call.h:352
#define BLPAPI_CALL_MESSAGE_TIMERECEIVED(a1, a2)
Definition blpapi_call.h:453
#define BLPAPI_CALL(FUNCNAME)
Definition blpapi_call.h:353
#define BLPAPI_CALL_MESSAGE_RELEASE(a1)
Definition blpapi_call.h:361
Provide a key to identify individual subscriptions or requests.
Common definitions used by the library.
#define BLPAPI_MESSAGE_RECAPTYPE_NONE
Definition blpapi_defs.h:150
#define BLPAPI_MESSAGE_FRAGMENT_INTERMEDIATE
Definition blpapi_defs.h:147
#define BLPAPI_MESSAGE_FRAGMENT_END
Definition blpapi_defs.h:148
#define BLPAPI_MESSAGE_FRAGMENT_NONE
Definition blpapi_defs.h:145
#define BLPAPI_MESSAGE_FRAGMENT_START
Definition blpapi_defs.h:146
#define BLPAPI_MESSAGE_RECAPTYPE_UNSOLICITED
Definition blpapi_defs.h:152
#define BLPAPI_EXPORT
Definition blpapi_defs.h:172
#define BLPAPI_MESSAGE_RECAPTYPE_SOLICITED
Definition blpapi_defs.h:151
struct blpapi_CorrelationId_t_ blpapi_CorrelationId_t
Definition blpapi_dispatchtbl.h:74
struct blpapi_Message blpapi_Message_t
Definition blpapi_dispatchtbl.h:80
Provide a representation of an item in a message.
BLPAPI_EXPORT const char * blpapi_Message_privateData(const blpapi_Message_t *message, size_t *size)
BLPAPI_EXPORT int blpapi_Message_release(const blpapi_Message_t *message)
BLPAPI_EXPORT int blpapi_Message_fragmentType(const blpapi_Message_t *message)
BLPAPI_EXPORT int blpapi_Message_timeReceived(const blpapi_Message_t *message, blpapi_TimePoint_t *timeReceived)
BLPAPI_EXPORT const char * blpapi_Message_typeString(const blpapi_Message_t *message)
BLPAPI_EXPORT int blpapi_Message_getRequestId(const blpapi_Message_t *message, const char **requestId)
BLPAPI_EXPORT const char * blpapi_Message_topicName(const blpapi_Message_t *message)
BLPAPI_EXPORT blpapi_Name_t * blpapi_Message_messageType(const blpapi_Message_t *message)
BLPAPI_EXPORT blpapi_Service_t * blpapi_Message_service(const blpapi_Message_t *message)
BLPAPI_EXPORT int blpapi_Message_addRef(const blpapi_Message_t *message)
BLPAPI_EXPORT int blpapi_Message_recapType(const blpapi_Message_t *message)
BLPAPI_EXPORT blpapi_CorrelationId_t blpapi_Message_correlationId(const blpapi_Message_t *message, size_t index)
BLPAPI_EXPORT int blpapi_Message_numCorrelationIds(const blpapi_Message_t *message)
BLPAPI_EXPORT blpapi_Element_t * blpapi_Message_elements(const blpapi_Message_t *message)
BLPAPI_EXPORT int blpapi_Message_print(const blpapi_Message_t *message, blpapi_StreamWriter_t streamWriter, void *stream, int indentLevel, int spacesPerLevel)
Provide a representation of strings for use as container keys.
A service which provides access to API data (provide or consume).
A signature for callback on print and default C++ implementation.
int(* blpapi_StreamWriter_t)(const char *data, int length, void *stream)
Definition blpapi_streamproxy.h:53
Provide a time point with respect to an epoch.
Definition blpapi_types.h:312
Definition blpapi_correlationid.h:206
Definition blpapi_datetime.h:245
Definition blpapi_element.h:473
BLPAPI_DEPRECATE_STRING_NAME Datetime getElementAsDatetime(const char *name) const
Definition blpapi_element.h:2326
Bytes getElementAsBytes(const Name &name) const
Definition blpapi_element.h:2346
BLPAPI_DEPRECATE_STRING_NAME int getElement(Element *result, const char *name) const
Definition blpapi_element.h:1946
BLPAPI_DEPRECATE_STRING_NAME Float64 getElementAsFloat64(const char *name) const
Definition blpapi_element.h:2316
BLPAPI_DEPRECATE_STRING_NAME bool hasElement(const char *name, bool excludeNullElements=false) const
Definition blpapi_element.h:2037
BLPAPI_DEPRECATE_STRING_NAME bool getElementAsBool(const char *name) const
Definition blpapi_element.h:2266
std::ostream & print(std::ostream &stream, int level=0, int spacesPerLevel=4) const
Definition blpapi_element.h:2363
BLPAPI_DEPRECATE_STRING_NAME char getElementAsChar(const char *name) const
Definition blpapi_element.h:2276
std::string toJson() const
Definition blpapi_element.h:2374
BLPAPI_DEPRECATE_STRING_NAME Int64 getElementAsInt64(const char *name) const
Definition blpapi_element.h:2296
BLPAPI_DEPRECATE_STRING_NAME Int32 getElementAsInt32(const char *name) const
Definition blpapi_element.h:2286
BLPAPI_DEPRECATE_STRING_NAME const char * getElementAsString(const char *name) const
Definition blpapi_element.h:2336
BLPAPI_DEPRECATE_STRING_NAME Float32 getElementAsFloat32(const char *name) const
Definition blpapi_element.h:2306
size_t numElements() const
Definition blpapi_element.h:2021
Definition blpapi_exception.h:271
Definition blpapi_message.h:161
Service service() const
Definition blpapi_message.h:625
Fragment
Definition blpapi_message.h:171
@ FRAGMENT_END
the last fragmented message
Definition blpapi_message.h:179
@ FRAGMENT_NONE
message is not fragmented
Definition blpapi_message.h:173
@ FRAGMENT_INTERMEDIATE
intermediate fragmented messages
Definition blpapi_message.h:177
@ FRAGMENT_START
the first fragmented message
Definition blpapi_message.h:175
Bytes getElementAsBytes(const Name &name) const
Definition blpapi_message.h:746
Message & operator=(const Message &rhs)
Definition blpapi_message.h:589
const char * getElementAsString(const Name &name) const
Definition blpapi_message.h:736
const Element getElement(const Name &name) const
Definition blpapi_message.h:656
const Element asElement() const
Definition blpapi_message.h:758
int timeReceived(TimePoint *timestamp) const
Definition blpapi_message.h:778
BLPAPI_DEPRECATE_MESSAGE_TOPIC_NAME const char * topicName() const
Definition blpapi_message.h:620
CorrelationId correlationId(size_t index=0) const
Definition blpapi_message.h:635
BLPAPI_DEPRECATE_STRING_NAME const char * getPrivateData(size_t *size) const
Definition blpapi_message.h:762
std::ostream & print(std::ostream &stream, int level=0, int spacesPerLevel=4) const
Definition blpapi_message.h:783
int numCorrelationIds() const
Definition blpapi_message.h:630
~Message()
Definition blpapi_message.h:582
Message(const Message &original)
Definition blpapi_message.h:563
bool hasElement(const Name &name, bool excludeNullElements=false) const
Definition blpapi_message.h:648
Name messageType() const
Definition blpapi_message.h:615
std::string toJson() const
Definition blpapi_message.h:760
Fragment fragmentType() const
Definition blpapi_message.h:767
Int64 getElementAsInt64(const Name &name) const
Definition blpapi_message.h:696
RecapType::Type recapType() const
Definition blpapi_message.h:772
char getElementAsChar(const Name &name) const
Definition blpapi_message.h:676
const char * getRequestId() const
Definition blpapi_message.h:751
Float32 getElementAsFloat32(const Name &name) const
Definition blpapi_message.h:706
Datetime getElementAsDatetime(const Name &name) const
Definition blpapi_message.h:726
bool getElementAsBool(const Name &name) const
Definition blpapi_message.h:666
Int32 getElementAsInt32(const Name &name) const
Definition blpapi_message.h:686
Float64 getElementAsFloat64(const Name &name) const
Definition blpapi_message.h:716
size_t numElements() const
Definition blpapi_message.h:654
Definition blpapi_name.h:150
Definition blpapi_service.h:304
struct blpapi_Service blpapi_Service_t
Definition blpapi_types.h:166
struct blpapi_Name blpapi_Name_t
Definition blpapi_types.h:154
struct blpapi_Element blpapi_Element_t
Definition blpapi_types.h:136
blpapi_Float64_t Float64
Definition blpapi_types.h:474
blpapi_Float32_t Float32
Definition blpapi_types.h:473
blpapi_Int64_t Int64
Definition blpapi_types.h:471
std::ostream & operator<<(std::ostream &os, const CorrelationId &correlator)
Definition blpapi_correlationid.h:647
blpapi_Int32_t Int32
Definition blpapi_types.h:469
Definition blpapi_abstractsession.h:195
Definition blpapi_message.h:196
Type
Definition blpapi_message.h:197
@ e_unsolicited
generated at discretion of the service
Definition blpapi_message.h:202
@ e_solicited
generated on request by subscriber
Definition blpapi_message.h:200
@ e_none
normal data tick; not a recap
Definition blpapi_message.h:198
static int writeToStream(const char *data, int length, void *stream)
Definition blpapi_streamproxy.h:93
Definition blpapi_timepoint.h:104