#include <blpapi_resolutionlist.h>
Public Types | |
enum | Status { UNRESOLVED, RESOLVED, RESOLUTION_FAILURE_BAD_SERVICE, RESOLUTION_FAILURE_SERVICE_AUTHORIZATION_FAILED, RESOLUTION_FAILURE_BAD_TOPIC, RESOLUTION_FAILURE_TOPIC_AUTHORIZATION_FAILED } |
Public Member Functions | |
ResolutionList () | |
ResolutionList (const ResolutionList &original) | |
~ResolutionList () | |
int | add (const char *topic, const CorrelationId &correlationId=CorrelationId()) |
int | add (Message const &subscriptionStartedMessage, const CorrelationId &correlationId=CorrelationId()) |
int | addAttribute (const Name &attribute) |
CorrelationId | correlationIdAt (size_t index) const |
const char * | topicString (const CorrelationId &correlationId) const |
const char * | topicStringAt (size_t index) const |
int | status (const CorrelationId &correlationId) const |
int | statusAt (size_t index) const |
Element const | attribute (const Name &attribute, const CorrelationId &correlationId) const |
Element const | attributeAt (const Name &attribute, size_t index) const |
Message const | message (const CorrelationId &correlationId) const |
Message const | messageAt (size_t index) const |
size_t | size () const |
const blpapi_ResolutionList_t * | impl () const |
blpapi_ResolutionList_t * | impl () |
Static Public Member Functions | |
static Element | extractAttributeFromResolutionSuccess (Message const &message, Name const &attribute) |
Contains a list of topics that require resolution.
Created from topic strings or from SUBSCRIPTION_STARTED messages. This is passed to a resolve() call or resolveAsync() call on a ProviderSession. It is updated and returned by the resolve() call.
blpapi::ResolutionList::ResolutionList | ( | ) |
Create an empty ResolutionList.
blpapi::ResolutionList::ResolutionList | ( | const ResolutionList & | original | ) |
Copy constructor.
blpapi::ResolutionList::~ResolutionList | ( | ) |
Destroy this ResolutionList.
static Element blpapi::ResolutionList::extractAttributeFromResolutionSuccess | ( | Message const & | message, | |
Name const & | attribute | |||
) | [static] |
Return the value of the value in the specified message
which represents the specified attribute
. The message
must be a message of type "RESOLUTION_SUCCESS". The attribute
should be an attribute that was requested using addAttribute() on the ResolutionList passed to the resolve() or resolveAsync() that caused this RESOLUTION_SUCCESS message. If the attribute
is not present an empty Element is returned.
int blpapi::ResolutionList::add | ( | const char * | topic, | |
const CorrelationId & | correlationId = CorrelationId() | |||
) |
Add the specified topic
to this list, optionally specifying a correlationId
. Returns 0 on success or negative number on failure. After a successful call to add() the status for this entry is UNRESOLVED_TOPIC.
int blpapi::ResolutionList::add | ( | Message const & | subscriptionStartedMessage, | |
const CorrelationId & | correlationId = CorrelationId() | |||
) |
Add the topic contained in the specified subscriptionStartedMessage
to this list, optionally specifying a correlationId
. Returns 0 on success or a negative number on failure. After a successful call to add() the status for this entry is UNRESOLVED_TOPIC.
int blpapi::ResolutionList::addAttribute | ( | const Name & | attribute | ) |
Add the specified attribute
to the list of attributes requested during resolution for each topic in this ResolutionList. Returns 0 on success or a negative number on failure.
CorrelationId blpapi::ResolutionList::correlationIdAt | ( | size_t | index | ) | const |
Returns the CorrelationId of the specified index
th entry in this ResolutionList. If index
>= size() an exception is thrown.
const char* blpapi::ResolutionList::topicString | ( | const CorrelationId & | correlationId | ) | const |
Returns a pointer to the topic of the entry identified by the specified correlationId
. If the correlationId
does not identify an entry in this ResolutionList then an exception is thrown.
const char* blpapi::ResolutionList::topicStringAt | ( | size_t | index | ) | const |
Returns a pointer to the topic of the specified index
th entry. If index
>= size() an exception is thrown.
int blpapi::ResolutionList::status | ( | const CorrelationId & | correlationId | ) | const |
Returns the status of the entry in this ResolutionList identified by the specified correlationId
. This may be UNRESOLVED, RESOLVED, RESOLUTION_FAILURE_BAD_SERVICE, RESOLUTION_FAILURE_SERVICE_AUTHORIZATION_FAILED RESOLUTION_FAILURE_BAD_TOPIC, RESOLUTION_FAILURE_TOPIC_AUTHORIZATION_FAILED. If the correlationId
does not identify an entry in this ResolutionList then an exception is thrown.
int blpapi::ResolutionList::statusAt | ( | size_t | index | ) | const |
Returns the status of the specified index
th entry in this ResolutionList. This may be UNRESOLVED, RESOLVED, RESOLUTION_FAILURE_BAD_SERVICE, RESOLUTION_FAILURE_SERVICE_AUTHORIZATION_FAILED RESOLUTION_FAILURE_BAD_TOPIC, RESOLUTION_FAILURE_TOPIC_AUTHORIZATION_FAILED. If index
> size() an exception is thrown.
Element const blpapi::ResolutionList::attribute | ( | const Name & | attribute, | |
const CorrelationId & | correlationId | |||
) | const |
Returns the value for the specified attribute
of the entry in this ResolutionList identified by the specified correlationId
. The Element returned may be empty if the resolution service cannot provide the attribute. If correlationId
does not identify an entry in this ResolutionList or if the status of the entry identified by correlationId
is not RESOLVED an exception is thrown.
Returns the value for the specified attribute
of the specified index
th entry in this ResolutionList. The Element returned may be empty if the resolution service cannot provide the attribute. If index
>= size() or if the status of the index
th entry is not RESOLVED an exception is thrown.
Message const blpapi::ResolutionList::message | ( | const CorrelationId & | correlationId | ) | const |
Returns the value of the message received during resolution of the topic identified by the specified correlationId
. If correlationId
does not identify an entry in this ResolutionList or if the status of the entry identify by correlationId
is not RESOLVED an exception is thrown.
The message returned can be used when creating an instance of Topic.
Message const blpapi::ResolutionList::messageAt | ( | size_t | index | ) | const |
Returns the value of the message received during resolution of the specified index
th entry in this ResolutionList. If index
>= size() or if the status of the index
th entry is not RESOLVED an exception is thrown.
The message returned can be used when creating an instance of Topic.
size_t blpapi::ResolutionList::size | ( | ) | const |
Returns the number of entries in this list.
const blpapi_ResolutionList_t* blpapi::ResolutionList::impl | ( | ) | const |
blpapi_ResolutionList_t* blpapi::ResolutionList::impl | ( | ) |