.. _dds_layers_domain_participant_factory: DomainParticipantFactory ======================== The sole purpose of this class is to allow the creation and destruction of :ref:`dds_layers_domain_participant` 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 :ref:`default transport ` and :ref:`default platform ` implementations for creating :ref:`dds_layers_domain_participant` instances. For a custom transport, the specific constructor can be used: .. literalinclude:: ../../../code/architecture_reference/main.cpp :language: c++ :start-after: // HANDLING_DEFAULT_DOMAINPARTICIPANT_TRANSPORT :end-before: //! HANDLING_DEFAULT_DOMAINPARTICIPANT_TRANSPORT :dedent: 8 .. _dds_layers_domain_participant_factory_qos: DomainParticipantFactoryQos --------------------------- ``DomainParticipantFactoryQos`` controls the behavior of the :ref:`dds_layers_domain_participant_factory`. Internally it does not contain any members. .. note:: In Safe DDS, it is important to note that the ``DomainParticipantFactoryQos`` does not possess a :ref:`entityfactoryqospolicy`. This is a direct consequence of the fact that a Safe DDS :ref:`dds_layers_domain_participant_factory` consistently creates :ref:`dds_layers_domain_participant` instances in a not enabled state. The underlying reason for this design choice is that the Safe DDS :ref:`dds_layers_domain_participant` 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. .. only :: SafetyManual .. _dds_layers_safe_domain_participant_factory: SafeDomainParticipantFactory ============================ .. include:: ../../../safety_manual/rules/RULE_SAFEDOMAINPARTICIPANTFACTORY.inc .. include:: ../../../safety_manual/rules/RULE_CREATION_ORDER.inc :class:`SafeDomainParticipantFactory` is the safe counterpart of the DDS DomainParticipantFactory, and its usage is mandatory under safety conditions. Its purpose is, in addition to that of the :ref:`dds_layers_domain_participant_factory`, to: #. Perform extra safety checks on DomainParticipant enabling. #. Act as Safe DDS :ref:`Platform ` so that it can control the library's memory allocation. For more information about how to use the ``SafeDomainParticipantFactory`` to create participants, please refer to :ref:`dds_layers_create_safe_domain_participant_listeners` and :ref:`dds_layers_create_safe_domain_participant_status`.