CoreDX DDS
C# Reference Manual

ContentFilteredTopic Class Reference
[DDS Entities]

ContentFilteredTopic provides a topic that may include data filtered from a related Topic. The ContentFilteredTopic is associated with another un-filtered topic related_topic. It applies a filter to the data of the related topic. If a data sample passes the filter, it will be made available to a DataReader associated with the ContentFilteredTopic. More...

Inheritance diagram for ContentFilteredTopic:
TopicDescription

List of all members.

Public Member Functions

DomainParticipant get_participant ()
 This operation returns the parent DomainParticipant of the Topic.
String get_type_name ()
 This operation returns type_name of the Topic.
String get_name ()
 This operation returns topic_name of the Topic.
Topic get_related_topic ()
 This returns the real Topic associated with the ContentFilteredTopic.
ReturnCode_t get_expression_parameters (List< String > eparams)
 This accesses the current set of parameters used by the ContentFilteredTopic.
ReturnCode_t set_expression_parameters (List< String > filter_parameters)
 This specifies a new set of parameters for use with the filter_expression.

Detailed Description

ContentFilteredTopic provides a topic that may include data filtered from a related Topic. The ContentFilteredTopic is associated with another un-filtered topic related_topic. It applies a filter to the data of the related topic. If a data sample passes the filter, it will be made available to a DataReader associated with the ContentFilteredTopic.

The filter_expression is an SQL like condition expression, and filter_parameters provide optional parameters that are referenced by the filter_expression. The syntax of the filter expression is similar to the WHERE clause in SQL. For example "x<4" is a valid filter expression. It would test that data member 'x' is less than value '4'. If the filter expression evaluates to TRUE, then the data sample will be available, otherwise the data sample would be 'filtered' (excluded).

CoreDX DDS supports the 'LIKE' operator (and NOT LIKE) for regular expression string matching. The pattern string in a LIKE clause can contain '' to match zero or more characters, '_' to match a single character, or '[<characters>]' to match a range of characters.

CoreDX DDS also includes support for the 'IN' operator. This provides a very powerful mechanism for testing that a value appears in a set of values. For example "symbol IN ('ge', 'msft', 'ibm')" will select all samples that have a symbol value of 'ge', 'msft', or 'ibm'. This could also be written as a series of equality tests combined with the OR operator; however, the IN operator is much more efficient. A filter that matches on several hundred or even thousands of values can be implemented very efficiently using the 'IN' operator.

The filter_expression can refer to parameters. The syntax for paramters is the percent sign '' followed by a number. The number is the index of the paramter in the filter_paramters sequence. Parameters are counted starting at zero. So, "%0" refers to the first parameter, and "%4" refers to the fifth paramter. Using this syntax, the expression "x<%0" would test the value of 'x' against the first parameter in the sequence.

See also:
DDS_DomainParticipant_create_contentfilteredtopic()

Member Function Documentation

ReturnCode_t get_expression_parameters ( List< String >  eparams  )  [inline]

This accesses the current set of parameters used by the ContentFilteredTopic.

The parameters String Sequence is populated with the current set of parameters.

Topic get_related_topic (  )  [inline]

This returns the real Topic associated with the ContentFilteredTopic.

That is, the Topic provided when the ContentFilteredTopic was created.

ReturnCode_t set_expression_parameters ( List< String >  filter_parameters  )  [inline]

This specifies a new set of parameters for use with the filter_expression.

The filter_expression is an SQL like condition expression, and the parameters argument provides optional parameters that are referenced by the filter_expression. The syntax for refering to paramters in a filter_expression is the percent sign '' followed by a number. The number is the index of the paramter in the filter_paramters sequence. Parameters are counted starting at zero. So, "%0" refers to the first parameter, and "%4" refers to the fifth paramter. Using this syntax, the expression "x<%0" would test the value of 'x' against the first parameter in the sequence.


The documentation for this class was generated from the following file:
  • /home/ctucker/coredx_v3.4rc/src/dds_csharp/top.cs

© 2009-2011 Twin Oaks Computing, Inc
Castle Rock, CO 80108
All rights reserved.