62.5.1 Loading, Reloading and Unloading Profiles
You do not have to explicitly call load_profiles(). QoS profiles are loaded when any of these DomainParticipantFactory operations are called:
- create_participant() (see 19.3.1 Creating a DomainParticipant)
- create_participant_with_profile() (see 19.3.1 Creating a DomainParticipant)
- get_<entity>_qos_from_profile() (where <entity> is participant, topic, publisher, subscriber, datawriter, or datareader) (see 19.2.5 Getting QoS Values from a QoS Profile)
- get_<entity>_qos_from_profile_w_topic_name() (where <entity> is topic, datawriter, or datareader) (see 19.2.5 Getting QoS Values from a QoS Profile)
- get_default_participant_qos() (see 19.2.2 Getting and Setting Default QoS for DomainParticipants)
- get_qos_profile_libraries() (See 62.10.1 Retrieving a List of Available Libraries)
- get_qos_profiles() (See 62.4 Tags for Configuring QoS with XML)
- load_profiles()
- set_default_participant_qos_with_profile() (see 19.2.2 Getting and Setting Default QoS for DomainParticipants)
- set_default_library() (see 33.4.4 Getting and Setting the Publisher’s Default QoS Profile and Library)
- set_default_profile() (see 33.4.4 Getting and Setting the Publisher’s Default QoS Profile and Library)
In the Modern C++ API, the previous operations cause the default QosProvider (QosProvider::Default()) to load the QoS profiles. Any other QosProvider that an application instantiates will load the QoS Profiles it is configured to load in its constructor.
QoS profiles are reloaded when either of these DomainParticipantFactory operations are called:
- reload_profiles()
- set_qos() (see Chapter 61 Configuring Qos Programmatically)
It is important to distinguish between loading and reloading:
- Loading only happens when there are no previously loaded profiles. This could be when the profiles are loaded the first time or after a call to unload_profiles().
- Reloading replaces all previously loaded profiles. Reloading a profile does not change the QoS of entities that have already been created with previously loaded profiles.
The DomainParticipantFactory also has an unload_profiles() operation that frees the resources associated with the XML QoS profiles.
DDS_ReturnCode_t unload_profiles()