CoreDX DDS Modern C++ API
Public Member Functions | List of all members
dds::topic::ContentFilteredTopic< T, DELEGATE > Class Template Reference

This class represents a content-filtered topic. More...

Inheritance diagram for dds::topic::ContentFilteredTopic< T, DELEGATE >:
Inheritance graph
[legend]
Collaboration diagram for dds::topic::ContentFilteredTopic< T, DELEGATE >:
Collaboration graph
[legend]

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::DomainParticipantdomain_participant () const
 This operation returns the DomainParticipant associated with the TopicDescription. More...
 
const dds::domain::DomainParticipantparticipant () 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...
 
Referenceoperator= (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...
 

Detailed Description

template<typename T, template< typename Q > class DELEGATE>
class dds::topic::ContentFilteredTopic< T, DELEGATE >

This class represents a content-filtered topic.

Constructor & Destructor Documentation

◆ ContentFilteredTopic()

template<typename T, template< typename Q > class DELEGATE>
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.

Parameters
topicthe related Topic.
namethe name of the ContentFilteredTopic
filterthe filter expression.

Member Function Documentation

◆ close()

template<typename T, template< typename Q > class DELEGATE>
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.

◆ retain()

template<typename T, template< typename Q > class DELEGATE>
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.


© 2009-2020 Twin Oaks Computing, Inc
Castle Rock, CO 80104
All rights reserved.