OpenDDS  Snapshot(2023/04/28-20:55)
DomainParticipantFactoryImpl.h
Go to the documentation of this file.
1 /*
2  * Distributed under the OpenDDS License.
3  * See: http://www.opendds.org/license.html
4  */
5 
6 #ifndef OPENDDS_DCPS_DOMAIN_PARTICIPANT_FACTORY_IMPL_H
7 #define OPENDDS_DCPS_DOMAIN_PARTICIPANT_FACTORY_IMPL_H
8 
9 #include "Definitions.h"
10 #include "LocalObject.h"
11 #include "PoolAllocator.h"
12 #include "InstanceHandle.h"
13 
14 #include <dds/DdsDcpsDomainC.h>
15 
16 #include <ace/Thread_Mutex.h>
17 
18 #ifndef ACE_LACKS_PRAGMA_ONCE
19 # pragma once
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
21 
23 
24 namespace OpenDDS {
25 namespace DCPS {
26 
27 class DomainParticipantImpl;
28 
29 /**
30 * @class DomainParticipantFactoryImpl
31 *
32 * @brief Implements the OpenDDS::DCPS::DomainParticipantFactory
33 * interfaces.
34 *
35 * This class acts as factory of the DomainParticipant.
36 *
37 * See the DDS specification, OMG formal/2015-04-10, for a description of
38 * the interface this class is implementing.
39 *
40 */
42  : public virtual OpenDDS::DCPS::LocalObject<DDS::DomainParticipantFactory> {
43 public:
44 
46  typedef OPENDDS_MAP(DDS::DomainId_t, DPSet) DPMap;
47 
49 
51 
52  virtual DDS::DomainParticipant_ptr create_participant(
53  DDS::DomainId_t domainId,
54  const DDS::DomainParticipantQos & qos,
55  DDS::DomainParticipantListener_ptr a_listener,
56  DDS::StatusMask mask);
57 
58  virtual DDS::ReturnCode_t delete_participant(
59  DDS::DomainParticipant_ptr a_participant);
60 
61  virtual DDS::DomainParticipant_ptr lookup_participant(
62  DDS::DomainId_t domainId);
63 
64  virtual DDS::ReturnCode_t set_default_participant_qos(
65  const DDS::DomainParticipantQos & qos);
66 
67  virtual DDS::ReturnCode_t get_default_participant_qos(
69 
70  virtual DDS::DomainParticipantFactory_ptr get_instance();
71 
72  virtual DDS::ReturnCode_t set_qos(
74 
75  virtual DDS::ReturnCode_t get_qos(
77 
78  /// Make a copy of the participants map for reading.
79  DPMap participants() const;
80 
81  DDS::ReturnCode_t delete_all_participants();
82 
83  size_t participant_count() const;
84 
85 private:
87 
88  /// The default qos value of DomainParticipant.
90 
91  /// The collection of domain participants.
93 
94  /// Protect the participant collection.
96 
97  /// Instance handle generators for non-repo backed entities
98  /// (i.e. subscribers and publishers).
100 };
101 
102 } // namespace DCPS
103 } // namespace OpenDDS
104 
106 
107 #endif /* OPENDDS_DCPS_DOMAIN_PARTICIPANT_FACTORY_IMPL_H */
#define OpenDDS_Dcps_Export
Definition: dcps_export.h:24
DPMap participants_
The collection of domain participants.
Implements the OpenDDS::DCPS::DomainParticipantFactory interfaces.
DDS::DomainParticipantQos default_participant_qos_
The default qos value of DomainParticipant.
DOMAINID_TYPE_NATIVE DomainId_t
ACE_Recursive_Thread_Mutex participants_protector_
Protect the participant collection.
unsigned long StatusMask
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL
The Internal API and Implementation of OpenDDS.
Definition: AddressCache.h:28
typedef OPENDDS_MAP(OPENDDS_STRING, OPENDDS_STRING) ValueMap
Helper types and functions for config file parsing.
typedef OPENDDS_SET(NetworkAddress) AddrSet