RTI Connext Traditional C++ API  Version 7.0.0

Keyed string built-in type. More...

Public Member Functions

 DDS_KeyedString ()
 Constructor. More...
 
 DDS_KeyedString (int key_size, int size)
 Constructor that specifies the allocated sizes. More...
 
 ~DDS_KeyedString ()
 Destructor. More...
 

Public Attributes

char * key
 Instance key associated with the specified value. More...
 
char * value
 String value. More...
 

Detailed Description

Keyed string built-in type.

Constructor & Destructor Documentation

◆ DDS_KeyedString() [1/2]

DDS_KeyedString::DDS_KeyedString ( )
inline

Constructor.

The default constructor initializes the newly created object with NULL key and value.

References DDS_String_replace(), key, DDS_Octets::value, and value.

◆ DDS_KeyedString() [2/2]

DDS_KeyedString::DDS_KeyedString ( int  key_size,
int  size 
)
inline

Constructor that specifies the allocated sizes.

The allocated strings are initialized to empty ("").

If a memory allocation failure occurs, and the DDS_KeyedString structure is allocated but one or both strings inside of it cannot be, the unallocated string will be NULL.

Parameters
key_size<<in>> Size of the allocated key string (with NULL-terminated character).
size<<in>> Size of the allocated value string (with NULL-terminated character).
Returns
A new DDS_KeyedString or NULL if failure.

References DDS_String_alloc(), and DDS_String_free().

◆ ~DDS_KeyedString()

DDS_KeyedString::~DDS_KeyedString ( )
inline

Member Data Documentation

◆ key

char* DDS_KeyedString::key

Instance key associated with the specified value.

Referenced by DDS_KeyedString(), and ~DDS_KeyedString().

◆ value

char* DDS_KeyedString::value

String value.

Referenced by DDS_KeyedString(), and ~DDS_KeyedString().