#include <blpapi_session.h>
Public Member Functions | |
SubscriptionIterator (Session *session) | |
~SubscriptionIterator () | |
bool | next () |
bool | isValid () const |
const char * | subscriptionString () const |
const CorrelationId & | correlationId () const |
Session::SubscriptionStatus | subscriptionStatus () const |
blpapi_SubscriptionIterator_t * | handle () const |
An iterator which steps through all the subscriptions in a Session.
The SubscriptionIterator can be used to iterate over all the active subscriptions for a Session. However, with an asynchronous Session it is possible for the set of active subscriptions to change whilst the SubscriptionIterator is being used. The SubscriptionIterator is guaranteed to never return the same subscription twice. However, the subscription the iterator points to may no longer be active. In this case the result of subscriptionStatus() will be UNSUBSCRIBED or CANCELLED.
blpapi::SubscriptionIterator::SubscriptionIterator | ( | Session * | session | ) |
Construct a forward iterator to iterate over the subscriptions of the specified session
. The SubscriptionIterator is created in a state where next() must be called to advance it to the first item.
blpapi::SubscriptionIterator::~SubscriptionIterator | ( | ) |
Destructor.
bool blpapi::SubscriptionIterator::next | ( | ) |
bool blpapi::SubscriptionIterator::isValid | ( | ) | const |
Returns true if this iterator is currently positioned on a valid subscription. Returns false otherwise.
const char* blpapi::SubscriptionIterator::subscriptionString | ( | ) | const |
Returns a pointer to a null-terminated string which contains the subscription string for this subscription. The pointer returned remains valid until this SubscriptionIterator is destroyed or the underlying Session is destroyed or next() is called.
const CorrelationId& blpapi::SubscriptionIterator::correlationId | ( | ) | const |
Returns the CorrelationId for this subscription.
Session::SubscriptionStatus blpapi::SubscriptionIterator::subscriptionStatus | ( | ) | const |
Returns the status of this subscription.
blpapi_SubscriptionIterator_t* blpapi::SubscriptionIterator::handle | ( | ) | const |