28 #ifndef INCLUDED_BLPAPI_MESSAGE 29 #define INCLUDED_BLPAPI_MESSAGE 64 #include <blpapi_deprecate.h> 71 struct blpapi_Message;
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;
335 const char *name)
const;
372 const char *name)
const;
385 const char *name)
const;
398 const char *name)
const;
411 const char *name)
const;
424 const char *name)
const;
437 const char *name)
const;
500 std::ostream& stream,
int level = 0,
int spacesPerLevel = 4)
const;
531 std::ostream&
operator<<(std::ostream& stream,
const Message& message);
554 , d_isCloned(clonable)
562 : d_handle(original.d_handle)
563 , d_elements(original.d_elements)
573 if (d_isCloned && d_handle) {
585 if (d_isCloned && (d_handle == rhs.d_handle)) {
589 if (d_isCloned && d_handle) {
592 d_handle = rhs.d_handle;
593 d_elements = rhs.d_elements;
632 const char *name,
bool excludeNullElements)
const 638 const Name& name,
bool excludeNullElements)
const 640 return d_elements.
hasElement(name, excludeNullElements);
742 const char *requestId = 0;
761 return static_cast<Message::RecapType::Type>(
771 std::ostream& stream,
int level,
int spacesPerLevel)
const 782 return d_elements.
print(stream, level, spacesPerLevel);
788 return message.
print(stream, 0, -1);
798 #endif // #ifdef __cplusplus 799 #endif // #ifndef INCLUDED_BLPAPI_MESSAGE Int64 getElementAsInt64(const Name &name) const
Definition: blpapi_message.h:685
int blpapi_Message_recapType(const blpapi_Message_t *message)
struct blpapi_Message blpapi_Message_t
Definition: blpapi_dispatchtbl.h:78
the first fragmented message
Definition: blpapi_message.h:175
Definition: blpapi_timepoint.h:104
Definition: blpapi_message.h:161
#define BLPAPI_MESSAGE_FRAGMENT_END
Definition: blpapi_defs.h:147
message is not fragmented
Definition: blpapi_message.h:173
Float32 getElementAsFloat32(const Name &name) const
Definition: blpapi_message.h:695
BLPAPI_DEPRECATE_STRING_NAME bool getElementAsBool(const char *name) const
Definition: blpapi_element.h:2230
int timeReceived(TimePoint *timestamp) const
Definition: blpapi_message.h:765
#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:614
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:197
#define BLPAPI_MESSAGE_FRAGMENT_INTERMEDIATE
Definition: blpapi_defs.h:146
BLPAPI_DEPRECATE_STRING_NAME Float32 getElementAsFloat32(const char *name) const
Definition: blpapi_element.h:2270
BLPAPI_DEPRECATE_STRING_NAME Float64 getElementAsFloat64(const char *name) const
Definition: blpapi_element.h:2280
Definition: blpapi_abstractsession.h:187
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:770
#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:624
Message & operator=(const Message &rhs)
Definition: blpapi_message.h:578
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.
BLPAPI_DEPRECATE_STRING_NAME Datetime getElementAsDatetime(const char *name) const
Definition: blpapi_element.h:2290
Definition: blpapi_element.h:465
bool getElementAsBool(const Name &name) const
Definition: blpapi_message.h:655
BLPAPI_DEPRECATE_STRING_NAME Int32 getElementAsInt32(const char *name) const
Definition: blpapi_element.h:2250
Fragment fragmentType() const
Definition: blpapi_message.h:754
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:725
Int32 getElementAsInt32(const Name &name) const
Definition: blpapi_message.h:675
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)
BLPAPI_DEPRECATE_STRING_NAME int getElement(Element *result, const char *name) const
Definition: blpapi_element.h:1910
BLPAPI_DEPRECATE_STRING_NAME Int64 getElementAsInt64(const char *name) const
Definition: blpapi_element.h:2260
BLPAPI_DEPRECATE_STRING_NAME const char * getPrivateData(size_t *size) const
Definition: blpapi_message.h:749
size_t numElements() const
Definition: blpapi_element.h:1985
A signature for callback on print and default C++ implementation.
Fragment
Definition: blpapi_message.h:171
int numCorrelationIds() const
Definition: blpapi_message.h:619
BLPAPI_DEPRECATE_MESSAGE_TOPIC_NAME const char * topicName() const
Definition: blpapi_message.h:609
const char * getRequestId() const
Definition: blpapi_message.h:740
BLPAPI_DEPRECATE_STRING_NAME char getElementAsChar(const char *name) const
Definition: blpapi_element.h:2240
RecapType::Type recapType() const
Definition: blpapi_message.h:759
const Element getElement(const Name &name) const
Definition: blpapi_message.h:645
blpapi_Element_t * blpapi_Message_elements(const blpapi_Message_t *message)
Message(const Message &original)
Definition: blpapi_message.h:552
Float64 getElementAsFloat64(const Name &name) const
Definition: blpapi_message.h:705
bool hasElement(const Name &name, bool excludeNullElements=false) const
Definition: blpapi_message.h:637
BLPAPI_DEPRECATE_STRING_NAME bool hasElement(const char *name, bool excludeNullElements=false) const
Definition: blpapi_element.h:2001
Bytes getElementAsBytes(const Name &name) const
Definition: blpapi_element.h:2310
std::ostream & print(std::ostream &stream, int level=0, int spacesPerLevel=4) const
Definition: blpapi_element.h:2327
Definition: blpapi_message.h:196
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:604
normal data tick; not a recap
Definition: blpapi_message.h:198
Datetime getElementAsDatetime(const Name &name) const
Definition: blpapi_message.h:715
const Element asElement() const
Definition: blpapi_message.h:747
#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:177
Provide functions for dispatchtbl.
generated on request by subscriber
Definition: blpapi_message.h:200
#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:665
Bytes getElementAsBytes(const Name &name) const
Definition: blpapi_message.h:735
the last fragmented message
Definition: blpapi_message.h:179
Provide a representation of an item in a message.
BLPAPI_DEPRECATE_STRING_NAME const char * getElementAsString(const char *name) const
Definition: blpapi_element.h:2300
int blpapi_Message_release(const blpapi_Message_t *message)
Provide a representation of strings for use as container keys.
Definition: blpapi_types.h:312
size_t numElements() const
Definition: blpapi_message.h:643
~Message()
Definition: blpapi_message.h:571
generated at discretion of the service
Definition: blpapi_message.h:202
#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)