00001
00002
00003
00004
00005
00006
00007
00008 #ifndef OPENDDS_DCPS_DOMAIN_PARTICIPANT_FACTORY_IMPL_H
00009 #define OPENDDS_DCPS_DOMAIN_PARTICIPANT_FACTORY_IMPL_H
00010
00011 #include "Definitions.h"
00012 #include "dds/DdsDcpsDomainC.h"
00013 #include "ace/Null_Mutex.h"
00014 #include "ace/Recursive_Thread_Mutex.h"
00015 #include "dds/DCPS/LocalObject.h"
00016 #include "dds/DCPS/PoolAllocator.h"
00017
00018 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00019 #pragma once
00020 #endif
00021
00022 namespace OpenDDS {
00023 namespace DCPS {
00024
00025 class DomainParticipantImpl;
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 class OpenDDS_Dcps_Export DomainParticipantFactoryImpl
00040 : public virtual OpenDDS::DCPS::LocalObject<DDS::DomainParticipantFactory> {
00041 public:
00042
00043 typedef Objref_Servant_Pair <DomainParticipantImpl, DDS::DomainParticipant,
00044 DDS::DomainParticipant_ptr, DDS::DomainParticipant_var> Participant_Pair;
00045 typedef OPENDDS_SET(Participant_Pair) DPSet;
00046 typedef OPENDDS_MAP(DDS::DomainId_t, DPSet) DPMap;
00047
00048
00049 DomainParticipantFactoryImpl();
00050
00051
00052 virtual ~DomainParticipantFactoryImpl();
00053
00054 virtual DDS::DomainParticipant_ptr create_participant(
00055 DDS::DomainId_t domainId,
00056 const DDS::DomainParticipantQos & qos,
00057 DDS::DomainParticipantListener_ptr a_listener,
00058 DDS::StatusMask mask);
00059
00060 virtual DDS::ReturnCode_t delete_participant(
00061 DDS::DomainParticipant_ptr a_participant);
00062
00063 virtual DDS::DomainParticipant_ptr lookup_participant(
00064 DDS::DomainId_t domainId);
00065
00066 virtual DDS::ReturnCode_t set_default_participant_qos(
00067 const DDS::DomainParticipantQos & qos);
00068
00069 virtual DDS::ReturnCode_t get_default_participant_qos(
00070 DDS::DomainParticipantQos & qos);
00071
00072 virtual DDS::DomainParticipantFactory_ptr get_instance();
00073
00074 virtual DDS::ReturnCode_t set_qos(
00075 const DDS::DomainParticipantFactoryQos & qos);
00076
00077 virtual DDS::ReturnCode_t get_qos(
00078 DDS::DomainParticipantFactoryQos & qos);
00079
00080
00081 const DPMap& participants() const;
00082
00083 private:
00084
00085 DDS::DomainParticipantFactoryQos qos_;
00086
00087
00088 DDS::DomainParticipantQos default_participant_qos_;
00089
00090
00091 DPMap participants_;
00092
00093
00094
00095
00096 ACE_Recursive_Thread_Mutex participants_protector_;
00097 };
00098
00099 }
00100 }
00101
00102 #endif