Public Member Functions

blpapi::SubscriptionList Class Reference

#include <blpapi_subscriptionlist.h>

List of all members.

Public Member Functions

 SubscriptionList ()
 SubscriptionList (const SubscriptionList &original)
 ~SubscriptionList ()
int add (const char *subscriptionString)
int add (const char *subscriptionString, const CorrelationId &correlationId)
int add (const char *subscriptionWithoutOptions, const std::vector< std::string > &fields, const std::vector< std::string > &options, const CorrelationId &correlationId)
int add (const char *subscriptionWithoutOptions, const char *fields, const char *options, const CorrelationId &correlationId)
int add (const CorrelationId &correlationId)
int addResolved (const char *subscriptionString)
int addResolved (const char *subscriptionString, const CorrelationId &correlationId)
int append (const SubscriptionList &other)
void clear ()
SubscriptionListoperator= (const SubscriptionList &rhs)
size_t size () const
CorrelationId correlationIdAt (size_t index) const
const char * topicStringAt (size_t index) const
bool isResolvedTopicAt (size_t index) const
const blpapi_SubscriptionList_timpl () const

Detailed Description

Contains a list of subscriptions used when subscribing and unsubscribing.

A SubscriptionList is used when calling Session::subscribe(), Session::resubscribe() and Session::unsubscribe(). The entries can be constructed in a variety of ways. The two important elements when creating a subscription are

Subscription String: A subscription string represents a topic whose

The following table describes how various operations use the above elements: --------------|--------------------------------------------------------| OPERATION | SUBSCRIPTION STRING | CORRELATION ID | --------------|-----------------------+--------------------------------| subscribe |Used to specify the |Identifier for the subscription.| |topic to subscribe to. |If uninitialized correlationid | | |was specified an internally | | |generated correlationId will be | | |set for the subscription. | --------------+-----------------------+--------------------------------| resubscribe |Used to specify the new|Identifier of the subscription | |topic to which the |which needs to be modified. | |subscription should be | | |modified to. | | --------------+-----------------------+--------------------------------| unsubscribe | NOT USED |Identifier of the subscription | | |which needs to be canceled. | -----------------------------------------------------------------------|


Constructor & Destructor Documentation

blpapi::SubscriptionList::SubscriptionList (  ) 

Create an empty SubscriptionList.

blpapi::SubscriptionList::SubscriptionList ( const SubscriptionList original  ) 

Create a SubscriptionList object initialized to the list of subscriptions from the specified original.

blpapi::SubscriptionList::~SubscriptionList (  ) 

Destroy this object.


Member Function Documentation

int blpapi::SubscriptionList::add ( const char *  subscriptionString  ) 

Append the specified subscriptionString to this SubscriptionList object, associating an internally generated CorrelationId with it. The subscription string may include options. Note that the subscription string provided to this function may be resolved by functions operating on this SubscriptionList object; use SubscriptionList::addResolved, below, to request that such functions bypass resolution.

int blpapi::SubscriptionList::add ( const char *  subscriptionString,
const CorrelationId correlationId 
)

Append the specified subscriptionString to this SubscriptionList object, associating the specified correlationId with it. The subscription string may include options. Note that the subscription string provided to this function may be resolved by functions operating on this SubscriptionList object; use SubscriptionList::addResolved, below, to request that such functions bypass resolution.

int blpapi::SubscriptionList::add ( const char *  subscriptionWithoutOptions,
const std::vector< std::string > &  fields,
const std::vector< std::string > &  options,
const CorrelationId correlationId 
)

Append the specified subscriptionString, with the specified fields and the specified options, to this SubscriptionList object, associating the specified correlationId with it.

int blpapi::SubscriptionList::add ( const char *  subscriptionWithoutOptions,
const char *  fields,
const char *  options,
const CorrelationId correlationId 
)

Append the specified subscriptionString with the specified fields, which must be formatted as a comma-separated list, and the specified options, which must be formatted as an ampersand-separated list, to this SubscriptionList object, and associate the specified correlationId with it.

int blpapi::SubscriptionList::add ( const CorrelationId correlationId  ) 

Append the specified correlationId to this SubscriptionList object. A SubscriptionList entry containing only a CorrelationId can be used only in a Session::unsubscribe call.

int blpapi::SubscriptionList::addResolved ( const char *  subscriptionString  ) 

Add the specified subscriptionString to this SubscriptionList, associating an internally generated CorrelationId with it. The subscription string may include options. The behavior of this function, and of functions operating on this SubscriptionList object, is undefined unless subscriptionString is a fully-resolved subscription string; clients that cannot provide fully-resolved subscription strings should use SubscriptionList::add instead. Note that it is at the discretion of each function operating on a SubscriptionList whether to perform resolution on this subscription.

int blpapi::SubscriptionList::addResolved ( const char *  subscriptionString,
const CorrelationId correlationId 
)

Add the specified subscriptionString to this SubscriptionList object, associating the specified correlationId with it. The subscription string may include options. The behavior of this function, and of functions operating on this SubscriptionList object, is undefined unless subscriptionString is a fully-resolved subscription string; clients that cannot provide fully-resolved subscription strings should use SubscriptionList::add instead. Note that it is at the discretion of each function operating on a SubscriptionList whether to perform resolution on this subscription.

int blpapi::SubscriptionList::append ( const SubscriptionList other  ) 

Extend this object by appending a copy of each entry in the specified other. Note that this function adds other.size() new entries to this object. Note also that this function is alias-safe; i.e. x.append(x) has well-defined behavior.

void blpapi::SubscriptionList::clear (  ) 

Remove all entries from this object.

SubscriptionList& blpapi::SubscriptionList::operator= ( const SubscriptionList rhs  ) 

Replace the contents of this SubscriptionList object with the contents of the specified rhs and return a modifiable reference to this SubscriptionList object.

size_t blpapi::SubscriptionList::size (  )  const

Return the number of entries in this object.

CorrelationId blpapi::SubscriptionList::correlationIdAt ( size_t  index  )  const

Return the CorrelationId of the specified indexth entry in this SubscriptionList object. An exception is thrown if index >= size().

const char* blpapi::SubscriptionList::topicStringAt ( size_t  index  )  const

Return a pointer to a null-terminated string which contains the full topic string (including any field and option portions) of the indexth entry in this SubscriptionList object. The pointer remains valid until this SubscriptionList object is destroyed or clear() is called. An exception is thrown if index >= size().

bool blpapi::SubscriptionList::isResolvedTopicAt ( size_t  index  )  const

Return true if the indexth entry in this SubscriptionList object was created using SubscriptionList::addResolved and false if it was created using SubscriptionList::add. An exception is thrown if index >= size().

const blpapi_SubscriptionList_t* blpapi::SubscriptionList::impl (  )  const

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