BLPAPI C++  3.24.11
SubscriptionList Class Reference

#include <blpapi_subscriptionlist.h>

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
 

Detailed Description

Contains a list of subscriptions used when subscribing and unsubscribing.

See Component blpapi_subscriptionlist

Constructor & Destructor Documentation

◆ SubscriptionList() [1/2]

Create an empty SubscriptionList.

◆ SubscriptionList() [2/2]

SubscriptionList ( const SubscriptionList original)

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

◆ ~SubscriptionList()

Destroy this object.

Member Function Documentation

◆ add() [1/5]

int 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.

◆ add() [2/5]

int 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.

◆ add() [3/5]

int 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.

◆ add() [4/5]

int 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.

◆ add() [5/5]

int 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.

◆ addResolved() [1/2]

int 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.

◆ addResolved() [2/2]

int 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.

◆ append()

int 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.

◆ clear()

void clear ( )

Remove all entries from this object.

◆ correlationIdAt()

CorrelationId correlationIdAt ( size_t  index) const

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

◆ isResolvedTopicAt()

bool 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().

◆ operator=()

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. This function is alias safe, a SubscriptionList can be assigned to itself and it will not change its value.

◆ size()

size_t size ( ) const

Return the number of entries in this object.

◆ topicStringAt()

const char * 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().


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