DCPS_IR_Domain Class Reference

Representation of a Domain in the system. More...

#include <DCPS_IR_Domain.h>

Collaboration diagram for DCPS_IR_Domain:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 DCPS_IR_Domain (::DDS::DomainId_t id, GuidGenerator &generator)
 ~DCPS_IR_Domain ()
int add_participant (DCPS_IR_Participant *participant)
int remove_participant (const OpenDDS::DCPS::RepoId &particpantId, CORBA::Boolean notify_lost)
DCPS_IR_Participantparticipant (const OpenDDS::DCPS::RepoId &id) const
 Find the participant with the id.
OpenDDS::DCPS::TopicStatus add_topic (OpenDDS::DCPS::RepoId_out topicId, const char *topicName, const char *dataTypeName, const ::DDS::TopicQos &qos, DCPS_IR_Participant *participantPtr)
OpenDDS::DCPS::TopicStatus force_add_topic (const OpenDDS::DCPS::RepoId &topicId, const char *topicName, const char *dataTypeName, const ::DDS::TopicQos &qos, DCPS_IR_Participant *participantPtr)
OpenDDS::DCPS::TopicStatus find_topic (const char *topicName, DCPS_IR_Topic *&topic)
DCPS_IR_Topicfind_topic (const OpenDDS::DCPS::RepoId &id)
 Find a topic object reference using the topic Id value.
OpenDDS::DCPS::TopicStatus remove_topic (DCPS_IR_Participant *part, DCPS_IR_Topic *&topic)
void add_dead_participant (DCPS_IR_Participant *participant)
void remove_dead_participants ()
 Remove any participants currently marked as dead.
::DDS::DomainId_t get_id ()
OpenDDS::DCPS::RepoId get_next_participant_id ()
void last_participant_key (long key)
OpenDDS::DCPS::RepoId participant (const CORBA::Long key)
OpenDDS::DCPS::RepoId topic (const CORBA::Long key)
OpenDDS::DCPS::RepoId subscription (const CORBA::Long key)
OpenDDS::DCPS::RepoId publication (const CORBA::Long key)
int init_built_in_topics (bool federated=false)
int cleanup_built_in_topics ()
 Cleans up the Built-In Topic structures.
void publish_participant_bit (DCPS_IR_Participant *participant)
 Publish the Built-In Topic information.
void publish_topic_bit (DCPS_IR_Topic *topic)
void publish_subscription_bit (DCPS_IR_Subscription *subscription)
void publish_publication_bit (DCPS_IR_Publication *publication)
void dispose_participant_bit (DCPS_IR_Participant *participant)
 Remove the Built-In Topic information.
void dispose_topic_bit (DCPS_IR_Topic *topic)
void dispose_subscription_bit (DCPS_IR_Subscription *subscription)
void dispose_publication_bit (DCPS_IR_Publication *publication)
const DCPS_IR_Participant_Mapparticipants () const
 Expose a readable reference to the participant map.

Private Types

typedef std::map< OpenDDS::DCPS::RepoId,
DCPS_IR_Topic *, GUID_tKeyLessThan > 
IdToTopicMap
 Mapping from RepoId values to Topic object references.
typedef std::map< CORBA::Long,
OpenDDS::DCPS::RepoId
KeyToIdMap
 Map from InstanceHandle values to GUID values.

Private Member Functions

OpenDDS::DCPS::TopicStatus add_topic_i (OpenDDS::DCPS::RepoId &topicId, const char *topicName, const char *dataTypeName, const ::DDS::TopicQos &qos, DCPS_IR_Participant *participantPtr)
int add_topic_description (DCPS_IR_Topic_Description *&desc)
int find_topic_description (const char *name, const char *dataTypeName, DCPS_IR_Topic_Description *&desc)
int remove_topic_description (DCPS_IR_Topic_Description *&desc)
int init_built_in_topics_topics ()
int init_built_in_topics_datawriters (bool federated)
int init_built_in_topics_transport ()

