18.1.5.5. ContentFilteredTopic

class ContentFilteredTopic : public eprosima::fastdds::dds::TopicDescription

Specialization of TopicDescription that allows for content-based subscriptions.

Public Functions

Getter for the related topic.

This operation returns the Topic associated with the ContentFilteredTopic. That is, the Topic specified when the ContentFilteredTopic was created.

const std::string &get_filter_expression() const

Get the filter expression.

This operation returns filter expression associated with this ContentFilteredTopic. It will return the filter_expression specified on the last successful call to set_expression or, if that method is never called, the expression specified when the ContentFilteredTopic was created.

Returns:

the filter_expression.

ReturnCode_t get_expression_parameters(std::vector<std::string> &expression_parameters) const

Get the expression parameters.

This operation returns expression parameters associated with this ContentFilteredTopic. These will be the expression_parameters specified on the last successful call to set_expression or set_expression_parameters. If those methods have never been called, the expression parameters specified when the ContentFilteredTopic was created will be returned.

Parameters:

expression_parameters[out] The expression parameters currently associated with the ContentFilteredTopic.

Returns:

RETCODE_OK

ReturnCode_t set_expression_parameters(const std::vector<std::string> &expression_parameters)

Set the expression parameters.

This operation changes expression parameters associated with this ContentFilteredTopic.

Parameters:

expression_parameters[in] The expression parameters to set.

Returns:

RETCODE_OK if the expression parameters where correctly updated.

Returns:

RETCODE_BAD_PARAMETER if the expression parameters do not match with the current filter_expression.

ReturnCode_t set_filter_expression(const std::string &filter_expression, const std::vector<std::string> &expression_parameters)

Set the filter expression and the expression parameters.

This operation changes the filter expression and the expression parameters associated with this ContentFilteredTopic.

Parameters:
  • filter_expression[in] The filter expression to set.

  • expression_parameters[in] The expression parameters to set.

Returns:

RETCODE_OK if the expression and parameters where correctly updated.

Returns:

RETCODE_BAD_PARAMETER if filter_expression is not valid for this ContentFilteredTopic.

Returns:

RETCODE_BAD_PARAMETER if the expression parameters do not match with the filter_expression.

virtual DomainParticipant *get_participant() const override

Getter for the DomainParticipant.

Returns:

DomainParticipant pointer

FASTDDS_SQLFILTER_NAME eprosima::fastdds::dds::sqlfilter_name