28 #ifndef INCLUDED_BLPAPI_MESSAGE 29 #define INCLUDED_BLPAPI_MESSAGE 69 struct blpapi_Message;
309 bool hasElement(
const Name& name,
bool excludeNullElements =
false)
const;
314 bool hasElement(
const char *name,
bool excludeNullElements =
false)
const;
489 std::ostream& stream,
int level = 0,
int spacesPerLevel = 4)
const;
520 std::ostream&
operator<<(std::ostream& stream,
const Message& message);
543 , d_isCloned(clonable)
551 : d_handle(original.d_handle)
552 , d_elements(original.d_elements)
562 if (d_isCloned && d_handle) {
574 if (d_isCloned && (d_handle == rhs.d_handle)) {
578 if (d_isCloned && d_handle) {
581 d_handle = rhs.d_handle;
582 d_elements = rhs.d_elements;
621 const char *name,
bool excludeNullElements)
const 623 return d_elements.
hasElement(name, excludeNullElements);
627 const Name& name,
bool excludeNullElements)
const 629 return d_elements.
hasElement(name, excludeNullElements);
731 const char *requestId = 0;
750 return static_cast<Message::RecapType::Type>(
760 std::ostream& stream,
int level,
int spacesPerLevel)
const 771 return d_elements.
print(stream, level, spacesPerLevel);
777 return message.
print(stream, 0, -1);
787 #endif // #ifdef __cplusplus 788 #endif // #ifndef INCLUDED_BLPAPI_MESSAGE Int64 getElementAsInt64(const Name &name) const
Definition: blpapi_message.h:674
int blpapi_Message_recapType(const blpapi_Message_t *message)
the first fragmented message
Definition: blpapi_message.h:173
Definition: blpapi_timepoint.h:104
Definition: blpapi_message.h:159
#define BLPAPI_MESSAGE_FRAGMENT_END
Definition: blpapi_defs.h:147
message is not fragmented
Definition: blpapi_message.h:171
Float32 getElementAsFloat32(const Name &name) const
Definition: blpapi_message.h:684
bool getElementAsBool(const char *name) const
Definition: blpapi_element.h:2211
int timeReceived(TimePoint *timestamp) const
Definition: blpapi_message.h:754
#define BLPAPI_MESSAGE_RECAPTYPE_SOLICITED
Definition: blpapi_defs.h:150
const char * blpapi_Message_topicName(const blpapi_Message_t *message)
struct blpapi_Element blpapi_Element_t
Definition: blpapi_types.h:136
Service service() const
Definition: blpapi_message.h:603
Common definitions used by the library.
Definition: blpapi_exception.h:271
blpapi_Int32_t Int32
Definition: blpapi_types.h:469
const char * blpapi_Message_privateData(const blpapi_Message_t *message, size_t *size)
Type
Definition: blpapi_message.h:195
#define BLPAPI_MESSAGE_FRAGMENT_INTERMEDIATE
Definition: blpapi_defs.h:146
Float32 getElementAsFloat32(const char *name) const
Definition: blpapi_element.h:2251
Float64 getElementAsFloat64(const char *name) const
Definition: blpapi_element.h:2261
Definition: blpapi_abstractsession.h:215
Definition: blpapi_name.h:150
#define BLPAPI_CALL(FUNCNAME)
Definition: blpapi_call.h:353
blpapi_Float64_t Float64
Definition: blpapi_types.h:474
Definition: blpapi_service.h:304
int blpapi_Message_fragmentType(const blpapi_Message_t *message)
std::ostream & print(std::ostream &stream, int level=0, int spacesPerLevel=4) const
Definition: blpapi_message.h:759
#define BLPAPI_CALL_MESSAGE_TIMERECEIVED(a1, a2)
Definition: blpapi_call.h:453
int blpapi_Message_numCorrelationIds(const blpapi_Message_t *message)
CorrelationId correlationId(size_t index=0) const
Definition: blpapi_message.h:613
Message & operator=(const Message &rhs)
Definition: blpapi_message.h:567
struct blpapi_Name blpapi_Name_t
Definition: blpapi_types.h:154
#define BLPAPI_MESSAGE_RECAPTYPE_NONE
Definition: blpapi_defs.h:149
int(* blpapi_StreamWriter_t)(const char *data, int length, void *stream)
Definition: blpapi_streamproxy.h:53
blpapi_Float32_t Float32
Definition: blpapi_types.h:473
A service which provides access to API data (provide or consume).
Provide a time point with respect to an epoch.
Provide a key to identify individual subscriptions or requests.
struct blpapi_Message blpapi_Message_t
Definition: blpapi_message.h:70
Datetime getElementAsDatetime(const char *name) const
Definition: blpapi_element.h:2271
Definition: blpapi_element.h:464
bool getElementAsBool(const Name &name) const
Definition: blpapi_message.h:644
Int32 getElementAsInt32(const char *name) const
Definition: blpapi_element.h:2231
Fragment fragmentType() const
Definition: blpapi_message.h:743
int blpapi_Message_print(const blpapi_Message_t *message, blpapi_StreamWriter_t streamWriter, void *stream, int indentLevel, int spacesPerLevel)
#define BLPAPI_CALL_MESSAGE_FRAGMENTTYPE(a1)
Definition: blpapi_call.h:370
const char * getElementAsString(const Name &name) const
Definition: blpapi_message.h:714
Int32 getElementAsInt32(const Name &name) const
Definition: blpapi_message.h:664
std::ostream & operator<<(std::ostream &os, const CorrelationId &correlator)
Definition: blpapi_correlationid.h:592
Definition: blpapi_correlationid.h:201
blpapi_Int64_t Int64
Definition: blpapi_types.h:471
const char * blpapi_Message_typeString(const blpapi_Message_t *message)
int blpapi_Message_timeReceived(const blpapi_Message_t *message, blpapi_TimePoint_t *timeReceived)
blpapi_Name_t * blpapi_Message_messageType(const blpapi_Message_t *message)
blpapi_CorrelationId_t blpapi_Message_correlationId(const blpapi_Message_t *message, size_t index)
int getElement(Element *result, const char *name) const
Definition: blpapi_element.h:1891
Int64 getElementAsInt64(const char *name) const
Definition: blpapi_element.h:2241
const char * getPrivateData(size_t *size) const
Definition: blpapi_message.h:738
size_t numElements() const
Definition: blpapi_element.h:1966
A signature for callback on print and default C++ implementation.
Fragment
Definition: blpapi_message.h:169
int numCorrelationIds() const
Definition: blpapi_message.h:608
const char * topicName() const
Definition: blpapi_message.h:598
const char * getRequestId() const
Definition: blpapi_message.h:729
char getElementAsChar(const char *name) const
Definition: blpapi_element.h:2221
RecapType::Type recapType() const
Definition: blpapi_message.h:748
const Element getElement(const Name &name) const
Definition: blpapi_message.h:634
blpapi_Element_t * blpapi_Message_elements(const blpapi_Message_t *message)
Message(const Message &original)
Definition: blpapi_message.h:541
Float64 getElementAsFloat64(const Name &name) const
Definition: blpapi_message.h:694
bool hasElement(const Name &name, bool excludeNullElements=false) const
Definition: blpapi_message.h:626
bool hasElement(const char *name, bool excludeNullElements=false) const
Definition: blpapi_element.h:1982
Bytes getElementAsBytes(const Name &name) const
Definition: blpapi_element.h:2291
std::ostream & print(std::ostream &stream, int level=0, int spacesPerLevel=4) const
Definition: blpapi_element.h:2308
Definition: blpapi_message.h:194
static int writeToStream(const char *data, int length, void *stream)
Definition: blpapi_streamproxy.h:93
blpapi_Service_t * blpapi_Message_service(const blpapi_Message_t *message)
Name messageType() const
Definition: blpapi_message.h:593
normal data tick; not a recap
Definition: blpapi_message.h:196
Datetime getElementAsDatetime(const Name &name) const
Definition: blpapi_message.h:704
const Element asElement() const
Definition: blpapi_message.h:736
#define BLPAPI_EXPORT
Definition: blpapi_defs.h:171
struct blpapi_Service blpapi_Service_t
Definition: blpapi_types.h:166
#define BLPAPI_CALL_AVAILABLE(FUNCNAME)
Definition: blpapi_call.h:352
Definition: blpapi_datetime.h:245
intermediate fragmented messages
Definition: blpapi_message.h:175
Provide functions for dispatchtbl.
generated on request by subscriber
Definition: blpapi_message.h:198
#define BLPAPI_MESSAGE_RECAPTYPE_UNSOLICITED
Definition: blpapi_defs.h:151
#define BLPAPI_CALL_MESSAGE_ADDREF(a1)
Definition: blpapi_call.h:360
#define BLPAPI_MESSAGE_FRAGMENT_START
Definition: blpapi_defs.h:145
#define BLPAPI_MESSAGE_FRAGMENT_NONE
Definition: blpapi_defs.h:144
char getElementAsChar(const Name &name) const
Definition: blpapi_message.h:654
Bytes getElementAsBytes(const Name &name) const
Definition: blpapi_message.h:724
the last fragmented message
Definition: blpapi_message.h:177
Provide a representation of an item in a message.
const char * getElementAsString(const char *name) const
Definition: blpapi_element.h:2281
int blpapi_Message_release(const blpapi_Message_t *message)
Definition: blpapi_types.h:312
size_t numElements() const
Definition: blpapi_message.h:632
~Message()
Definition: blpapi_message.h:560
generated at discretion of the service
Definition: blpapi_message.h:200
#define BLPAPI_CALL_MESSAGE_RELEASE(a1)
Definition: blpapi_call.h:361
int blpapi_Message_addRef(const blpapi_Message_t *message)
int blpapi_Message_getRequestId(const blpapi_Message_t *message, const char **requestId)