OpenDDS
Snapshot(2023/03/10-19:29)
|
Representative of a Topic. More...
#include <DCPS_IR_Topic.h>
Additional Inherited Members | |
![]() | |
EnableContainerSupportedUniquePtr () | |
void | _add_ref () |
void | _remove_ref () |
long | ref_count () const |
Representative of a Topic.
Definition at line 43 of file DCPS_IR_Topic.h.
OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL DCPS_IR_Topic::DCPS_IR_Topic | ( | const OpenDDS::DCPS::GUID_t & | id, |
const DDS::TopicQos & | qos, | ||
DCPS_IR_Domain * | domain, | ||
DCPS_IR_Participant * | creator, | ||
DCPS_IR_Topic_Description * | description, | ||
bool | isBIT | ||
) |
Definition at line 25 of file DCPS_IR_Topic.cpp.
DCPS_IR_Topic::~DCPS_IR_Topic | ( | ) |
Definition at line 42 of file DCPS_IR_Topic.cpp.
int DCPS_IR_Topic::add_publication_reference | ( | DCPS_IR_Publication * | publication, |
bool | associate = true |
||
) |
Adds the publication to the list of publications Calls the topic description's try associate if successfully added 'associate' switch toggles association attempt. Returns 0 if added, 1 if already exists, -1 other failure
Definition at line 57 of file DCPS_IR_Topic.cpp.
References ACE_DEBUG, ACE_ERROR, ACE_TEXT(), OpenDDS::DCPS::DCPS_debug_level, description_, domain_, DCPS_IR_Publication::get_id(), id_, ACE_Unbounded_Set_Ex< T, ACE_Unbounded_Set_Default_Comparator< T > >::insert(), LM_DEBUG, LM_ERROR, LM_WARNING, publicationRefs_, DCPS_IR_Domain::publish_publication_bit(), and DCPS_IR_Topic_Description::try_associate_publication().
Referenced by TAO_DDS_DCPSInfo_i::add_publication().
int DCPS_IR_Topic::add_subscription_reference | ( | DCPS_IR_Subscription * | subscription, |
bool | associate = true |
||
) |
Adds the subscription to the list of subscriptions and let description handle the association. Returns 0 if added, 1 if already exists, -1 other failure
Definition at line 143 of file DCPS_IR_Topic.cpp.
References ACE_DEBUG, ACE_ERROR, ACE_TEXT(), DCPS_IR_Topic_Description::add_subscription_reference(), OpenDDS::DCPS::DCPS_debug_level, description_, DCPS_IR_Subscription::get_id(), id_, ACE_Unbounded_Set_Ex< T, ACE_Unbounded_Set_Default_Comparator< T > >::insert(), LM_DEBUG, LM_ERROR, and subscriptionRefs_.
Referenced by TAO_DDS_DCPSInfo_i::add_subscription().
std::string DCPS_IR_Topic::dump_to_string | ( | const std::string & | prefix, |
int | depth | ||
) | const |
Definition at line 375 of file DCPS_IR_Topic.cpp.
References ACE_Unbounded_Set_Ex< T, ACE_Unbounded_Set_Default_Comparator< T > >::begin(), ACE_Unbounded_Set_Ex< T, ACE_Unbounded_Set_Default_Comparator< T > >::end(), id_, isBIT_, OPENDDS_END_VERSIONED_NAMESPACE_DECL, publicationRefs_, and subscriptionRefs_.
DDS::InstanceHandle_t DCPS_IR_Topic::get_handle | ( | void | ) |
Definition at line 327 of file DCPS_IR_Topic.cpp.
References handle_.
Referenced by DCPS_IR_Domain::dispose_topic_bit().
OpenDDS::DCPS::GUID_t DCPS_IR_Topic::get_id | ( | void | ) | const |
Definition at line 220 of file DCPS_IR_Topic.cpp.
References id_.
Referenced by DCPS_IR_Topic_Description::add_topic(), DCPS_IR_Participant::add_topic_reference(), TAO_DDS_DCPSInfo_i::find_topic(), DCPS_IR_Domain::find_topic(), DCPS_IR_Topic_Description::get_first_topic(), DCPS_IR_Publication::get_topic_id(), DCPS_IR_Subscription::get_topic_id(), DCPS_IR_Domain::publish_topic_bit(), DCPS_IR_Topic_Description::remove_topic(), and DCPS_IR_Domain::remove_topic().
OpenDDS::DCPS::GUID_t DCPS_IR_Topic::get_participant_id | ( | ) | const |
Definition at line 225 of file DCPS_IR_Topic.cpp.
References DCPS_IR_Participant::get_id(), and participant_.
DCPS_IR_Topic_Description * DCPS_IR_Topic::get_topic_description | ( | ) |
Return pointer to the Topic Description Domain retains ownership
Definition at line 322 of file DCPS_IR_Topic.cpp.
References description_.
Referenced by TAO_DDS_DCPSInfo_i::find_topic(), DCPS_IR_Publication::get_topic_description(), DCPS_IR_Subscription::get_topic_description(), DCPS_IR_Domain::publish_topic_bit(), DCPS_IR_Subscription::reevaluate_association(), DCPS_IR_Publication::reevaluate_association(), DCPS_IR_Domain::remove_topic(), DCPS_IR_Publication::set_qos(), and DCPS_IR_Subscription::set_qos().
DDS::TopicQos * DCPS_IR_Topic::get_topic_qos | ( | ) |
Return pointer to the Topic qos Topic retains ownership
Definition at line 230 of file DCPS_IR_Topic.cpp.
References qos_.
Referenced by TAO_DDS_DCPSInfo_i::find_topic(), DCPS_IR_Domain::publish_publication_bit(), DCPS_IR_Domain::publish_subscription_bit(), and DCPS_IR_Domain::publish_topic_bit().
CORBA::Boolean DCPS_IR_Topic::is_bit | ( | ) |
Definition at line 337 of file DCPS_IR_Topic.cpp.
References isBIT_.
Referenced by DCPS_IR_Domain::dispose_topic_bit().
void DCPS_IR_Topic::reassociate_all_publications | ( | ) |
Try to associate all the current publications. This is used to reconnect Built in Topics after a persistent restart.
Definition at line 363 of file DCPS_IR_Topic.cpp.
References ACE_Unbounded_Set_Ex< T, ACE_Unbounded_Set_Default_Comparator< T > >::begin(), description_, ACE_Unbounded_Set_Ex< T, ACE_Unbounded_Set_Default_Comparator< T > >::end(), publicationRefs_, and DCPS_IR_Topic_Description::try_associate_publication().
void DCPS_IR_Topic::reevaluate_associations | ( | DCPS_IR_Subscription * | subscription | ) |
Called by the DCPS_IR_Topic_Description to re-evaluate the association between the publications of this topic and the provided subscription.
Definition at line 347 of file DCPS_IR_Topic.cpp.
References ACE_Unbounded_Set_Ex< T, ACE_Unbounded_Set_Default_Comparator< T > >::begin(), ACE_Unbounded_Set_Ex< T, ACE_Unbounded_Set_Default_Comparator< T > >::end(), publicationRefs_, DCPS_IR_Subscription::reevaluate_association(), and DCPS_IR_Publication::reevaluate_association().
Referenced by DCPS_IR_Topic_Description::reevaluate_associations().
void DCPS_IR_Topic::release | ( | bool | removing | ) |
Delete the topic object upon last topic associated sub/pub and topic object deletion. It's kind of reference counting. The removing true indicates it's called upon delete_topic, otherwise it's upon remove_publication/remove_subscription.
Definition at line 46 of file DCPS_IR_Topic.cpp.
References domain_, id_, publicationRefs_, DCPS_IR_Domain::remove_topic_id_mapping(), removed_, ACE_Unbounded_Set_Ex< T, ACE_Unbounded_Set_Default_Comparator< T > >::size(), and subscriptionRefs_.
Referenced by DCPS_IR_Participant::remove_all_dependents(), DCPS_IR_Participant::remove_publication(), DCPS_IR_Participant::remove_subscription(), and DCPS_IR_Domain::remove_topic().
int DCPS_IR_Topic::remove_publication_reference | ( | DCPS_IR_Publication * | publication | ) |
Removes the publication from the list of publications Returns 0 if successful
Definition at line 115 of file DCPS_IR_Topic.cpp.
References ACE_DEBUG, ACE_ERROR, ACE_TEXT(), OpenDDS::DCPS::DCPS_debug_level, DCPS_IR_Publication::get_id(), id_, LM_DEBUG, LM_ERROR, publicationRefs_, and ACE_Unbounded_Set_Ex< T, ACE_Unbounded_Set_Default_Comparator< T > >::remove().
Referenced by DCPS_IR_Participant::remove_all_dependents(), and DCPS_IR_Participant::remove_publication().
int DCPS_IR_Topic::remove_subscription_reference | ( | DCPS_IR_Subscription * | subscription | ) |
Removes the subscription from the list of subscriptions Returns 0 if successful
Definition at line 190 of file DCPS_IR_Topic.cpp.
References ACE_DEBUG, ACE_ERROR, ACE_TEXT(), OpenDDS::DCPS::DCPS_debug_level, description_, DCPS_IR_Subscription::get_id(), id_, LM_DEBUG, LM_ERROR, ACE_Unbounded_Set_Ex< T, ACE_Unbounded_Set_Default_Comparator< T > >::remove(), DCPS_IR_Topic_Description::remove_subscription_reference(), and subscriptionRefs_.
Referenced by DCPS_IR_Participant::remove_all_dependents(), and DCPS_IR_Participant::remove_subscription().
void DCPS_IR_Topic::set_bit_status | ( | CORBA::Boolean | isBIT | ) |
Definition at line 342 of file DCPS_IR_Topic.cpp.
References isBIT_.
Referenced by DCPS_IR_Participant::add_topic_reference(), and DCPS_IR_Domain::publish_topic_bit().
void DCPS_IR_Topic::set_handle | ( | DDS::InstanceHandle_t | handle | ) |
Definition at line 332 of file DCPS_IR_Topic.cpp.
References handle_.
Referenced by DCPS_IR_Domain::publish_topic_bit().
bool DCPS_IR_Topic::set_topic_qos | ( | const DDS::TopicQos & | qos | ) |
Reset topic qos and also propagate the qos change to related BITs that has the qos copy. Return false if the provided QoS makes the DataWriter and DataReader QoS incompatible. Currently supported changeable QoS in TopicQos do not affect.
Definition at line 235 of file DCPS_IR_Topic.cpp.
References ACE_Unbounded_Set_Ex< T, ACE_Unbounded_Set_Default_Comparator< T > >::begin(), domain_, ACE_Unbounded_Set_Ex< T, ACE_Unbounded_Set_Default_Comparator< T > >::end(), publicationRefs_, DCPS_IR_Domain::publish_publication_bit(), DCPS_IR_Domain::publish_subscription_bit(), DCPS_IR_Domain::publish_topic_bit(), qos_, subscriptionRefs_, and DDS::TopicQos::topic_data.
Referenced by TAO_DDS_DCPSInfo_i::update_topic_qos().
void DCPS_IR_Topic::try_associate | ( | DCPS_IR_Subscription * | subscription | ) |
Called by the DCPS_IR_Topic_Description Find any compatible publications and associate them using the DCPS_IR_Topic_Description's associate method. This method does not check the subscription's incompatible qos status.
Definition at line 280 of file DCPS_IR_Topic.cpp.
References ACE_DEBUG, ACE_TEXT(), ACE_Unbounded_Set_Ex< T, ACE_Unbounded_Set_Default_Comparator< T > >::begin(), OpenDDS::DCPS::IncompatibleQosStatus::count_since_last_send, OpenDDS::DCPS::DCPS_debug_level, description_, ACE_Unbounded_Set_Ex< T, ACE_Unbounded_Set_Default_Comparator< T > >::end(), DCPS_IR_Subscription::get_id(), DCPS_IR_Publication::get_incompatibleQosStatus(), DCPS_IR_Subscription::get_participant_id(), DCPS_IR_Subscription::get_topic_id(), id_, DCPS_IR_Participant::is_participant_ignored(), DCPS_IR_Participant::is_subscription_ignored(), DCPS_IR_Participant::is_topic_ignored(), LM_DEBUG, participant_, publicationRefs_, DCPS_IR_Topic_Description::try_associate(), and DCPS_IR_Publication::update_incompatible_qos().
Referenced by DCPS_IR_Topic_Description::try_associate_subscription().
|
private |
Definition at line 131 of file DCPS_IR_Topic.h.
Referenced by add_publication_reference(), add_subscription_reference(), get_topic_description(), reassociate_all_publications(), remove_subscription_reference(), and try_associate().
|
private |
Definition at line 129 of file DCPS_IR_Topic.h.
Referenced by add_publication_reference(), release(), and set_topic_qos().
|
private |
Definition at line 132 of file DCPS_IR_Topic.h.
Referenced by get_handle(), and set_handle().
|
private |
Definition at line 127 of file DCPS_IR_Topic.h.
Referenced by add_publication_reference(), add_subscription_reference(), dump_to_string(), get_id(), release(), remove_publication_reference(), remove_subscription_reference(), and try_associate().
|
private |
Definition at line 133 of file DCPS_IR_Topic.h.
Referenced by dump_to_string(), is_bit(), and set_bit_status().
|
private |
Definition at line 130 of file DCPS_IR_Topic.h.
Referenced by get_participant_id(), and try_associate().
|
private |
Definition at line 135 of file DCPS_IR_Topic.h.
Referenced by add_publication_reference(), dump_to_string(), reassociate_all_publications(), reevaluate_associations(), release(), remove_publication_reference(), set_topic_qos(), and try_associate().
|
private |
Definition at line 128 of file DCPS_IR_Topic.h.
Referenced by get_topic_qos(), and set_topic_qos().
|
private |
True means release() is called upon delete_topic, but topic object is not deleted because there are still pub/sub associated.
Definition at line 142 of file DCPS_IR_Topic.h.
Referenced by release().
|
private |
Keep track the subscriptions of this topic so the TopicQos change can be published for those subscriptions.
Definition at line 138 of file DCPS_IR_Topic.h.
Referenced by add_subscription_reference(), dump_to_string(), release(), remove_subscription_reference(), and set_topic_qos().