Private Attributes

::DDS::DomainId_t id_
GuidGeneratorparticipantIdGenerator_
DCPS_IR_Participant_Map participants_
 all the participants
DCPS_IR_Participant_Set deadParticipants_
DCPS_IR_Topic_Description_Set topicDescriptions_
 all the topics
IdToTopicMap idToTopicMap_
 Actual mapping of Id values to Topic object references.
bool useBIT_
 indicates if the BuiltIn Topics are enabled
::DDS::DomainParticipantFactory_var bitParticipantFactory_
 Built-in Topic variables.
::DDS::DomainParticipant_var bitParticipant_
::DDS::DomainParticipantListener_var bitParticipantListener_
::DDS::Publisher_var bitPublisher_
OpenDDS::DCPS::TransportImpl_rch transportImpl_
::DDS::Topic_var bitParticipantTopic_
::DDS::ParticipantBuiltinTopicDataDataWriter_var bitParticipantDataWriter_
::DDS::Topic_var bitTopicTopic_
::DDS::TopicBuiltinTopicDataDataWriter_var bitTopicDataWriter_
::DDS::Topic_var bitSubscriptionTopic_
::DDS::SubscriptionBuiltinTopicDataDataWriter_var bitSubscriptionDataWriter_
::DDS::Topic_var bitPublicationTopic_
::DDS::PublicationBuiltinTopicDataDataWriter_var bitPublicationDataWriter_
KeyToIdMap participantKeyToIdMap_
 Participant Keys and Ids.
KeyToIdMap topicKeyToIdMap_
 Topic Keys and Ids.
KeyToIdMap subscriptionKeyToIdMap_
 Subscription Keys and Ids.
KeyToIdMap publicationKeyToIdMap_
 Publication Keys and Ids.

Detailed Description

Representation of a Domain in the system.

This represents a Domain in the system. It contains the representatives of the entities that are in the corresponding system's domain.


Member Typedef Documentation

typedef std::map< OpenDDS::DCPS::RepoId, DCPS_IR_Topic*, GUID_tKeyLessThan> DCPS_IR_Domain::IdToTopicMap [private]

Mapping from RepoId values to Topic object references.

typedef std::map< CORBA::Long, OpenDDS::DCPS::RepoId> DCPS_IR_Domain::KeyToIdMap [private]

Map from InstanceHandle values to GUID values.


Constructor & Destructor Documentation

DCPS_IR_Domain::DCPS_IR_Domain ( ::DDS::DomainId_t  id,
GuidGenerator generator 
)

DCPS_IR_Domain::~DCPS_IR_Domain (  ) 


Member Function Documentation

void DCPS_IR_Domain::add_dead_participant ( DCPS_IR_Participant participant  ) 

Mark a participant as being unresponsive (dead) and schedule it to be removed next time remove_dead_participants is called.

int DCPS_IR_Domain::add_participant ( DCPS_IR_Participant participant  ) 

Add the participant This takes ownership of the memory if the particpant is added. Returns 0 if added, 1 if already exists, -1 other failure

: This only affects the 'ignore_*()' interfaces, so allow

OpenDDS::DCPS::TopicStatus DCPS_IR_Domain::add_topic ( OpenDDS::DCPS::RepoId_out  topicId,
const char *  topicName,
const char *  dataTypeName,
const ::DDS::TopicQos qos,
DCPS_IR_Participant participantPtr 
)

Add a topic to the domain Returns OpenDDS::DCPS::CREATED if successfull

int DCPS_IR_Domain::add_topic_description ( DCPS_IR_Topic_Description *&  desc  )  [private]

Takes ownership of the memory pointed to by desc if successful returns 0 if successful, 1 if description already exists -1 unknown error 2 if confliciting dataTypeName

OpenDDS::DCPS::TopicStatus DCPS_IR_Domain::add_topic_i ( OpenDDS::DCPS::RepoId topicId,
const char *  topicName,
const char *  dataTypeName,
const ::DDS::TopicQos qos,
DCPS_IR_Participant participantPtr 
) [private]

int DCPS_IR_Domain::cleanup_built_in_topics (  ) 

Cleans up the Built-In Topic structures.

void DCPS_IR_Domain::dispose_participant_bit ( DCPS_IR_Participant participant  ) 

Remove the Built-In Topic information.

void DCPS_IR_Domain::dispose_publication_bit ( DCPS_IR_Publication publication  ) 

void DCPS_IR_Domain::dispose_subscription_bit ( DCPS_IR_Subscription subscription  ) 

void DCPS_IR_Domain::dispose_topic_bit ( DCPS_IR_Topic topic  ) 

DCPS_IR_Topic * DCPS_IR_Domain::find_topic ( const OpenDDS::DCPS::RepoId id  ) 

Find a topic object reference using the topic Id value.

OpenDDS::DCPS::TopicStatus DCPS_IR_Domain::find_topic ( const char *  topicName,
DCPS_IR_Topic *&  topic 
)

Find the topic with the topic name Does NOT take ownership of any initial memory pointed to by topic Returns OpenDDS::DCPS::FOUND if exists and topic is changed, -1 otherwise

int DCPS_IR_Domain::find_topic_description ( const char *  name,
const char *  dataTypeName,
DCPS_IR_Topic_Description *&  desc 
) [private]

Find the topic description with the name and data type name Does NOT take ownership of any initial memory pointed to by desc Returns 0 if found and desc is changed, -1 if not found and 1 if confliciting dataTypeName

OpenDDS::DCPS::TopicStatus DCPS_IR_Domain::force_add_topic ( const OpenDDS::DCPS::RepoId topicId,
const char *  topicName,
const char *  dataTypeName,
const ::DDS::TopicQos qos,
DCPS_IR_Participant participantPtr 
)

DDS::DomainId_t DCPS_IR_Domain::get_id (  ) 

OpenDDS::DCPS::RepoId DCPS_IR_Domain::get_next_participant_id (  ) 

int DCPS_IR_Domain::init_built_in_topics ( bool  federated = false  ) 

Initialize the Built-In Topic structures This needs to be called before the run begins Returns 0 (zero) if successful

int DCPS_IR_Domain::init_built_in_topics_datawriters ( bool  federated  )  [private]

int DCPS_IR_Domain::init_built_in_topics_topics (  )  [private]

work of initializing the built in topics is done in these private methods. They were broken up for readability.

int DCPS_IR_Domain::init_built_in_topics_transport (  )  [private]

void DCPS_IR_Domain::last_participant_key ( long  key  ) 

OpenDDS::DCPS::RepoId DCPS_IR_Domain::participant ( const CORBA::Long  key  ) 

DCPS_IR_Participant * DCPS_IR_Domain::participant ( const OpenDDS::DCPS::RepoId id  )  const

Find the participant with the id.

const DCPS_IR_Participant_Map & DCPS_IR_Domain::participants (  )  const

Expose a readable reference to the participant map.

OpenDDS::DCPS::RepoId DCPS_IR_Domain::publication ( const CORBA::Long  key  ) 

void DCPS_IR_Domain::publish_participant_bit ( DCPS_IR_Participant participant  ) 

Publish the Built-In Topic information.

: FIXME!

void DCPS_IR_Domain::publish_publication_bit ( DCPS_IR_Publication publication  ) 

void DCPS_IR_Domain::publish_subscription_bit ( DCPS_IR_Subscription subscription  ) 

void DCPS_IR_Domain::publish_topic_bit ( DCPS_IR_Topic topic  ) 

void DCPS_IR_Domain::remove_dead_participants (  ) 

Remove any participants currently marked as dead.

int DCPS_IR_Domain::remove_participant ( const OpenDDS::DCPS::RepoId particpantId,
CORBA::Boolean  notify_lost 
)

