28 #ifndef INCLUDED_BLPAPI_SUBSCRIPTIONLIST 29 #define INCLUDED_BLPAPI_SUBSCRIPTIONLIST 201 #ifndef INCLUDED_BLPAPI_CALL 205 #ifndef INCLUDED_BLPAPI_CORRELATIONID 209 #ifndef INCLUDED_BLPAPI_DEFS 213 #ifndef INCLUDED_BLPAPI_EXCEPTION 217 #ifndef INCLUDED_BLPAPI_TYPES 223 struct blpapi_SubscriptionList;
238 const char *subscriptionString,
239 const blpapi_CorrelationId_t *correlationId,
241 const char **options,
247 const char *subscriptionString,
248 const blpapi_CorrelationId_t *correlationId);
263 blpapi_CorrelationId_t *result,
277 #ifndef INCLUDED_CSTRING 279 #define INCLUDED_CSTRING 282 #ifndef INCLUDED_STRING 284 #define INCLUDED_STRING 287 #ifndef INCLUDED_VECTOR 289 #define INCLUDED_VECTOR 336 int add(
const char *subscriptionString);
348 int add(
const char *subscriptionString,
361 int add(
const char *subscriptionWithoutOptions,
362 const std::vector<std::string>& fields,
363 const std::vector<std::string>& options,
372 int add(
const char *subscriptionWithoutOptions,
510 blpapi_CorrelationId_t correlationId;
511 std::memset(&correlationId, 0,
sizeof(correlationId));
513 d_handle_p, subscriptionString, &correlationId, 0, 0, 0, 0);
517 const char *subscriptionString,
const CorrelationId& correlationId)
520 d_handle_p, subscriptionString, &correlationId.impl(), 0, 0, 0, 0);
524 const std::vector<std::string>& fields,
525 const std::vector<std::string>& options,
528 std::vector<const char *> tmpVector;
529 const char *arena[256];
530 const char **tmpArray = arena;
531 size_t sizeNeeded = fields.size() + options.size();
533 if (sizeNeeded >
sizeof(arena) /
sizeof(arena[0])) {
534 tmpVector.resize(sizeNeeded);
535 tmpArray = &tmpVector[0];
538 const char **p = tmpArray;
539 for (std::vector<std::string>::const_iterator itr = fields.begin(),
546 for (std::vector<std::string>::const_iterator itr = options.begin(),
555 &correlationId.impl(),
557 tmpArray + fields.size(),
569 &correlationId.impl(),
579 d_handle_p,
"", &correlationId.impl(), 0, 0, 0, 0);
584 blpapi_CorrelationId_t correlationId;
585 std::memset(&correlationId, 0,
sizeof(correlationId));
587 d_handle_p, subscriptionString, &correlationId);
591 const char *subscriptionString,
const CorrelationId& correlationId)
594 d_handle_p, subscriptionString, &correlationId.impl());
610 if (d_handle_p != rhs.d_handle_p) {
624 blpapi_CorrelationId_t correlationId;
627 d_handle_p, &correlationId, index));
634 const char *result = 0;
647 d_handle_p, &result, index));
649 return result ? true :
false;
660 #endif // ifdef __cplusplus 662 #endif // #ifndef INCLUDED_BLPAPI_SUBSCRIPTIONLIST ~SubscriptionList()
Definition: blpapi_subscriptionlist.h:503
int blpapi_SubscriptionList_topicStringAt(blpapi_SubscriptionList_t *list, const char **result, size_t index)
Common definitions used by the library.
int add(const char *subscriptionString)
Definition: blpapi_subscriptionlist.h:508
Definition: blpapi_abstractsession.h:220
int blpapi_SubscriptionList_size(const blpapi_SubscriptionList_t *list)
void blpapi_SubscriptionList_destroy(blpapi_SubscriptionList_t *list)
int blpapi_SubscriptionList_clear(blpapi_SubscriptionList_t *list)
SubscriptionList()
Definition: blpapi_subscriptionlist.h:492
Provide a key to identify individual subscriptions or requests.
void clear()
Definition: blpapi_subscriptionlist.h:602
static void throwOnError(int errorCode)
Definition: blpapi_exception.h:526
struct blpapi_SubscriptionList blpapi_SubscriptionList_t
Definition: blpapi_dispatchtbl.h:90
bool isResolvedTopicAt(size_t index) const
Definition: blpapi_subscriptionlist.h:642
int addResolved(const char *subscriptionString)
Definition: blpapi_subscriptionlist.h:582
Definition: blpapi_correlationid.h:201
Definition: blpapi_subscriptionlist.h:314
#define BLPAPI_CALL_SUBSCRIPTIONLIST_ADDRESOLVED(a1, a2, a3)
Definition: blpapi_call.h:415
size_t size() const
Definition: blpapi_subscriptionlist.h:617
#define BLPAPI_CALL_SUBSCRIPTIONLIST_ISRESOLVEDAT(a1, a2, a3)
Definition: blpapi_call.h:417
SubscriptionList & operator=(const SubscriptionList &rhs)
Definition: blpapi_subscriptionlist.h:607
int blpapi_SubscriptionList_correlationIdAt(const blpapi_SubscriptionList_t *list, blpapi_CorrelationId_t *result, size_t index)
int blpapi_SubscriptionList_isResolvedAt(blpapi_SubscriptionList_t *list, int *result, size_t index)
int append(const SubscriptionList &other)
Definition: blpapi_subscriptionlist.h:597
Defines Exceptions that can be thrown by the blpapi library.
CorrelationId correlationIdAt(size_t index) const
Definition: blpapi_subscriptionlist.h:622
blpapi_SubscriptionList_t * blpapi_SubscriptionList_create(void)
int blpapi_SubscriptionList_addResolved(blpapi_SubscriptionList_t *list, const char *subscriptionString, const blpapi_CorrelationId_t *correlationId)
#define BLPAPI_EXPORT
Definition: blpapi_defs.h:171
Provide functions for dispatchtbl.
int blpapi_SubscriptionList_append(blpapi_SubscriptionList_t *dest, const blpapi_SubscriptionList_t *src)
const char * topicStringAt(size_t index) const
Definition: blpapi_subscriptionlist.h:632
int blpapi_SubscriptionList_add(blpapi_SubscriptionList_t *list, const char *subscriptionString, const blpapi_CorrelationId_t *correlationId, const char **fields, const char **options, size_t numfields, size_t numOptions)