RTI Connext Traditional C++ API
Version 6.0.1
|
This section describes the C++ namespace support in the DDS API.
In this documentation, all C++ classes, value types, interface types and constants have names beginning with either "DDS_" or "DDS". Alternatively, DDS namespace can also be used to refer to all these classes, types or constant.
All the C++ API that begins with either "DDS_" or "DDS" can be replaced with its namespace equivalent. For example, DDSDomainParticipant has a namespace equivalent of DDS::DomainParticipant, and DDS_DomainParticipantQos has a namespace equivalent of DDS::DomainParticipantQos.
In order to use the DDS namespace, an additional header file, ndds_namespace_cpp.h , will need to be included in your source file:
If the namespace header file is not included in the source file, DDS namespace cannot be used in the RTI Connext API.
By default, DDS namespace support for primitive types are included. With DDS namespace support, the difference between DDS types and native types can just be the capitalization in some cases:
If you want to exclude the DDS namespace support for primitive types, you can define NDDS_EXCLUDE_PRIMITIVE_TYPES_FROM_NAMESPACE in you application before including the namespace header file. DDS namespace support for primitive types will then be excluded:
For the rest of the documentation, the DDS prefix is used for all class /types/constants names. However, all the API with the DDS prefix can be replaced with DDS namespace instead if the namespace header file is included.