Contains a string. More...
Public Member Functions | |
const char * | get_string () |
Provides access to data held in an STRING DynamicType object. | |
uint32_t | get_max_length () |
Provides access to the maximum length of a DynamicType object. | |
uint32_t | get_length () |
Provides access to the length of data held in a DynamicType object. | |
ReturnCode_t | set_string (const char *c) |
Assigns a value to the provided STRING DynamicType. | |
ReturnCode_t | set_max_length (uint32_t n) |
Assigns a 'max_length' value to the provided STRING, ARRAY, or SEQUENCE DynamicType. |
Contains a string.
uint32_t DDS::StringDynamicType::get_length | ( | ) |
Provides access to the length of data held in a DynamicType object.
This is applicable for a SEQUENCE or ARRAY DynamicType object. For a SEQUENCE, this returns the 'length' of the sequence. For an ARRAY, this returns the size of the array.
uint32_t | the length of the data value held by 't'. |
uint32_t DDS::StringDynamicType::get_max_length | ( | ) |
Provides access to the maximum length of a DynamicType object.
This is applicable for a STRING, SEQUENCE, or ARRAY DynamicType object. For a STRING, this returns the 'fixed length' of the string, or zero if the string is not fixed length. For a SEQUENCE, this returns the 'fixed length' of the sequence, or zero if the sequence is unbounded. For an ARRAY, this returns the size of the array.
uint32_t | the maximum length of the data value held by 't'. |
const char* DDS::StringDynamicType::get_string | ( | ) |
Provides access to data held in an STRING DynamicType object.
const_char_* | the data value held by 't'. |
ReturnCode_t DDS::StringDynamicType::set_max_length | ( | uint32_t | n | ) |
Assigns a 'max_length' value to the provided STRING, ARRAY, or SEQUENCE DynamicType.
For STRINGS and SEQUENCES, this defines the bound on the string length or sequence length. For arrays, this defines the size of the array.
BAD_PARAMETER | if 't' is not of type STRING, ARRAY, or SEQUENCE. | |
OK | upon success. |
ReturnCode_t DDS::StringDynamicType::set_string | ( | const char * | c | ) |
Assigns a value to the provided STRING DynamicType.
This routine will make a copy of the provided string data. If the STRING has a defined 'max_length', then the copied data will be truncated to 'max_length' characters. [A '\0' (nul) character will be added after the truncated data.]
ReturnCode_t | BAD_PARAMETER if 't' is not of type STRING. | |
OUT_OF_RESOURCES | if memory allocation fails. | |
OK | upon success. |