BLPAPI C++  3.24.11
TopicList Class Reference

#include <blpapi_topiclist.h>

Public Types

enum  Status {
  NOT_CREATED = 0,
  CREATED = 1,
  FAILURE = 2
}
 

Public Member Functions

 TopicList ()
 
 TopicList (const ResolutionList &original)
 
 TopicList (const TopicList &original)
 
virtual ~TopicList ()
 
virtual int add (const char *topic, const CorrelationId &correlationId=CorrelationId())
 
virtual int add (Message const &message, const CorrelationId &correlationId=CorrelationId())
 
virtual CorrelationId correlationIdAt (size_t index) const
 
virtual const char * topicString (const CorrelationId &correlationId) const
 
virtual const char * topicStringAt (size_t index) const
 
virtual int status (const CorrelationId &correlationId) const
 
virtual int statusAt (size_t index) const
 
virtual Message const message (const CorrelationId &correlationId) const
 
virtual Message const messageAt (size_t index) const
 
virtual 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.

See Component blpapi_topiclist

Member Enumeration Documentation

◆ Status

enum Status
Enumerator
NOT_CREATED 

Not created.

CREATED 

Created successfully.

FAILURE 

Topic creation failed.

Constructor & Destructor Documentation

◆ TopicList() [1/3]

TopicList ( )

Create an empty TopicList.

◆ TopicList() [2/3]

TopicList ( const ResolutionList original)
explicit

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

◆ TopicList() [3/3]

TopicList ( const TopicList original)

Copy constructor.

◆ ~TopicList()

~TopicList ( )
virtual

Destroy this TopicList.

Member Function Documentation

◆ add() [1/2]

int add ( const char *  topic,
const CorrelationId correlationId = CorrelationId() 
)
virtual

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.

◆ add() [2/2]

int add ( Message const &  message,
const CorrelationId correlationId = CorrelationId() 
)
virtual

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.

◆ correlationIdAt()

CorrelationId correlationIdAt ( size_t  index) const
virtual

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

◆ impl() [1/2]

const blpapi_TopicList_t * impl ( ) const

◆ impl() [2/2]

blpapi_TopicList_t * impl ( )

◆ message()

Message const message ( const CorrelationId correlationId) const
virtual

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, an exception is thrown.

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

◆ messageAt()

Message const messageAt ( size_t  index) const
virtual

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

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

◆ size()

size_t size ( ) const
virtual

Returns the number of entries in this list.

◆ status()

int status ( const CorrelationId correlationId) const
virtual

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.

◆ statusAt()

int statusAt ( size_t  index) const
virtual

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.

◆ topicString()

const char * topicString ( const CorrelationId correlationId) const
virtual

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.

◆ topicStringAt()

const char * topicStringAt ( size_t  index) const
virtual

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


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