Remove the particpant The participant has been deleted if returns successful. Returns 0 if successful. The notify_lost parameter is passed to the remove_associations() See the comments of remove_associations() in DdsDcpsDataWriterRemote.idl or DdsDcpsDataReaderRemote.idl.

OpenDDS::DCPS::TopicStatus DCPS_IR_Domain::remove_topic ( DCPS_IR_Participant part,
DCPS_IR_Topic *&  topic 
)

Remove the topic The topic has been deleted if returns successful Returns OpenDDS::DCPS::REMOVED if successful

int DCPS_IR_Domain::remove_topic_description ( DCPS_IR_Topic_Description *&  desc  )  [private]

Caller is given ownership of the topic description and any memory that it has ownership of if returns successful

: Is this a leak? Who owns the contained description?

OpenDDS::DCPS::RepoId DCPS_IR_Domain::subscription ( const CORBA::Long  key  ) 

OpenDDS::DCPS::RepoId DCPS_IR_Domain::topic ( const CORBA::Long  key  ) 


Member Data Documentation

::DDS::DomainParticipant_var DCPS_IR_Domain::bitParticipant_ [private]

::DDS::ParticipantBuiltinTopicDataDataWriter_var DCPS_IR_Domain::bitParticipantDataWriter_ [private]

::DDS::DomainParticipantFactory_var DCPS_IR_Domain::bitParticipantFactory_ [private]

Built-in Topic variables.

::DDS::DomainParticipantListener_var DCPS_IR_Domain::bitParticipantListener_ [private]

::DDS::Topic_var DCPS_IR_Domain::bitParticipantTopic_ [private]

::DDS::PublicationBuiltinTopicDataDataWriter_var DCPS_IR_Domain::bitPublicationDataWriter_ [private]

::DDS::Topic_var DCPS_IR_Domain::bitPublicationTopic_ [private]

::DDS::Publisher_var DCPS_IR_Domain::bitPublisher_ [private]

::DDS::SubscriptionBuiltinTopicDataDataWriter_var DCPS_IR_Domain::bitSubscriptionDataWriter_ [private]

::DDS::Topic_var DCPS_IR_Domain::bitSubscriptionTopic_ [private]

::DDS::TopicBuiltinTopicDataDataWriter_var DCPS_IR_Domain::bitTopicDataWriter_ [private]

::DDS::Topic_var DCPS_IR_Domain::bitTopicTopic_ [private]

DCPS_IR_Participant_Set DCPS_IR_Domain::deadParticipants_ [private]

the dead participants dead participants exist in both this and participants_

::DDS::DomainId_t DCPS_IR_Domain::id_ [private]

IdToTopicMap DCPS_IR_Domain::idToTopicMap_ [private]

Actual mapping of Id values to Topic object references.

GuidGenerator& DCPS_IR_Domain::participantIdGenerator_ [private]

KeyToIdMap DCPS_IR_Domain::participantKeyToIdMap_ [private]

Participant Keys and Ids.

DCPS_IR_Participant_Map DCPS_IR_Domain::participants_ [private]

all the participants

KeyToIdMap DCPS_IR_Domain::publicationKeyToIdMap_ [private]

Publication Keys and Ids.

KeyToIdMap DCPS_IR_Domain::subscriptionKeyToIdMap_ [private]

Subscription Keys and Ids.

DCPS_IR_Topic_Description_Set DCPS_IR_Domain::topicDescriptions_ [private]

all the topics

KeyToIdMap DCPS_IR_Domain::topicKeyToIdMap_ [private]

Topic Keys and Ids.

OpenDDS::DCPS::TransportImpl_rch DCPS_IR_Domain::transportImpl_ [private]

bool DCPS_IR_Domain::useBIT_ [private]

indicates if the BuiltIn Topics are enabled


The documentation for this class was generated from the following files:
Generated on Fri Nov 7 09:37:22 2008 for OpenDDS by  doxygen 1.4.7