BLPAPI C++
3.21.0
|
#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 () |
SubscriptionList & | operator= (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 |
Contains a list of subscriptions used when subscribing and unsubscribing.
SubscriptionList | ( | ) |
Create an empty SubscriptionList
.
SubscriptionList | ( | const SubscriptionList & | original | ) |
Create a SubscriptionList
object initialized to the list of subscriptions from the specified original
.
~SubscriptionList | ( | ) |
Destroy this object.
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.
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.
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.
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.
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.
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.
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.
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.
void clear | ( | ) |
Remove all entries from this object.
CorrelationId correlationIdAt | ( | size_t | index | ) | const |
Return the CorrelationId
of the specified index
th entry in this SubscriptionList
object. An exception is thrown if index >= size()
.
bool isResolvedTopicAt | ( | size_t | index | ) | const |
Return true
if the index
th 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()
.
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_t size | ( | ) | const |
Return the number of entries in this object.
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 index
th 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()
.