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

Class that is a built-in topic type that can be used to readily create Topics, DataReaders and DataWriters for this type without the need for code generation. More...

#include "BuiltinTopicTypes.hpp"

Inheritance diagram for dds::core::KeyedBytesTopicType:
Inheritance graph

Public Member Functions

 KeyedBytesTopicType ()
 
 KeyedBytesTopicType (const std::string &key, const std::vector< uint8_t > &value)
 
const std::string & key () const
 
void key (const std::string &key)
 
bool operator!= (const Value &other) const
 
D * operator-> ()
 
const D * operator-> () const
 
bool operator== (const Value &other) const
 
const std::vector< uint8_t > & value () const
 
void value (const std::vector< uint8_t > &value)
 

Detailed Description

Class that is a built-in topic type that can be used to readily create Topics, DataReaders and DataWriters for this type without the need for code generation.

This built-in type allows for easy transfer of keyed vectors of bytes.

Definition at line 170 of file BuiltinTopicTypes.hpp.

Constructor & Destructor Documentation

◆ KeyedBytesTopicType() [1/2]

dds::core::KeyedBytesTopicType::KeyedBytesTopicType ( )

Creates topic type with an empty key string and data vector.

◆ KeyedBytesTopicType() [2/2]

dds::core::KeyedBytesTopicType::KeyedBytesTopicType ( const std::string &  key,
const std::vector< uint8_t > &  value 
)

Creates topic type with given key string and data vector.

Member Function Documentation

◆ key() [1/2]

const std::string& dds::core::KeyedBytesTopicType::key ( ) const

Getter function for the key string.

◆ key() [2/2]

void dds::core::KeyedBytesTopicType::key ( const std::string &  key)

Setter function for the key string.

◆ 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/2]

const std::vector<uint8_t>& dds::core::KeyedBytesTopicType::value ( ) const

Getter function for the internal vector of bytes.

◆ value() [2/2]

void dds::core::KeyedBytesTopicType::value ( const std::vector< uint8_t > &  value)

Setter function for the internal vector of bytes.


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