OpenSplice ISO C++ 2 DCPS  v6.x
ISO C++ 2 OpenSplice Data Distribution Service Data-Centric Publish-Subscribe API
dds::core::policy::Partition Class Reference

More...

#include "CorePolicy.hpp"

Inheritance diagram for dds::core::policy::Partition:
Inheritance graph

Public Member Functions

 Partition (const std::string &name="")
 
 Partition (const dds::core::StringSeq &names)
 
 Partition (const Partition &other)
 
Partitionname (const std::string &name)
 
Partitionname (const dds::core::StringSeq &names)
 
const dds::core::StringSeq name () const
 
bool operator!= (const Value &other) const
 
D * operator-> ()
 
const D * operator-> () const
 
bool operator== (const Value &other) const
 

Detailed Description

This QosPolicy specifies the logical partitions in which the Subscribers and Publishers are active.

Attributes

Value Meaning Concerns RxO Changeable
A string sequence:
name
A sequence of strings that introduces a logical partition among the topics visible by the Publisher and Subscriber. A DataWriter within a Publisher only communicates with a DataReader in a Subscriber if (in addition to matching the Topic and having compatible QoS) the Publisher and Subscriber have a common partition name string. The empty string ("") is considered a valid partition that is matched with other partition names using the same rules of string matching and regular- expression matching used for any other partition name. The default value for the PARTITION QoS is a zero-length sequence. The zero-length sequence is treated as a special value equivalent to a sequence containing a single element consisting of the empty string. Publisher, Subscriber No Yes
Terminology_Layout_A4.png
Partition seperation

This policy allows the introduction of a logical partition concept inside the ‘physical’ partition induced by a domain. For a DataReader to see the changes made to an instance by a DataWriter, not only the Topic must match, but also they must share a common partition. Each string in the list that defines this QoS policy defines a partition name. A partition name may contain wildcards. Sharing a common partition means that one of the partition names matches.

Failure to match partitions is not considered an “incompatible” QoS and does not trigger any listeners nor conditions.

This policy is changeable. A change of this policy can potentially modify the “match” of existing DataReader and DataWriter entities. It may establish new “matches” that did not exist before, or break existing matches.

PARTITION names can be regular expressions and include wildcards as defined by the POSIX fnmatch API (1003.2-1992 section B.6). Either Publisher or Subscriber may include regular expressions in partition names, but no two names that both contain wildcards will ever be considered to match. This means that although regular expressions may be used both at Publisher as well as Subscriber side, the service will not try to match two regular expressions (between publishers and subscribers).

Partitions are different from creating Entity objects in different domains in several ways. First, entities belonging to different domains are completely isolated from each other; there is no traffic, meta-traffic or any other way for an application or the Service itself to see entities in a domain it does not belong to. Second, an Entity can only belong to one domain whereas an Entity can be in multiple partitions. Finally, as far as the DDS Service is concerned, each unique data instance is identified by the tuple (domainId, Topic, key). Therefore two Entity objects in different domains cannot refer to the same data instance. On the other hand, the same data-instance can be made available (published) or requested (subscribed) on one or more partitions.

Definition at line 529 of file CorePolicy.hpp.

Constructor & Destructor Documentation

◆ Partition() [1/3]

dds::core::policy::Partition::Partition ( const std::string &  name = "")
explicit

Creates a Partition QoS instance

Parameters
namepartition name

Definition at line 420 of file CorePolicyImpl.hpp.

◆ Partition() [2/3]

dds::core::policy::Partition::Partition ( const dds::core::StringSeq names)
explicit

Creates a Partition QoS instance

Parameters
namesa sequence containing multiple partition names

Definition at line 426 of file CorePolicyImpl.hpp.

◆ Partition() [3/3]

dds::core::policy::Partition::Partition ( const Partition other)

Copies a Partition QoS instance

Parameters
otherthe Partition QoS instance to copy

Definition at line 432 of file CorePolicyImpl.hpp.

Member Function Documentation

◆ name() [1/3]

Partition & dds::core::policy::Partition::name ( const std::string &  name)

Sets the partition name

Parameters
namethe partition name

Definition at line 439 of file CorePolicyImpl.hpp.

◆ name() [2/3]

Partition & dds::core::policy::Partition::name ( const dds::core::StringSeq names)

Sets multiple partition names

Parameters
namesa sequence containing multiple partition names

Definition at line 447 of file CorePolicyImpl.hpp.

◆ name() [3/3]

const dds::core::StringSeq dds::core::policy::Partition::name ( ) const

Gets the partition names

Returns
a sequence containing the partition names

Definition at line 455 of file CorePolicyImpl.hpp.

◆ operator!=()

template<typename D >
bool dds::core::Value< D >::operator!= ( const Value< D > &  other) const
inherited

Compare this Value with another Value

Parameters
otherValue
Returns
true if not equal

Definition at line 99 of file Value.hpp.

◆ operator->() [1/2]

template<typename D >
D * dds::core::Value< D >::operator-> ( )
inherited

The operator->() is provided to be able to directly invoke functions on the delegate.

The decision to provide direct access to the delegate was motivated by the need for providing a way that was not invasive with respect to the CXXDDS API and yet would allow for vendor-specific extension. Thus vendor-specific extensions can be invoked on the Value and on all its subclasses as follows:

my_dds_value.standard_function();
my_dds_value->vendor_specific_extension();
Returns
a reference to delegate.

Definition at line 111 of file Value.hpp.

◆ operator->() [2/2]

template<typename D >
const D * dds::core::Value< D >::operator-> ( ) const
inherited

The operator->() is provided to be able to directly invoke functions on the delegate.

The decision to provide direct access to the delegate was motivated by the need for providing a way that was not invasive with respect to the CXXDDS API and yet would allow for vendor-specific extension. Thus vendor-specific extensions can be invoked on the Value and on all its subclasses as follows:

my_dds_value.standard_function();
my_dds_value->vendor_specific_extension();
Returns
a reference to delegate.

Definition at line 105 of file Value.hpp.

◆ operator==()

template<typename D >
bool dds::core::Value< D >::operator== ( const Value< D > &  other) const
inherited

Compare this Value with another Value

Parameters
otherValue
Returns
true if equal

Definition at line 93 of file Value.hpp.


The documentation for this class was generated from the following files: