Public Member Functions

blpapi::SubscriptionIterator Class Reference

#include <blpapi_session.h>

List of all members.

Public Member Functions

 SubscriptionIterator (Session *session)
 ~SubscriptionIterator ()
bool next ()
bool isValid () const
const char * subscriptionString () const
const CorrelationIdcorrelationId () const
Session::SubscriptionStatus subscriptionStatus () const
blpapi_SubscriptionIterator_thandle () const

Detailed Description

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.


Constructor & Destructor Documentation

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.


Member Function Documentation

bool blpapi::SubscriptionIterator::next (  ) 

Attempt to advance this iterator to the next subscription record. Returns true on success and false if there are no more subscriptions. After next() returns true isValid() is guaranteed to return true until the next call to next(). After next() returns false isValid() will return false.

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

The documentation for this class was generated from the following file: