RTI Connext Modern C++ API  Version 5.2.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
dds::core::KeyedBytesTopicType Class Reference

Built-in type consisting of a variable-length array of opaque bytes and a string that is the key. More...

#include <dds/core/BuiltinTopicTypes.hpp>

Public Member Functions

 KeyedBytesTopicType ()
 Creates a sample with an empty array of bytes and an empty string.
 
 KeyedBytesTopicType (const std::string &key, const std::vector< uint8_t > &value)
 Creates a sample with the given key and bytes.
 
const dds::core::stringkey () const
 Gets the key.
 
dds::core::stringkey ()
 Gets the key.
 
void key (const dds::core::string &value)
 Sets the key.
 
 operator std::vector< uint8_t > () const
 Conversion to std::vector by obtaining the bytes.
 
std::vector< uint8_t > value () const
 Gets the bytes.
 
void value (const std::vector< uint8_t > &value)
 Sets the bytes.
 
uint8_t & operator[] (uint32_t index)
 Accesses the bytes by index.
 
uint8_t operator[] (uint32_t index) const
 Accesses the bytes by index.
 
int32_t length () const
 Get the number of bytes.
 

Detailed Description

Built-in type consisting of a variable-length array of opaque bytes and a string that is the key.

Constructor & Destructor Documentation

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

Creates a sample with an empty array of bytes and an empty string.

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

Creates a sample with the given key and bytes.

Member Function Documentation

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

Gets the key.

dds::core::string& dds::core::KeyedBytesTopicType::key ( )
inline

Gets the key.

void dds::core::KeyedBytesTopicType::key ( const dds::core::string value)
inline

Sets the key.

dds::core::KeyedBytesTopicType::operator std::vector< uint8_t > ( ) const
inline

Conversion to std::vector by obtaining the bytes.

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

Gets the bytes.

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

Sets the bytes.

uint8_t& dds::core::KeyedBytesTopicType::operator[] ( uint32_t  index)
inline

Accesses the bytes by index.

uint8_t dds::core::KeyedBytesTopicType::operator[] ( uint32_t  index) const
inline

Accesses the bytes by index.

int32_t dds::core::KeyedBytesTopicType::length ( ) const
inline

Get the number of bytes.


RTI Connext Modern C++ API Version 5.2.0 Copyright © Sun Jun 21 2015 Real-Time Innovations, Inc