19 #include <dds/DdsDcpsInfoUtilsC.h> 36 "(%P|%t) DomainParticipantFactoryImpl::" 37 "~DomainParticipantFactoryImpl()\n"));
41 DDS::DomainParticipant_ptr
45 DDS::DomainParticipantListener_ptr a_listener,
58 ACE_TEXT(
"DomainParticipantFactoryImpl::create_participant, ")
61 return DDS::DomainParticipant::_nil();
68 ACE_TEXT(
"DomainParticipantFactoryImpl::create_participant, ")
71 return DDS::DomainParticipant::_nil();
82 ACE_TEXT(
"DomainParticipantFactoryImpl::create_participant, ")
83 ACE_TEXT(
"unable to enable DomainParticipant.\n")));
85 return DDS::DomainParticipant::_nil();
99 const bool ret =
TheTransportRegistry->create_new_transport_instance_for_participant(domainId, transport_config_name, transport_instance_name);
103 TheTransportRegistry->update_config_template_instance_info(transport_config_name, transport_instance_name);
108 ACE_TEXT(
"DomainParticipantFactoryImpl::create_participant, ")
109 ACE_TEXT(
"could not create new transport instance for participant.\n")));
111 return DDS::DomainParticipant::_nil();
118 DDS::DomainParticipant::_nil());
126 DDS::DomainParticipant_ptr a_participant)
132 ACE_TEXT(
"DomainParticipantFactoryImpl::delete_participant, ")
144 ACE_TEXT(
"DomainParticipantFactoryImpl::delete_participant: ")
145 ACE_TEXT(
"failed to obtain the DomainParticipantImpl.\n")));
160 if (!the_servant->
is_clean(&leftover_entities)) {
163 "DomainParticipantFactoryImpl::delete_participant: " 164 "the participant %C is not empty. %C leftover\n",
184 ACE_TEXT(
"DomainParticipantFactoryImpl::delete_participant: ")
185 ACE_TEXT(
"%p domain_id=%d dp_id=%C.\n"),
193 if (pos->second.erase(servant_rch) == 0) {
197 ACE_TEXT(
"DomainParticipantFactoryImpl::delete_participant, ")
204 if (pos->second.empty() &&
participants_.erase(domain_id) == 0) {
208 ACE_TEXT(
"DomainParticipantFactoryImpl::delete_participant, ")
225 if (!disco->remove_domain_participant(domain_id, dp_id)) {
229 ACE_TEXT(
"could not remove domain participant.\n")));
237 DDS::DomainParticipant_ptr
244 DDS::DomainParticipant::_nil());
252 ACE_TEXT(
"DomainParticipantFactoryImpl::lookup_participant, ")
253 ACE_TEXT(
" not found for domain %d.\n"),
257 return DDS::DomainParticipant::_nil();
263 return DDS::DomainParticipant::_duplicate(entry->begin()->in());
289 DDS::DomainParticipantFactory_ptr
318 DomainParticipantFactoryImpl::DPMap
340 for (itr = copy.begin(); itr != copy.end(); ++itr) {
341 DPSet& dp_set = itr->second;
342 DPSet::iterator dp_set_itr;
343 for (dp_set_itr = dp_set.begin(); dp_set_itr != dp_set.end(); ++dp_set_itr) {
349 "DomainParticipantFactoryImpl::delete_all_participants: " 350 "delete_contained_entities returned %C\n",
360 "DomainParticipantFactoryImpl::delete_all_participants: " 361 "delete_participant returned %C\n",
380 count += it->second.size();
#define TheTransportRegistry
#define PARTICIPANT_QOS_DEFAULT
Implements the OpenDDS::DCPS::DomainParticipant interfaces.
RcHandle< T > rchandle_from(T *pointer)
const char * c_str(void) const
DomainParticipantFactoryImpl()
const ReturnCode_t RETCODE_PRECONDITION_NOT_MET
const ReturnCode_t RETCODE_INCONSISTENT_POLICY
virtual ~DomainParticipantFactoryImpl()
virtual DDS::DomainParticipant_ptr create_participant(DDS::DomainId_t domainId, const DDS::DomainParticipantQos &qos, DDS::DomainParticipantListener_ptr a_listener, DDS::StatusMask mask)
static bool changeable(const DDS::UserDataQosPolicy &qos1, const DDS::UserDataQosPolicy &qos2)
DDS::ReturnCode_t delete_all_participants()
#define ACE_TEXT_ALWAYS_CHAR(STRING)
const char * c_str() const
DPMap participants_
The collection of domain participants.
reference_wrapper< T > ref(T &r)
EntityFactoryQosPolicy entity_factory
virtual DDS::ReturnCode_t get_default_participant_qos(DDS::DomainParticipantQos &qos)
DDS::DomainParticipantQos default_participant_qos_
The default qos value of DomainParticipant.
virtual DDS::ReturnCode_t get_qos(DDS::DomainParticipantFactoryQos &qos)
DOMAINID_TYPE_NATIVE DomainId_t
virtual DDS::ReturnCode_t set_default_participant_qos(const DDS::DomainParticipantQos &qos)
ACE_Recursive_Thread_Mutex participants_protector_
Protect the participant collection.
virtual DDS::DomainParticipantFactory_ptr get_instance()
size_t participant_count() const
#define ACE_GUARD_RETURN(MUTEX, OBJ, LOCK, RETURN)
virtual DDS::ReturnCode_t delete_contained_entities()
bool is_clean(String *leftover_entities=0) const
const ReturnCode_t RETCODE_OUT_OF_RESOURCES
virtual DDS::ReturnCode_t delete_participant(DDS::DomainParticipant_ptr a_participant)
virtual DDS::DomainId_t get_domain_id()
OPENDDS_STRING name() const
OpenDDS_Dcps_Export unsigned int DCPS_debug_level
OpenDDS_Dcps_Export LogLevel log_level
InstanceHandleGenerator participant_handles_
DDS::DomainParticipantFactoryQos qos_
boolean autoenable_created_entities
const char * retcode_to_string(DDS::ReturnCode_t value)
DDS::ReturnCode_t copy(DDS::DynamicData_ptr dest, DDS::DynamicData_ptr src)
const ReturnCode_t RETCODE_ERROR
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL
virtual DDS::ReturnCode_t set_qos(const DDS::DomainParticipantFactoryQos &qos)
const ReturnCode_t RETCODE_OK
#define TheParticipantFactory
static bool valid(const DDS::UserDataQosPolicy &qos)
#define TheServiceParticipant
static bool consistent(const DDS::ResourceLimitsQosPolicy &resource_limits, const DDS::HistoryQosPolicy &history)
The Internal API and Implementation of OpenDDS.
DPMap participants() const
Make a copy of the participants map for reading.
virtual DDS::DomainParticipant_ptr lookup_participant(DDS::DomainId_t domainId)
const ReturnCode_t RETCODE_BAD_PARAMETER
int find(Container &c, const Key &key, typename Container::mapped_type *&value)