Public Types | Public Member Functions

blpapi::TopicList Class Reference

#include <blpapi_topiclist.h>

List of all members.

Public Types

enum  Status { NOT_CREATED, CREATED, FAILURE }

Public Member Functions

 TopicList ()
 TopicList (const ResolutionList &original)
 TopicList (const TopicList &original)
 ~TopicList ()
int add (const char *topic, const CorrelationId &correlationId=CorrelationId())
int add (Message const &message, const CorrelationId &correlationId=CorrelationId())
CorrelationId correlationIdAt (size_t index) const
const char * topicString (const CorrelationId &correlationId) const
const char * topicStringAt (size_t index) const
int status (const CorrelationId &correlationId) const
int statusAt (size_t index) const
Message const message (const CorrelationId &correlationId) const
Message const messageAt (size_t index) const
size_t size () const
const blpapi_TopicList_timpl () const
blpapi_TopicList_timpl ()

Detailed Description

Contains a list of topics which require creation.

Created from topic strings or from TOPIC_SUBSCRIBED or RESOLUTION_SUCCESS messages. This is passed to a createTopics() call or createTopicsAsync() call on a ProviderSession. It is updated and returned by the createTopics() call.


Member Enumeration Documentation

Enumerator:
NOT_CREATED 
CREATED 
FAILURE 

Constructor & Destructor Documentation

blpapi::TopicList::TopicList (  ) 

Create an empty TopicList.

blpapi::TopicList::TopicList ( const ResolutionList original  ) 

Create a topic list from ResolutionList. User has previously resolved topics in ResolutionList and wants to now createTopics.

blpapi::TopicList::TopicList ( const TopicList original  ) 

Copy constructor.

blpapi::TopicList::~TopicList (  ) 

Destroy this TopicList.


Member Function Documentation

int blpapi::TopicList::add ( const char *  topic,
const CorrelationId correlationId = CorrelationId() 
)

Add the specified topic to this list, optionally specifying a correlationId. Returns 0 on success or negative number on failure. After a successful call to add() the status for this entry is NOT_CREATED.

int blpapi::TopicList::add ( Message const &  message,
const CorrelationId correlationId = CorrelationId() 
)

Add the topic contained in the specified topicSubscribedMessage or resolutionSuccessMessage to this list, optionally specifying a correlationId. Returns 0 on success or a negative number on failure. After a successful call to add() the status for this entry is NOT_CREATED.

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

Returns the CorrelationId of the specified indexth entry in this TopicList. If index >= size() an exception is thrown.

const char* blpapi::TopicList::topicString ( const CorrelationId correlationId  )  const

Returns a pointer to the topic of the entry identified by the specified correlationId. If the correlationId does not identify an entry in this TopicList then an exception is thrown.

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

Returns a pointer to the topic of the specified indexth entry. If index >= size() an exception is thrown.

int blpapi::TopicList::status ( const CorrelationId correlationId  )  const

Returns the status of the entry in this TopicList identified by the specified correlationId. This may be NOT_CREATED, CREATED and FAILURE. If the correlationId does not identify an entry in this TopicList then an exception is thrown.

int blpapi::TopicList::statusAt ( size_t  index  )  const

Returns the status of the specified indexth entry in this TopicList. This may be NOT_CREATED, CREATED and FAILURE. If index > size() an exception is thrown.

Message const blpapi::TopicList::message ( const CorrelationId correlationId  )  const

Returns the value of the message received during creation of the topic identified by the specified correlationId. If correlationId does not identify an entry in this TopicList or if the status of the entry identify by correlationId is not CREATED an exception is thrown.

The message returned can be used when creating an instance of Topic.

Message const blpapi::TopicList::messageAt ( size_t  index  )  const

Returns the value of the message received during creation of the specified indexth entry in this TopicList. If index >= size() or if the status of the indexth entry is not CREATED an exception is thrown.

The message returned can be used when creating an instance of Topic.

size_t blpapi::TopicList::size (  )  const

Returns the number of entries in this list.

const blpapi_TopicList_t* blpapi::TopicList::impl (  )  const
blpapi_TopicList_t* blpapi::TopicList::impl (  ) 

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