OpenSplice ISO C++ 2 DCPS  v6.x
ISO C++ 2 OpenSplice Data Distribution Service Data-Centric Publish-Subscribe API
dds::core::Value< D > Class Template Reference

This class is the base for various value-type dds objects. More...

#include "Value.hpp"

Inherited by dds::core::BytesTopicType, dds::core::EntityQos, dds::core::InstanceHandle, dds::core::KeyedBytesTopicType, dds::core::KeyedStringTopicType, dds::core::optional< T >, dds::core::policy::Deadline, dds::core::policy::DestinationOrder, dds::core::policy::Durability, dds::core::policy::DurabilityService, dds::core::policy::EntityFactory, dds::core::policy::GroupData, dds::core::policy::History, dds::core::policy::LatencyBudget, dds::core::policy::Lifespan, dds::core::policy::Liveliness, dds::core::policy::Ownership, dds::core::policy::OwnershipStrength, dds::core::policy::Partition, dds::core::policy::Presentation, dds::core::policy::QosPolicyCount, dds::core::policy::ReaderDataLifecycle, dds::core::policy::Reliability, dds::core::policy::ResourceLimits, dds::core::policy::TimeBasedFilter, dds::core::policy::TopicData, dds::core::policy::TransportPriority, dds::core::policy::UserData, dds::core::policy::WriterDataLifecycle, dds::core::status::InconsistentTopicStatus, dds::core::status::LivelinessChangedStatus, dds::core::status::LivelinessLostStatus, dds::core::status::OfferedDeadlineMissedStatus, dds::core::status::OfferedIncompatibleQosStatus, dds::core::status::PublicationMatchedStatus, dds::core::status::RequestedDeadlineMissedStatus, dds::core::status::RequestedIncompatibleQosStatus, dds::core::status::SampleLostStatus, dds::core::status::SampleRejectedStatus, dds::core::status::SubscriptionMatchedStatus, dds::core::StringTopicType, dds::pub::CoherentSet, dds::pub::SuspendedPublication, dds::sub::CoherentAccess, dds::sub::GenerationCount, dds::sub::Rank, dds::sub::Sample< T >, dds::sub::SampleInfo, dds::topic::BuiltinTopicKey, dds::topic::Filter, dds::topic::ParticipantBuiltinTopicData, dds::topic::PublicationBuiltinTopicData, dds::topic::SubscriptionBuiltinTopicData, dds::topic::TopicBuiltinTopicData, org::opensplice::core::policy::ProductData, org::opensplice::core::policy::ReaderLifespan, org::opensplice::core::policy::Scheduling, org::opensplice::core::policy::Share, org::opensplice::core::policy::SubscriptionKey, org::opensplice::core::status::AllDataDisposedTopicStatus, org::opensplice::topic::CMDataReaderBuiltinTopicData, org::opensplice::topic::CMDataWriterBuiltinTopicData, org::opensplice::topic::CMParticipantBuiltinTopicData, org::opensplice::topic::CMPublisherBuiltinTopicData, and org::opensplice::topic::CMSubscriberBuiltinTopicData.

Public Member Functions

bool operator!= (const Value &other) const
 
D * operator-> ()
 
const D * operator-> () const
 
Valueoperator= (const Value &other)
 
bool operator== (const Value &other) const
 

Detailed Description

template<typename D>
class dds::core::Value< D >

This class is the base for various value-type dds objects.

QoS, Policy, Statuses, and Topic samples are all modeled as value-types.

All objects that have a value-type have a deep-copy assignment and copy construction semantics. It should also be pointed out that value-types are not 'pure-value-types' in the sense that they are immutable (as in functional programming languages).

The DDS-PSM-Cxx makes value-types mutable to limit the number of copies as well as to limit the time-overhead necessary to change a value-type (note that for immutable value-types the only form of change is to create a new value-type).

Definition at line 28 of file Value.hpp.

Member Function Documentation

◆ operator!=()

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

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-> ( )

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

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 >
Value< D > & dds::core::Value< D >::operator= ( const Value< D > &  other)

Assigns new delegate to this Value

Parameters
otherValue

Definition at line 83 of file Value.hpp.

◆ operator==()

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

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 file: