DDS4CCM  1.2.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends | List of all members
CIAO::DDS4CCM::DomainParticipantManager Class Reference

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>

Inheritance diagram for CIAO::DDS4CCM::DomainParticipantManager:
Inheritance graph
Collaboration diagram for CIAO::DDS4CCM::DomainParticipantManager:
Collaboration graph

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 >
 

Detailed Description

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.

Member Typedef Documentation

typedef DomainParticipants::iterator CIAO::DDS4CCM::DomainParticipantManager::DomainParticipants_iterator
private

Constructor & Destructor Documentation

CIAO::DDS4CCM::DomainParticipantManager::DomainParticipantManager ( void  )
private

Constructor.

CIAO::DDS4CCM::DomainParticipantManager::~DomainParticipantManager ( void  )

Destructor.

Member Function Documentation

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

Friends And Related Function Documentation

Member Data Documentation

DomainParticipants CIAO::DDS4CCM::DomainParticipantManager::dps_
private
TAO_SYNCH_MUTEX CIAO::DDS4CCM::DomainParticipantManager::dps_mutex_
private

The documentation for this class was generated from the following files: