CoreDX DDS Modern C++ API
|
This class represents a content-filtered topic. More...
Public Member Functions | |
ContentFilteredTopic (const Topic< T > &topic, const std::string &name, const dds::topic::Filter &filter) | |
Creates a ContentFilteredTopic . More... | |
const std::string & | filter_expression () const |
Get the filter expression. | |
const dds::core::StringSeq | filter_parameters () const |
Get the filter expression parameters. | |
template<typename FWDIterator > | |
void | filter_parameters (const FWDIterator &begin, const FWDIterator &end) |
Set the filter expression parameters. | |
const dds::topic::Topic< T > & | topic () const |
Get the related topic. | |
void | close () |
This method closes the entity and releases all resources associated with DDS, such as threads, sockets, buffers, etc. More... | |
void | retain () |
Indicates that references to this object may go out of scope but that the application expects to look it up again later. More... | |
Public Member Functions inherited from dds::topic::TopicDescription | |
const std::string & | name () const |
This operation returns the name used to create the TopicDescription. More... | |
const std::string & | type_name () const |
This operation returns the registered name of the data type associated with the TopicDescription. More... | |
const dds::domain::DomainParticipant & | domain_participant () const |
This operation returns the DomainParticipant associated with the TopicDescription. More... | |
const dds::domain::DomainParticipant & | participant () const |
This operation returns the DomainParticipant associated with the TopicDescription. More... | |
Public Member Functions inherited from dds::core::Reference< DELEGATE > | |
Reference (dds::core::null_type &) | |
Creates a "null" reference. | |
Reference (const Reference &ref) | |
Creates a reference from another. More... | |
template<typename D > | |
Reference (const Reference< D > &ref) | |
Enables safe assignment from other reference types. More... | |
Reference (DELEGATE_T *p) | |
The following two constructors create a dds Reference from a vendor specific delegate. More... | |
~Reference () | |
Destroys a reference. | |
template<typename R > | |
bool | operator== (const R &ref) const |
Compares two reference objects and returns true if they are equal. More... | |
template<typename R > | |
bool | operator!= (const R &ref) const |
Compares two reference objects and returns true if they are not-equal. More... | |
Reference & | operator= (const null_type) |
Special assignment operators that takes care of assigning null to this reference. More... | |
bool | is_nil () const |
Returns true if this reference object is nil, meaning pointing to null. | |
bool | operator== (const null_type) const |
Special operator== used to check if this reference object equals the null reference. More... | |
bool | operator!= (const null_type nil) const |
Special operator!= used to check if this reference object does not equals the null reference. More... | |
const DELEGATE_REF_T & | delegate () const |
Returns a reference to the underlying delegate. More... | |
DELEGATE_REF_T & | delegate () |
Returns a reference to the underlying delegate. More... | |
DELEGATE * | operator-> () |
The operator->() is provided to be able to directly invoke methods on the delegate. More... | |
const DELEGATE * | operator-> () const |
The operator->() is provided to be able to directly invoke methods on the delegate. More... | |
This class represents a content-filtered topic.
dds::topic::ContentFilteredTopic< T, DELEGATE >::ContentFilteredTopic | ( | const Topic< T > & | topic, |
const std::string & | name, | ||
const dds::topic::Filter & | filter | ||
) |
Creates a ContentFilteredTopic
.
The ContentFilteredTopic can be used to perform content-based subscriptions.
The ContentFilteredTopic only relates to samples published under that Topic, filtered according to their content. The filtering is done by means of evaluating a logical expression that involves the values of some of the data-fields in the sample.
topic | the related Topic . |
name | the name of the ContentFilteredTopic |
filter | the filter expression. |
void dds::topic::ContentFilteredTopic< T, DELEGATE >::close | ( | ) |
This method closes the entity and releases all resources associated with DDS, such as threads, sockets, buffers, etc.
Any attempt to invoke methods on a closed entity will raise an exception.
void dds::topic::ContentFilteredTopic< T, DELEGATE >::retain | ( | ) |
Indicates that references to this object may go out of scope but that the application expects to look it up again later.
Therefore, the Service must consider this object to be still in use and may not close it automatically.