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

More...

#include "CorePolicy.hpp"

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

Public Member Functions

 UserData ()
 
 UserData (const dds::core::ByteSeq &sequence)
 
 UserData (const uint8_t *value_begin, const uint8_t *value_end)
 
 UserData (const UserData &other)
 
const uint8_t * begin () const
 
const uint8_t * end () const
 
bool operator!= (const Value &other) const
 
D * operator-> ()
 
const D * operator-> () const
 
bool operator== (const Value &other) const
 
UserDatavalue (const dds::core::ByteSeq &sequence)
 
template<typename OCTET_ITER >
UserDatavalue (OCTET_ITER begin, OCTET_ITER end)
 
const dds::core::ByteSeq value () const
 

Detailed Description

This QosPolicy allows the application to attach additional information to a DomainParticipant, DataReader or DataWriter entity. This information is distributed with the BuiltinTopics.

Attributes

Value Meaning Concerns RxO Changeable
A sequence of octets:
value
A sequence of octets that holds the application user data. By default, the sequence has length 0. DomainParticipant, DataReader, DataWriter No Yes

This QosPolicy allows the application to attach additional information to a DomainParticipant, DataReader or DataWriter entity. This information is distributed with the Builtin Topics. An application that discovers a new Entity ofthe listed kind, can use this information to add additional functionality. The UserDataQosPolicy is changeable and updates of the Builtin Topic instance must be expected. Note that the Data Distribution Service is not aware of the real structure of the user data (the Data Distribution System handles it as an opaque type) and that the application is responsible for correct mapping on structural types for the specific platform.

Definition at line 41 of file CorePolicy.hpp.

Constructor & Destructor Documentation

◆ UserData() [1/4]

dds::core::policy::UserData::UserData ( )

Creates a UserData QoS instance with an empty UserData

Definition at line 46 of file CorePolicyImpl.hpp.

◆ UserData() [2/4]

dds::core::policy::UserData::UserData ( const dds::core::ByteSeq sequence)
explicit

Creates a UserData QoS instance

Parameters
sequencethe sequence of octets

Definition at line 49 of file CorePolicyImpl.hpp.

◆ UserData() [3/4]

dds::core::policy::UserData::UserData ( const uint8_t *  value_begin,
const uint8_t *  value_end 
)

Creates a UserData QoS instance

Parameters
value_begina pointer to the beginning of a sequence of octets
value_enda pointer to the end of a sequence of octets

Definition at line 53 of file CorePolicyImpl.hpp.

◆ UserData() [4/4]

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

Copies a UserData QoS instance

Parameters
otherthe UserData QoS instance to copy

Definition at line 59 of file CorePolicyImpl.hpp.

Member Function Documentation

◆ begin()

const uint8_t * dds::core::policy::UserData::begin ( ) const

Gets a pointer to the first octet in the sequence

Returns
a pointer to the first octet in the sequence

Definition at line 92 of file CorePolicyImpl.hpp.

◆ end()

const uint8_t * dds::core::policy::UserData::end ( ) const

Gets a pointer to the last octet in the sequence

Returns
a pointer to the first octet in the sequence

Definition at line 107 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.

◆ value() [1/3]

UserData & dds::core::policy::UserData::value ( const dds::core::ByteSeq sequence)

Sets the sequence

Parameters
sequencea sequence of octets

Definition at line 62 of file CorePolicyImpl.hpp.

◆ value() [2/3]

template<typename OCTET_ITER >
UserData & dds::core::policy::UserData::value ( OCTET_ITER  begin,
OCTET_ITER  end 
)

Sets the sequence

Parameters
beginan iterator pointing to the beginning of a sequence of octets
endan iterator pointing to the end of a sequence of octets

Definition at line 71 of file CorePolicyImpl.hpp.

◆ value() [3/3]

const dds::core::ByteSeq dds::core::policy::UserData::value ( ) const

Gets the sequence

Returns
a sequence of octets

Definition at line 85 of file CorePolicyImpl.hpp.


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