DomainParticipantFactory¶
The sole purpose of this class is to allow the creation and destruction of DomainParticipant objects.
DomainParticipantFactory does not accept any Listener, since it is not an Entity.
Note
In Safe DDS, DomainParticipantFactory shall be instantiated by the application and it is not a singleton.
Note
In Safe DDS, the default DomainParticipantFactory constructor will use default transport and default platform allocator implementations for creating DomainParticipant instances.
For a custom transport, the specific constructor can be used:
// Setting a custom transport for a DomainParticipantFactory.
CustomTransport custom_transport{};
dds::DomainParticipantFactory factory{custom_transport};
In Safe DDS, the DomainParticipantFactory provides a single call that decommissions every entity in all of its created participants, with no additional object spinning required.
if (dds::ReturnCode::OK != factory.decommission_contained_entities())
{
std::cout << "Error decommissioning contained entities" << std::endl;
}
DomainParticipantFactory decommissioning
Once the
DomainParticipantFactoryhas decommissioned all of its contained entities, neither those entities nor their executors may be used for any operations, including attempts to re-enable them.
DomainParticipantFactoryQos¶
DomainParticipantFactoryQos controls the behavior of the DomainParticipantFactory.
Internally it does not contain any members.
Note
In Safe DDS, it is important to note that the DomainParticipantFactoryQos does not possess a EntityFactoryQosPolicy.
This is a direct consequence of the fact that a Safe DDS DomainParticipantFactory consistently creates DomainParticipant instances in a not enabled state.
The underlying reason for this design choice is that the Safe DDS DomainParticipant becomes incapable of creating subentities once it transitions into an enabled state. This ensures that the usage of Safe DDS remains secure and adheres to the established guidelines.