-- (c) Copyright, Real-Time Innovations, $Date:: 2012-02-16 #$
-- All rights reserved.
--
-- No duplications, whole or partial, manual or electronic, may be made
-- without express written permission. Any such copies, or
-- revisions thereof, must display this notice unaltered.
-- This code contains trade secrets of Real-Time Innovations, Inc.
pragma Ada_05;
with DDS.Topic;
with DDS.TopicDescription;
-- It describes a more sophisticated subscription that indicates a
-- dds.DataReader does not want to necessarily see all values of each
-- instance published under the dds.Topic.
-- Rather, it wants to see only the values whose contents satisfy
-- certain criteria. This class therefore can be used to request
-- content-based subscriptions.
-- The selection of the content is done using the filter_expression
-- with parameters expression_parameters.
-- * The filter_expression attribute is a string that specifies the
-- criteria to select the data samples of interest.
-- It is similar to the WHERE part of an SQL clause.
-- * The expression_parameters attribute is a sequence of strings that
-- give values to the 'parameters' (i.e. "%n" tokens) in the
-- filter_expression. The number of supplied parameters must fit with
-- the requested values in the filter_expression
-- (i.e. the number of n tokens).
-- Queries and Filters Syntax describes the syntax of
-- filter_expression and expression_parameters.
-- Note on Content-Based Filtering and Sparse Value Types
-- If you are a user of the Dynamic Data API, you may define sparse value types;
-- that is, types for which every data sample need not include a value for
-- every field defined in the type.
-- (See TCKind.TK_SPARSE and TypeCodeFactory.create_sparse_tc.)
-- In order for a filter expression on a field to be well defined,
-- that field must be present in the data sample.
-- That means that you will only be able to perform a content-based filter
-- on fields that are marked as TypeCode.KEY_MEMBER or
-- TypeCode.NONKEY_REQUIRED_MEMBER.
-- <dref>ContentFilteredTopic</dref>
package DDS.ContentFilteredTopic is
type Ref is limited interface and DDS.TopicDescription.Ref;
type Ref_Access is access all Ref'Class;
function Get_Filter_Expression
(Self : not null access Ref)
return DDS.String is abstract;
-- <dref>ContentFilteredTopic_get_filter_expression</dref>
-- <internal>
-- Return the filter_expression associated with the
-- dds.ContentFilteredTopic.
-- </internal>
----------------------------------------------------------------------
procedure Get_Expression_Parameters
(Self : not null access Ref;
Parameters : access DDS.String_Seq.Sequence) is abstract;
-- <dref>ContentFilteredTopic_get_expression_parameters</dref>
-- <internal>
-- Return the expression_parameters associated with the
-- dds.ContentFilteredTopic.
-- expression_parameters is either specified on the last successful
-- call to dds.ContentFilteredTopic.set_expression_parameters or,
-- if that method is never called, the parameters specified when the
-- dds.ContentFilteredTopic was created.
-- </internal>
----------------------------------------------------------------------
procedure Set_Expression_Parameters
(Self : not null access Ref;
Parameters : access constant DDS.String_Seq.Sequence) is abstract;
-- <dref>ContentFilteredTopic_set_expression_parameters</dref>
-- <internal>
-- Change the expression_parameters associated with the
-- dds.ContentFilteredTopic.
-- </internal>
function Get_Related_Topic
(Self : not null access Ref)
return DDS.Topic.Ref_Access is abstract;
-- <dref>ContentFilteredTopic_get_related_topic</dref>
-- <internal>
-- Return the dds.Topic specified when the dds.ContentFilteredTopic
-- was created
-- </internal>
function Narrow (Self : not null access DDS.TopicDescription.Ref'Class)
return Ref_Access;
-- <dref>ContentFilteredTopic_narrow</dref>
function To_ContentFilteredTopic (Self : not null access DDS.TopicDescription.Ref'Class)
return Ref_Access;
-- <dref>ContentFilteredTopic_narrow</dref>
procedure Append_To_Expression_Parameter
(Self : not null access Ref;
Index : Natural;
Value : DDS.String) is abstract;
-- <dref>ContentFilteredTopic_append_to_expression_parameter</dref>
procedure Remove_From_Expression_Parameter
(Self : not null access Ref;
Index : Natural;
Value : DDS.String) is abstract;
-- <dref>ContentFilteredTopic_remove_from_expression_parameter</dref>
end DDS.ContentFilteredTopic;