DDS4CCM
1.2.3
|
Stores a DDSParticipantTopic per domain ID and QOS profile string. When several connectors are joining the same domain ID, using the same QOS settings (ie have the same QOS profile string), the DomainParticipant for that combination is shared. This is done to save resources (running threads/memory usage). More...
#include <DomainParticipantManager.h>
Classes | |
class | DDSParticipantTopic |
Public Member Functions | |
~DomainParticipantManager (void) | |
Destructor. More... | |
DDS::DomainParticipant_ptr | get_participant (const DDS::DomainId_t domain_id, const char *qos_profile) |
bool | register_participant (DDS::DomainId_t domain_id, const char *qos_profile, DDS::DomainParticipant_ptr dp) |
bool | unregister_participant (DDS::DomainId_t domain_id, const char *qos_profile, DDS::DomainParticipant_ptr dp) |
bool | close () |
Private Types | |
typedef std::pair< std::string, DDS::DomainId_t > | IdQosProfile |
typedef std::map< IdQosProfile, DDSParticipantTopic * > | DomainParticipants |
typedef DomainParticipants::iterator | DomainParticipants_iterator |
Private Member Functions | |
DomainParticipantManager (void) | |
Constructor. More... | |
Private Attributes | |
TAO_SYNCH_MUTEX | dps_mutex_ |
DomainParticipants | dps_ |
Friends | |
class | ACE_Singleton< DomainParticipantManager, TAO_SYNCH_MUTEX > |
Stores a DDSParticipantTopic per domain ID and QOS profile string. When several connectors are joining the same domain ID, using the same QOS settings (ie have the same QOS profile string), the DomainParticipant for that combination is shared. This is done to save resources (running threads/memory usage).
The DomainParticipantManager is a singleton.
|
private |
|
private |
|
private |
|
private |
Constructor.
CIAO::DDS4CCM::DomainParticipantManager::~DomainParticipantManager | ( | void | ) |
Destructor.
bool CIAO::DDS4CCM::DomainParticipantManager::close | ( | ) |
Try to close the DPM, at the moment no domain participants are registered anymore we are going to shutdown DDS interaction
DDS::DomainParticipant_ptr CIAO::DDS4CCM::DomainParticipantManager::get_participant | ( | const DDS::DomainId_t | domain_id, |
const char * | qos_profile | ||
) |
Searches for the DomainParticipant_ptr in the internal map. Search is based on the given domain ID and the given QOS (QOS profile string). If found, it'll increment the reference count of the DDSParticipantTopic instance.
bool CIAO::DDS4CCM::DomainParticipantManager::register_participant | ( | DDS::DomainId_t | domain_id, |
const char * | qos_profile, | ||
DDS::DomainParticipant_ptr | dp | ||
) |
Adding a DDSParticipantTopic instance when the internal maps doesn't contain a reference. Returns false if there's already an DDSParticipantTopic available (base on domain ID and QOS)
bool CIAO::DDS4CCM::DomainParticipantManager::unregister_participant | ( | DDS::DomainId_t | domain_id, |
const char * | qos_profile, | ||
DDS::DomainParticipant_ptr | dp | ||
) |
Removes the DDSParticipantTopic instance when the reference count is one. Returns false if the reference count of the corresponding DDSParticipantTopic was not nil
|
friend |
|
private |
|
private |