DCPS_IR_Participant Class Reference

Representative of the Domain Participant. More...

#include <DCPS_IR_Participant.h>

Inheritance diagram for DCPS_IR_Participant:
Inheritance graph
[legend]
Collaboration diagram for DCPS_IR_Participant:
Collaboration graph
[legend]

List of all members.

Public Types

enum  { OWNER_NONE }
 

Special owner to enforce no callbacks.

More...

Public Member Functions

 DCPS_IR_Participant (const TAO_DDS_DCPSFederationId &federationId, OpenDDS::DCPS::RepoId id, DCPS_IR_Domain *domain, DDS::DomainParticipantQos qos, Update::Manager *um, bool isBit)
virtual ~DCPS_IR_Participant ()
void takeOwnership ()
 Take local ownership of this participant and publish an update.
void changeOwner (long sender, long owner)
 Process an incoming update that changes ownership.
long owner () const
 Value of the owner for this participant.
bool isOwner () const
 Indication of whether the current repository is the owner of this participant.
int add_publication (OpenDDS::DCPS::unique_ptr< DCPS_IR_Publication > pub)
int find_publication_reference (OpenDDS::DCPS::RepoId pubId, DCPS_IR_Publication *&pub)
 Return the publication object.
int remove_publication (OpenDDS::DCPS::RepoId pubId)
int add_subscription (OpenDDS::DCPS::unique_ptr< DCPS_IR_Subscription > sub)
int find_subscription_reference (OpenDDS::DCPS::RepoId subId, DCPS_IR_Subscription *&sub)
 Return the subscription object.
int remove_subscription (OpenDDS::DCPS::RepoId subId)
int add_topic_reference (DCPS_IR_Topic *topic)
int remove_topic_reference (OpenDDS::DCPS::RepoId topicId, DCPS_IR_Topic *&topic)
int find_topic_reference (OpenDDS::DCPS::RepoId topicId, DCPS_IR_Topic *&topic)
void remove_all_dependents (CORBA::Boolean notify_lost)
 Removes all topics, publications and.
void mark_dead ()
OpenDDS::DCPS::RepoId get_id ()
CORBA::Boolean is_alive ()
void set_alive (CORBA::Boolean alive)
void ignore_participant (OpenDDS::DCPS::RepoId id)
 Ignore the participant with the id.
void ignore_topic (OpenDDS::DCPS::RepoId id)
 Ignore the topic with the id.
void ignore_publication (OpenDDS::DCPS::RepoId id)
 Ignore the publication with the id.
void ignore_subscription (OpenDDS::DCPS::RepoId id)
 Ignore the subscription with the id.
const DDS::DomainParticipantQosget_qos ()
bool set_qos (const DDS::DomainParticipantQos &qos)
DDS::InstanceHandle_t get_handle ()
void set_handle (DDS::InstanceHandle_t handle)
DCPS_IR_Domainget_domain_reference () const
const DCPS_IR_Publication_Mappublications () const
 Expose a readable reference to the publication map.
const DCPS_IR_Subscription_Mapsubscriptions () const
 Expose a readable reference to the subscription map.
const DCPS_IR_Topic_Maptopics () const
 Expose a readable reference to the topic map.
std::string dump_to_string (const std::string &prefix, int depth) const

Private Attributes

OpenDDS::DCPS::RepoId id_
DCPS_IR_Domaindomain_
DDS::DomainParticipantQos qos_
CORBA::Boolean aliveStatus_
DDS::InstanceHandle_t handle_
const TAO_DDS_DCPSFederationIdfederationId_
long owner_
ACE_SYNCH_MUTEX ownerLock_
 Lock portions ownership processing.
Update::Managerum_
bool isBitPublisher_
 Flag indicating this participant publishes built-in topics.



OpenDDS::DCPS::RepoIdGenerator topicIdGenerator_
OpenDDS::DCPS::RepoIdGenerator publicationIdGenerator_
OpenDDS::DCPS::RepoIdGenerator subscriptionIdGenerator_
DCPS_IR_Subscription_Map subscriptions_
DCPS_IR_Publication_Map publications_
DCPS_IR_Topic_Map topicRefs_
TAO_DDS_RepoId_Set ignoredParticipants_
TAO_DDS_RepoId_Set ignoredTopics_
TAO_DDS_RepoId_Set ignoredPublications_
TAO_DDS_RepoId_Set ignoredSubscriptions_
bool & isBitPublisher ()
bool isBitPublisher () const
CORBA::Boolean is_participant_ignored (OpenDDS::DCPS::RepoId id)
CORBA::Boolean is_topic_ignored (OpenDDS::DCPS::RepoId id)
CORBA::Boolean is_publication_ignored (OpenDDS::DCPS::RepoId id)
CORBA::Boolean is_subscription_ignored (OpenDDS::DCPS::RepoId id)
OpenDDS::DCPS::RepoId get_next_topic_id (bool builtin)
OpenDDS::DCPS::RepoId get_next_publication_id (bool builtin)
OpenDDS::DCPS::RepoId get_next_subscription_id (bool builtin)
void last_topic_key (long key)
void last_publication_key (long key)
void last_subscription_key (long key)

Detailed Description

Representative of the Domain Participant.

Definition at line 62 of file DCPS_IR_Participant.h.


Member Enumeration Documentation

anonymous enum

Special owner to enforce no callbacks.

Enumerator:
OWNER_NONE 

Definition at line 67 of file DCPS_IR_Participant.h.

00067 { OWNER_NONE};


Constructor & Destructor Documentation

DCPS_IR_Participant h OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL DCPS_IR_Participant::DCPS_IR_Participant ( const TAO_DDS_DCPSFederationId federationId,
OpenDDS::DCPS::RepoId  id,
DCPS_IR_Domain domain,
DDS::DomainParticipantQos  qos,
Update::Manager um,
bool  isBit 
)

Definition at line 26 of file DCPS_IR_Participant.cpp.

00032   : id_(id),
00033     domain_(domain),
00034     qos_(qos),
00035     aliveStatus_(1),
00036     handle_(0),
00037     federationId_(federationId),
00038     owner_(federationId.overridden() ? OWNER_NONE : federationId.id()),
00039     topicIdGenerator_(
00040       federationId.id(),
00041       OpenDDS::DCPS::RepoIdConverter(id).participantId(),
00042       isBit ? OpenDDS::DCPS::KIND_BUILTIN_TOPIC : OpenDDS::DCPS::KIND_TOPIC),
00043     publicationIdGenerator_(
00044       federationId.id(),
00045       OpenDDS::DCPS::RepoIdConverter(id).participantId(),
00046       isBit ? OpenDDS::DCPS::KIND_BUILTIN_WRITER : OpenDDS::DCPS::KIND_WRITER),
00047     subscriptionIdGenerator_(
00048       federationId.id(),
00049       OpenDDS::DCPS::RepoIdConverter(id).participantId(),
00050       isBit ? OpenDDS::DCPS::KIND_BUILTIN_READER : OpenDDS::DCPS::KIND_READER),
00051     um_(um),
00052     isBitPublisher_(isBit)
00053 {
00054 }

DCPS_IR_Participant::~DCPS_IR_Participant (  )  [virtual]

Definition at line 56 of file DCPS_IR_Participant.cpp.

00057 {
00058 }


Member Function Documentation

int DCPS_IR_Participant::add_publication ( OpenDDS::DCPS::unique_ptr< DCPS_IR_Publication pub  ) 

Add a publication This takes ownership of the memory pointed to by pub Returns 0 if added, 1 if already exists, -1 other failure

Definition at line 150 of file DCPS_IR_Participant.cpp.

References ACE_TEXT(), OpenDDS::DCPS::DCPS_debug_level, OpenDDS::DCPS::unique_ptr< T, Deleter >::get(), id_, isBitPublisher_, LM_DEBUG, LM_NOTICE, OpenDDS::DCPS::move(), publications_, and DCPS_IR_Publication::set_bit_status().

Referenced by TAO_DDS_DCPSInfo_i::add_publication().

00151 {
00152   OpenDDS::DCPS::RepoId pubId = pub->get_id();
00153   DCPS_IR_Publication_Map::iterator where = this->publications_.find(pubId);
00154 
00155   if (where == this->publications_.end()) {
00156     DCPS_IR_Publication* pubptr = pub.get();
00157     this->publications_.insert(
00158       where, DCPS_IR_Publication_Map::value_type(pubId, OpenDDS::DCPS::move(pub)));
00159 
00160     if (isBitPublisher_) {
00161       pubptr->set_bit_status(isBitPublisher_);
00162     }
00163 
00164     if (OpenDDS::DCPS::DCPS_debug_level > 0) {
00165       OpenDDS::DCPS::RepoIdConverter part_converter(id_);
00166       OpenDDS::DCPS::RepoIdConverter pub_converter(pubId);
00167       ACE_DEBUG((LM_DEBUG,
00168                  ACE_TEXT("(%P|%t) DCPS_IR_Participant::add_publication: ")
00169                  ACE_TEXT("participant %C successfully added publication %C at 0x%x.\n"),
00170                  std::string(part_converter).c_str(),
00171                  std::string(pub_converter).c_str(),
00172                  pubptr));
00173     }
00174 
00175     return 0;
00176 
00177   } else {
00178     if (OpenDDS::DCPS::DCPS_debug_level > 0) {
00179       OpenDDS::DCPS::RepoIdConverter part_converter(id_);
00180       OpenDDS::DCPS::RepoIdConverter pub_converter(pubId);
00181       ACE_ERROR((LM_NOTICE,
00182                  ACE_TEXT("(%P|%t) NOTICE: DCPS_IR_Participant::add_publication: ")
00183                  ACE_TEXT("participant %C attempted to add existing publication %C.\n"),
00184                  std::string(part_converter).c_str(),
00185                  std::string(pub_converter).c_str()));
00186     }
00187 
00188     return 1;
00189   }
00190 }

Here is the call graph for this function:

Here is the caller graph for this function:

int DCPS_IR_Participant::add_subscription ( OpenDDS::DCPS::unique_ptr< DCPS_IR_Subscription sub  ) 

Add a subscription This takes ownership of the memory pointed to by aub Returns 0 if added, 1 if already exists, -1 other failure

Definition at line 276 of file DCPS_IR_Participant.cpp.

References ACE_TEXT(), OpenDDS::DCPS::DCPS_debug_level, OpenDDS::DCPS::unique_ptr< T, Deleter >::get(), id_, isBitPublisher_, LM_DEBUG, LM_NOTICE, OpenDDS::DCPS::move(), DCPS_IR_Subscription::set_bit_status(), and subscriptions_.

Referenced by TAO_DDS_DCPSInfo_i::add_subscription().

00277 {
00278   OpenDDS::DCPS::RepoId subId = sub->get_id();
00279   DCPS_IR_Subscription_Map::iterator where = this->subscriptions_.find(subId);
00280 
00281   if (where == this->subscriptions_.end()) {
00282 
00283     DCPS_IR_Subscription* subptr = sub.get();
00284     this->subscriptions_.insert(
00285       where, DCPS_IR_Subscription_Map::value_type(subId, OpenDDS::DCPS::move(sub)));
00286 
00287     if (isBitPublisher_) {
00288       subptr->set_bit_status(isBitPublisher_);
00289     }
00290 
00291     if (OpenDDS::DCPS::DCPS_debug_level > 0) {
00292       OpenDDS::DCPS::RepoIdConverter part_converter(id_);
00293       OpenDDS::DCPS::RepoIdConverter sub_converter(subId);
00294       ACE_DEBUG((LM_DEBUG,
00295                  ACE_TEXT("(%P|%t) DCPS_IR_Participant::add_subscription: ")
00296                  ACE_TEXT("participant %C successfully added subscription %C at 0x%x.\n"),
00297                  std::string(part_converter).c_str(),
00298                  std::string(sub_converter).c_str(),
00299                  subptr));
00300     }
00301 
00302     return 0;
00303 
00304   } else {
00305     if (OpenDDS::DCPS::DCPS_debug_level > 0) {
00306       OpenDDS::DCPS::RepoIdConverter part_converter(id_);
00307       OpenDDS::DCPS::RepoIdConverter sub_converter(subId);
00308       ACE_ERROR((LM_NOTICE,
00309                  ACE_TEXT("(%P|%t) NOTICE: DCPS_IR_Participant::add_subscription: ")
00310                  ACE_TEXT("participant %C attempted to add existing subscription %C.\n"),
00311                  std::string(part_converter).c_str(),
00312                  std::string(sub_converter).c_str()));
00313     }
00314 
00315     return 1;
00316   }
00317 }

Here is the call graph for this function:

Here is the caller graph for this function:

int DCPS_IR_Participant::add_topic_reference ( DCPS_IR_Topic topic  ) 

Add a topic Returns 0 if added, 1 if already exists, -1 other failure

Definition at line 403 of file DCPS_IR_Participant.cpp.

References ACE_TEXT(), OpenDDS::DCPS::DCPS_debug_level, DCPS_IR_Topic::get_id(), id_, isBitPublisher_, LM_DEBUG, LM_NOTICE, DCPS_IR_Topic::set_bit_status(), and topicRefs_.

Referenced by DCPS_IR_Domain::add_topic_i().

00404 {
00405   OpenDDS::DCPS::RepoId topicId = topic->get_id();
00406   DCPS_IR_Topic_Map::iterator where = this->topicRefs_.find(topicId);
00407 
00408   if (where == this->topicRefs_.end()) {
00409     this->topicRefs_.insert(
00410       where, DCPS_IR_Topic_Map::value_type(topicId, topic));
00411 
00412     if (isBitPublisher_) {
00413       topic->set_bit_status(isBitPublisher_);
00414     }
00415 
00416     if (OpenDDS::DCPS::DCPS_debug_level > 0) {
00417       OpenDDS::DCPS::RepoIdConverter part_converter(id_);
00418       OpenDDS::DCPS::RepoIdConverter topic_converter(topicId);
00419       ACE_DEBUG((LM_DEBUG,
00420                  ACE_TEXT("(%P|%t) DCPS_IR_Participant::add_topic_reference: ")
00421                  ACE_TEXT("participant %C successfully added topic %C at 0x%x.\n"),
00422                  std::string(part_converter).c_str(),
00423                  std::string(topic_converter).c_str(),
00424                  topic));
00425     }
00426 
00427     return 0;
00428 
00429   } else {
00430     if (OpenDDS::DCPS::DCPS_debug_level > 0) {
00431       OpenDDS::DCPS::RepoIdConverter part_converter(id_);
00432       OpenDDS::DCPS::RepoIdConverter topic_converter(topicId);
00433       ACE_DEBUG((LM_NOTICE,
00434                  ACE_TEXT("(%P|%t) NOTICE: DCPS_IR_Participant::add_topic_reference: ")
00435                  ACE_TEXT("participant %C attempted to add existing topic %C.\n"),
00436                  std::string(part_converter).c_str(),
00437                  std::string(topic_converter).c_str()));
00438     }
00439 
00440     return 1;
00441   }
00442 }

Here is the call graph for this function:

Here is the caller graph for this function:

void DCPS_IR_Participant::changeOwner ( long  sender,
long  owner 
)

Process an incoming update that changes ownership.

: Ensure that any stalled callbacks are made.

Definition at line 104 of file DCPS_IR_Participant.cpp.

References isOwner(), owner_, OWNER_NONE, and ownerLock_.

Referenced by TAO_DDS_DCPSInfo_i::changeOwnership(), and takeOwnership().

00105 {
00106   {
00107     ACE_GUARD(ACE_SYNCH_MUTEX, guard, this->ownerLock_);
00108 
00109     if ((owner == OWNER_NONE)
00110         && (this->isOwner() || (this->owner_ != sender))) {
00111       // Do not eliminate ownership if we are the owner or if the update
00112       // does not come from the current owner.
00113       return;
00114     }
00115 
00116     // Finally.  Change the value.
00117     this->owner_ = owner;
00118 
00119   } // End of lock scope.
00120 
00121   if (this->isOwner()) {
00122     /// @TODO: Ensure that any stalled callbacks are made.
00123   }
00124 }

Here is the call graph for this function:

Here is the caller graph for this function:

std::string DCPS_IR_Participant::dump_to_string ( const std::string &  prefix,
int  depth 
) const

Definition at line 880 of file DCPS_IR_Participant.cpp.

References aliveStatus_, ACE_Unbounded_Set_Ex< T, C >::begin(), ACE_Unbounded_Set_Ex< T, C >::end(), federationId_, TAO_DDS_DCPSFederationId::id(), id_, ignoredParticipants_, ignoredPublications_, ignoredSubscriptions_, ignoredTopics_, isBitPublisher_, TAO_DDS_DCPSFederationId::overridden(), owner_, publications_, str, subscriptions_, and topicRefs_.

00881 {
00882   std::string str;
00883 #if !defined (OPENDDS_INFOREPO_REDUCED_FOOTPRINT)
00884   OpenDDS::DCPS::RepoIdConverter local_converter(id_);
00885 
00886   for (int i=0; i < depth; i++)
00887     str += prefix;
00888   std::string indent = str + prefix;
00889   str += "DCPS_IR_Participant[";
00890   str += std::string(local_converter);
00891   str += "]";
00892   if (isBitPublisher_)
00893     str += " (BIT)";
00894   std::ostringstream os;
00895   os << "federation id[" << federationId_.id();
00896   if (federationId_.overridden())
00897     os << "(federated)";
00898 
00899   os << "]  owner[" << owner_ << "]";
00900   str += os.str();
00901   str += aliveStatus_ ? " (alive)" : " (not alive)";
00902   str += "\n";
00903 
00904   str += indent + "Topics:\n";
00905   for (DCPS_IR_Topic_Map::const_iterator tm = topicRefs_.begin();
00906        tm != topicRefs_.end();
00907        tm++)
00908   {
00909     str += tm->second->dump_to_string(prefix, depth+1);
00910   }
00911 
00912   str += indent + "Publications:\n";
00913   for (DCPS_IR_Publication_Map::const_iterator pm = publications_.begin();
00914        pm != publications_.end();
00915        pm++)
00916   {
00917     str += pm->second->dump_to_string(prefix, depth+1);
00918   }
00919 
00920   str += indent + "Subscriptions:\n";
00921   for (DCPS_IR_Subscription_Map::const_iterator sm = subscriptions_.begin();
00922        sm != subscriptions_.end();
00923        sm++)
00924   {
00925     str += sm->second->dump_to_string(prefix, depth+1);
00926   }
00927 
00928   str += indent + "ignored Participants [ ";
00929   for (TAO_DDS_RepoId_Set::const_iterator ipart = ignoredParticipants_.begin();
00930        ipart != ignoredParticipants_.end();
00931        ipart++)
00932   {
00933     OpenDDS::DCPS::RepoIdConverter ipart_converter(*ipart);
00934     str += std::string(ipart_converter);
00935     str += " ";
00936   }
00937   str += "]\n";
00938   str += indent + "ignored Topics [ ";
00939 
00940   for (TAO_DDS_RepoId_Set::const_iterator itop = ignoredTopics_.begin();
00941        itop != ignoredTopics_.end();
00942        itop++)
00943   {
00944     OpenDDS::DCPS::RepoIdConverter itop_converter(*itop);
00945     str += std::string(itop_converter);
00946     str += " ";
00947   }
00948   str += "]\n";
00949   str += indent + "ignored Publications [ ";
00950 
00951   for (TAO_DDS_RepoId_Set::const_iterator ipub = ignoredPublications_.begin();
00952        ipub != ignoredPublications_.end();
00953        ipub++)
00954   {
00955     OpenDDS::DCPS::RepoIdConverter ipub_converter(*ipub);
00956     str += std::string(ipub_converter);
00957     str += " ";
00958   }
00959   str += "]\n";
00960   str += indent + "ignored Subscriptions [ ";
00961 
00962   for (TAO_DDS_RepoId_Set::const_iterator isub = ignoredSubscriptions_.begin();
00963        isub != ignoredSubscriptions_.end();
00964        isub++)
00965   {
00966     OpenDDS::DCPS::RepoIdConverter isub_converter(*isub);
00967     str += std::string(isub_converter);
00968     str += " ";
00969   }
00970   str += "]\n";
00971 
00972 #endif // !defined (OPENDDS_INFOREPO_REDUCED_FOOTPRINT)
00973   return str;
00974 }

Here is the call graph for this function:

int DCPS_IR_Participant::find_publication_reference ( OpenDDS::DCPS::RepoId  pubId,
DCPS_IR_Publication *&  pub 
)

Return the publication object.

Definition at line 192 of file DCPS_IR_Participant.cpp.

References ACE_TEXT(), OpenDDS::DCPS::DCPS_debug_level, id_, LM_DEBUG, and publications_.

Referenced by TAO_DDS_DCPSInfo_i::association_complete(), TAO_DDS_DCPSInfo_i::disassociate_publication(), and TAO_DDS_DCPSInfo_i::update_publication_qos().

00194 {
00195   DCPS_IR_Publication_Map::iterator where = this->publications_.find(pubId);
00196 
00197   if (where != this->publications_.end()) {
00198     pub = where->second.get();
00199 
00200     if (OpenDDS::DCPS::DCPS_debug_level > 0) {
00201       OpenDDS::DCPS::RepoIdConverter part_converter(id_);
00202       OpenDDS::DCPS::RepoIdConverter pub_converter(pubId);
00203       ACE_DEBUG((LM_DEBUG,
00204                  ACE_TEXT("(%P|%t) DCPS_IR_Participant::find_publication_reference: ")
00205                  ACE_TEXT("participant %C found publication %C at 0x%x.\n"),
00206                  std::string(part_converter).c_str(),
00207                  std::string(pub_converter).c_str(),
00208                  pub));
00209     }
00210 
00211     return 0;
00212 
00213   } else {
00214     if (OpenDDS::DCPS::DCPS_debug_level > 0) {
00215       OpenDDS::DCPS::RepoIdConverter part_converter(id_);
00216       OpenDDS::DCPS::RepoIdConverter pub_converter(pubId);
00217       ACE_DEBUG((LM_DEBUG,
00218                  ACE_TEXT("(%P|%t) DCPS_IR_Participant::find_publication_reference: ")
00219                  ACE_TEXT("participant %C could not find publication %C.\n"),
00220                  std::string(part_converter).c_str(),
00221                  std::string(pub_converter).c_str()));
00222     }
00223     pub = 0;
00224     return -1;
00225   }
00226 }

Here is the call graph for this function:

Here is the caller graph for this function:

int DCPS_IR_Participant::find_subscription_reference ( OpenDDS::DCPS::RepoId  subId,
DCPS_IR_Subscription *&  sub 
)

Return the subscription object.

Definition at line 319 of file DCPS_IR_Participant.cpp.

References ACE_TEXT(), OpenDDS::DCPS::DCPS_debug_level, id_, LM_DEBUG, and subscriptions_.

Referenced by TAO_DDS_DCPSInfo_i::association_complete(), TAO_DDS_DCPSInfo_i::disassociate_subscription(), TAO_DDS_DCPSInfo_i::update_subscription_params(), and TAO_DDS_DCPSInfo_i::update_subscription_qos().

00321 {
00322   DCPS_IR_Subscription_Map::iterator where = this->subscriptions_.find(subId);
00323 
00324   if (where != this->subscriptions_.end()) {
00325     sub = where->second.get();
00326 
00327     if (OpenDDS::DCPS::DCPS_debug_level > 0) {
00328       OpenDDS::DCPS::RepoIdConverter part_converter(id_);
00329       OpenDDS::DCPS::RepoIdConverter sub_converter(subId);
00330       ACE_DEBUG((LM_DEBUG,
00331                  ACE_TEXT("(%P|%t) DCPS_IR_Participant::find_subscription_reference: ")
00332                  ACE_TEXT("participant %C found subscription %C at 0x%x.\n"),
00333                  std::string(part_converter).c_str(),
00334                  std::string(sub_converter).c_str(),
00335                  sub));
00336     }
00337 
00338     return 0;
00339 
00340   } else {
00341     if (OpenDDS::DCPS::DCPS_debug_level > 0) {
00342       OpenDDS::DCPS::RepoIdConverter part_converter(id_);
00343       OpenDDS::DCPS::RepoIdConverter sub_converter(subId);
00344       ACE_DEBUG((LM_DEBUG,
00345                  ACE_TEXT("(%P|%t) DCPS_IR_Participant::find_subscription_reference: ")
00346                  ACE_TEXT("participant %C could not find subscription %C.\n"),
00347                  std::string(part_converter).c_str(),
00348                  std::string(sub_converter).c_str()));
00349     }
00350     sub = 0;
00351     return -1;
00352   }
00353 }

Here is the call graph for this function:

Here is the caller graph for this function:

int DCPS_IR_Participant::find_topic_reference ( OpenDDS::DCPS::RepoId  topicId,
DCPS_IR_Topic *&  topic 
)

Find topic reference with id Does NOT give ownership of memory Returns 0 if successful

Definition at line 481 of file DCPS_IR_Participant.cpp.

References ACE_TEXT(), OpenDDS::DCPS::DCPS_debug_level, id_, LM_DEBUG, LM_ERROR, and topicRefs_.

Referenced by TAO_DDS_DCPSInfo_i::remove_topic(), and TAO_DDS_DCPSInfo_i::update_topic_qos().

00483 {
00484   DCPS_IR_Topic_Map::iterator where = this->topicRefs_.find(topicId);
00485 
00486   if (where != this->topicRefs_.end()) {
00487     topic = where->second;
00488 
00489     if (OpenDDS::DCPS::DCPS_debug_level > 0) {
00490       OpenDDS::DCPS::RepoIdConverter part_converter(id_);
00491       OpenDDS::DCPS::RepoIdConverter topic_converter(topicId);
00492       ACE_DEBUG((LM_DEBUG,
00493                  ACE_TEXT("(%P|%t) DCPS_IR_Participant::find_topic_reference: ")
00494                  ACE_TEXT("participant %C found topic %C at %x.\n"),
00495                  std::string(part_converter).c_str(),
00496                  std::string(topic_converter).c_str(),
00497                  topic));
00498     }
00499 
00500     return 0;
00501 
00502   } else {
00503     OpenDDS::DCPS::RepoIdConverter part_converter(id_);
00504     OpenDDS::DCPS::RepoIdConverter topic_converter(topicId);
00505     ACE_ERROR((LM_ERROR,
00506                ACE_TEXT("(%P|%t) ERROR: DCPS_IR_Participant::find_topic_reference: ")
00507                ACE_TEXT("participant %C unable to find topic %C.\n"),
00508                std::string(part_converter).c_str(),
00509                std::string(topic_converter).c_str()));
00510     topic = 0;
00511     return -1;
00512   }
00513 }

Here is the call graph for this function:

Here is the caller graph for this function:

DCPS_IR_Domain * DCPS_IR_Participant::get_domain_reference (  )  const

Definition at line 838 of file DCPS_IR_Participant.cpp.

References domain_.

Referenced by DCPS_IR_Subscription::set_qos(), and DCPS_IR_Publication::set_qos().

00839 {
00840   return domain_;
00841 }

Here is the caller graph for this function:

DDS::InstanceHandle_t DCPS_IR_Participant::get_handle ( void   ) 

Definition at line 809 of file DCPS_IR_Participant.cpp.

References handle_.

Referenced by DCPS_IR_Domain::dispose_participant_bit().

00810 {
00811   return handle_;
00812 }

Here is the caller graph for this function:

OpenDDS::DCPS::RepoId DCPS_IR_Participant::get_id ( void   ) 
OpenDDS::DCPS::RepoId DCPS_IR_Participant::get_next_publication_id ( bool  builtin  ) 

Entity GUID Id generators.

Definition at line 850 of file DCPS_IR_Participant.cpp.

References OpenDDS::DCPS::RepoIdGenerator::next(), and publicationIdGenerator_.

Referenced by TAO_DDS_DCPSInfo_i::add_publication().

00851 {
00852   return this->publicationIdGenerator_.next(builtin);
00853 }

Here is the call graph for this function:

Here is the caller graph for this function:

OpenDDS::DCPS::RepoId DCPS_IR_Participant::get_next_subscription_id ( bool  builtin  ) 

Entity GUID Id generators.

Definition at line 856 of file DCPS_IR_Participant.cpp.

References OpenDDS::DCPS::RepoIdGenerator::next(), and subscriptionIdGenerator_.

Referenced by TAO_DDS_DCPSInfo_i::add_subscription().

00857 {
00858   return this->subscriptionIdGenerator_.next(builtin);
00859 }

Here is the call graph for this function:

Here is the caller graph for this function:

OpenDDS::DCPS::RepoId DCPS_IR_Participant::get_next_topic_id ( bool  builtin  ) 

Next Entity Id value in sequence.

Definition at line 844 of file DCPS_IR_Participant.cpp.

References OpenDDS::DCPS::RepoIdGenerator::next(), and topicIdGenerator_.

Referenced by DCPS_IR_Domain::add_topic().

00845 {
00846   return this->topicIdGenerator_.next(builtin);
00847 }

Here is the call graph for this function:

Here is the caller graph for this function:

const DDS::DomainParticipantQos * DCPS_IR_Participant::get_qos ( void   ) 

Return pointer to the participant qos Participant retains ownership

Definition at line 819 of file DCPS_IR_Participant.cpp.

References qos_.

Referenced by DCPS_IR_Domain::publish_participant_bit().

00820 {
00821   return &qos_;
00822 }

Here is the caller graph for this function:

void DCPS_IR_Participant::ignore_participant ( OpenDDS::DCPS::RepoId  id  ) 

Ignore the participant with the id.

Definition at line 687 of file DCPS_IR_Participant.cpp.

References ACE_TEXT(), OpenDDS::DCPS::DCPS_debug_level, id_, ignoredParticipants_, ACE_Unbounded_Set_Ex< T, C >::insert(), LM_DEBUG, publications_, and subscriptions_.

Referenced by TAO_DDS_DCPSInfo_i::ignore_domain_participant().

00688 {
00689   if (OpenDDS::DCPS::DCPS_debug_level > 0) {
00690     OpenDDS::DCPS::RepoIdConverter part_converter(id_);
00691     OpenDDS::DCPS::RepoIdConverter ignore_converter(id);
00692     ACE_DEBUG((LM_DEBUG,
00693                ACE_TEXT("(%P|%t) DCPS_IR_Participant::ignore_participant: ")
00694                ACE_TEXT("participant %C now ignoring participant %C.\n"),
00695                std::string(part_converter).c_str(),
00696                std::string(ignore_converter).c_str()));
00697   }
00698 
00699   ignoredParticipants_.insert(id);
00700 
00701   // disassociate any publications
00702   for (DCPS_IR_Publication_Map::const_iterator current = this->publications_.begin();
00703        current != this->publications_.end();
00704        ++current) {
00705     current->second->disassociate_participant(id);
00706   }
00707 
00708   // disassociate any subscriptions
00709   for (DCPS_IR_Subscription_Map::const_iterator current = this->subscriptions_.begin();
00710        current != this->subscriptions_.end();
00711        ++current) {
00712     current->second->disassociate_participant(id);
00713   }
00714 }

Here is the call graph for this function:

Here is the caller graph for this function:

void DCPS_IR_Participant::ignore_publication ( OpenDDS::DCPS::RepoId  id  ) 

Ignore the publication with the id.

Definition at line 745 of file DCPS_IR_Participant.cpp.

References ACE_TEXT(), OpenDDS::DCPS::DCPS_debug_level, id_, ignoredPublications_, ACE_Unbounded_Set_Ex< T, C >::insert(), LM_DEBUG, and subscriptions_.

Referenced by TAO_DDS_DCPSInfo_i::ignore_publication().

00746 {
00747   if (OpenDDS::DCPS::DCPS_debug_level > 0) {
00748     OpenDDS::DCPS::RepoIdConverter part_converter(id_);
00749     OpenDDS::DCPS::RepoIdConverter ignore_converter(id);
00750     ACE_DEBUG((LM_DEBUG,
00751                ACE_TEXT("(%P|%t) DCPS_IR_Participant::ignore_publication: ")
00752                ACE_TEXT("participant %C now ignoring publication %C.\n"),
00753                std::string(part_converter).c_str(),
00754                std::string(ignore_converter).c_str()));
00755   }
00756 
00757   ignoredPublications_.insert(id);
00758 
00759   // disassociate any subscriptions
00760   for (DCPS_IR_Subscription_Map::const_iterator current = this->subscriptions_.begin();
00761        current != this->subscriptions_.end();
00762        ++current) {
00763     current->second->disassociate_publication(id);
00764   }
00765 }

Here is the call graph for this function:

Here is the caller graph for this function:

void DCPS_IR_Participant::ignore_subscription ( OpenDDS::DCPS::RepoId  id  ) 

Ignore the subscription with the id.

Definition at line 767 of file DCPS_IR_Participant.cpp.

References ACE_TEXT(), OpenDDS::DCPS::DCPS_debug_level, id_, ignoredSubscriptions_, ACE_Unbounded_Set_Ex< T, C >::insert(), LM_DEBUG, and publications_.

Referenced by TAO_DDS_DCPSInfo_i::ignore_subscription().

00768 {
00769   if (OpenDDS::DCPS::DCPS_debug_level > 0) {
00770     OpenDDS::DCPS::RepoIdConverter part_converter(id_);
00771     OpenDDS::DCPS::RepoIdConverter ignore_converter(id);
00772     ACE_DEBUG((LM_DEBUG,
00773                ACE_TEXT("(%P|%t) DCPS_IR_Participant::ignore_subscription: ")
00774                ACE_TEXT("participant %C now ignoring subscription %C.\n"),
00775                std::string(part_converter).c_str(),
00776                std::string(ignore_converter).c_str()));
00777   }
00778 
00779   ignoredSubscriptions_.insert(id);
00780 
00781   // disassociate any publications
00782   for (DCPS_IR_Publication_Map::const_iterator current = this->publications_.begin();
00783        current != this->publications_.end();
00784        ++current) {
00785     current->second->disassociate_subscription(id);
00786   }
00787 }

Here is the call graph for this function:

Here is the caller graph for this function:

void DCPS_IR_Participant::ignore_topic ( OpenDDS::DCPS::RepoId  id  ) 

Ignore the topic with the id.

Definition at line 716 of file DCPS_IR_Participant.cpp.

References ACE_TEXT(), OpenDDS::DCPS::DCPS_debug_level, id_, ignoredTopics_, ACE_Unbounded_Set_Ex< T, C >::insert(), LM_DEBUG, publications_, and subscriptions_.

Referenced by TAO_DDS_DCPSInfo_i::ignore_topic().

00717 {
00718   if (OpenDDS::DCPS::DCPS_debug_level > 0) {
00719     OpenDDS::DCPS::RepoIdConverter part_converter(id_);
00720     OpenDDS::DCPS::RepoIdConverter ignore_converter(id);
00721     ACE_DEBUG((LM_DEBUG,
00722                ACE_TEXT("(%P|%t) DCPS_IR_Participant::ignore_topic: ")
00723                ACE_TEXT("participant %C now ignoring topic %C.\n"),
00724                std::string(part_converter).c_str(),
00725                std::string(ignore_converter).c_str()));
00726   }
00727 
00728   ignoredTopics_.insert(id);
00729 
00730   // disassociate any publications
00731   for (DCPS_IR_Publication_Map::const_iterator current = this->publications_.begin();
00732        current != this->publications_.end();
00733        ++current) {
00734     current->second->disassociate_topic(id);
00735   }
00736 
00737   // disassociate any subscriptions
00738   for (DCPS_IR_Subscription_Map::const_iterator current = this->subscriptions_.begin();
00739        current != this->subscriptions_.end();
00740        ++current) {
00741     current->second->disassociate_topic(id);
00742   }
00743 }

Here is the call graph for this function:

Here is the caller graph for this function:

CORBA::Boolean DCPS_IR_Participant::is_alive ( void   ) 
CORBA::Boolean DCPS_IR_Participant::is_participant_ignored ( OpenDDS::DCPS::RepoId  id  ) 

Test if an entity is ignored by this participant.

Definition at line 789 of file DCPS_IR_Participant.cpp.

References ACE_Unbounded_Set_Ex< T, C >::find(), and ignoredParticipants_.

Referenced by DCPS_IR_Subscription::is_publication_ignored(), DCPS_IR_Publication::is_subscription_ignored(), and DCPS_IR_Topic::try_associate().

00790 {
00791   return (0 == ignoredParticipants_.find(id));
00792 }

Here is the call graph for this function:

Here is the caller graph for this function:

CORBA::Boolean DCPS_IR_Participant::is_publication_ignored ( OpenDDS::DCPS::RepoId  id  ) 

Entity GUID Id generators.

Definition at line 799 of file DCPS_IR_Participant.cpp.

References ACE_Unbounded_Set_Ex< T, C >::find(), and ignoredPublications_.

Referenced by DCPS_IR_Subscription::is_publication_ignored().

00800 {
00801   return (0 == ignoredPublications_.find(id));
00802 }

Here is the call graph for this function:

Here is the caller graph for this function:

CORBA::Boolean DCPS_IR_Participant::is_subscription_ignored ( OpenDDS::DCPS::RepoId  id  ) 

Entity GUID Id generators.

Definition at line 804 of file DCPS_IR_Participant.cpp.

References ACE_Unbounded_Set_Ex< T, C >::find(), and ignoredSubscriptions_.

Referenced by DCPS_IR_Publication::is_subscription_ignored(), and DCPS_IR_Topic::try_associate().

00805 {
00806   return (0 == ignoredSubscriptions_.find(id));
00807 }

Here is the call graph for this function:

Here is the caller graph for this function:

CORBA::Boolean DCPS_IR_Participant::is_topic_ignored ( OpenDDS::DCPS::RepoId  id  ) 

Entity GUID Id generators.

Definition at line 794 of file DCPS_IR_Participant.cpp.

References ACE_Unbounded_Set_Ex< T, C >::find(), and ignoredTopics_.

Referenced by DCPS_IR_Subscription::is_publication_ignored(), DCPS_IR_Publication::is_subscription_ignored(), and DCPS_IR_Topic::try_associate().

00795 {
00796   return (0 == ignoredTopics_.find(id));
00797 }

Here is the call graph for this function:

Here is the caller graph for this function:

bool DCPS_IR_Participant::isBitPublisher (  )  const

Entity GUID Id generators.

Definition at line 145 of file DCPS_IR_Participant.cpp.

References isBitPublisher_.

00146 {
00147   return this->isBitPublisher_;
00148 }

bool & DCPS_IR_Participant::isBitPublisher (  ) 
bool DCPS_IR_Participant::isOwner (  )  const
void DCPS_IR_Participant::last_publication_key ( long  key  ) 

Entity GUID Id generators.

Definition at line 868 of file DCPS_IR_Participant.cpp.

References OpenDDS::DCPS::RepoIdGenerator::last(), and publicationIdGenerator_.

Referenced by TAO_DDS_DCPSInfo_i::add_publication().

00869 {
00870   return this->publicationIdGenerator_.last(key);
00871 }

Here is the call graph for this function:

Here is the caller graph for this function:

void DCPS_IR_Participant::last_subscription_key ( long  key  ) 

Entity GUID Id generators.

Definition at line 874 of file DCPS_IR_Participant.cpp.

References OpenDDS::DCPS::RepoIdGenerator::last(), and subscriptionIdGenerator_.

Referenced by TAO_DDS_DCPSInfo_i::add_subscription().

00875 {
00876   return this->subscriptionIdGenerator_.last(key);
00877 }

Here is the call graph for this function:

Here is the caller graph for this function:

void DCPS_IR_Participant::last_topic_key ( long  key  ) 

Ensure no conflicts with sequence values from persistent storage.

Definition at line 862 of file DCPS_IR_Participant.cpp.

References OpenDDS::DCPS::RepoIdGenerator::last(), and topicIdGenerator_.

Referenced by TAO_DDS_DCPSInfo_i::add_topic().

00863 {
00864   return this->topicIdGenerator_.last(key);
00865 }

Here is the call graph for this function:

Here is the caller graph for this function:

void DCPS_IR_Participant::mark_dead (  ) 
long DCPS_IR_Participant::owner ( void   )  const

Value of the owner for this participant.

Definition at line 127 of file DCPS_IR_Participant.cpp.

References owner_.

00128 {
00129   return this->owner_;
00130 }

const DCPS_IR_Publication_Map & DCPS_IR_Participant::publications ( void   )  const

Expose a readable reference to the publication map.

Definition at line 61 of file DCPS_IR_Participant.cpp.

References publications_.

Referenced by TAO_DDS_DCPSInfo_i::disassociate_participant(), and TAO_DDS_DCPSInfo_i::remove_by_owner().

00062 {
00063   return this->publications_;
00064 }

Here is the caller graph for this function:

void DCPS_IR_Participant::remove_all_dependents ( CORBA::Boolean  notify_lost  ) 

Removes all topics, publications and.

Definition at line 515 of file DCPS_IR_Participant.cpp.

References ACE_TEXT(), Update::Actor, Update::DataReader, Update::DataWriter, OpenDDS::DCPS::DCPS_debug_level, Update::Manager::destroy(), domain_, get_id(), DCPS_IR_Domain::get_id(), id_, isBitPublisher(), LM_DEBUG, publications_, DCPS_IR_Topic::release(), DCPS_IR_Topic::remove_publication_reference(), DCPS_IR_Topic::remove_subscription_reference(), DCPS_IR_Domain::remove_topic(), subscriptions_, Update::Topic, topicRefs_, and um_.

00516 {
00517   // remove all the publications associations
00518   {
00519     DCPS_IR_Publication_Map::const_iterator next = this->publications_.begin();
00520 
00521     while (next != this->publications_.end()) {
00522       DCPS_IR_Publication_Map::const_iterator current = next;
00523       ++ next;
00524       DCPS_IR_Topic* topic = current->second->get_topic();
00525       topic->remove_publication_reference(current->second.get());
00526 
00527       if (0 != current->second->remove_associations(notify_lost)) {
00528         return;
00529       }
00530 
00531       topic->release(false);
00532     }
00533   }
00534 
00535   {
00536     DCPS_IR_Subscription_Map::const_iterator next = this->subscriptions_.begin();
00537 
00538     while (next != this->subscriptions_.end()) {
00539       DCPS_IR_Subscription_Map::const_iterator current = next;
00540       ++ next;
00541       DCPS_IR_Topic* topic = current->second->get_topic();
00542       topic->remove_subscription_reference(current->second.get());
00543 
00544       if (0 != current->second->remove_associations(notify_lost)) {
00545         return;
00546       }
00547 
00548       topic->release(false);
00549     }
00550   }
00551 
00552   {
00553     DCPS_IR_Topic_Map::const_iterator next = this->topicRefs_.begin();
00554 
00555     while (next != this->topicRefs_.end()) {
00556       DCPS_IR_Topic_Map::const_iterator current = next;
00557       ++ next;
00558 
00559       // Notify the federation to remove the topic.
00560       if (this->um_ && (this->isBitPublisher() == false)) {
00561         Update::IdPath path(
00562           this->domain_->get_id(),
00563           this->get_id(),
00564           current->second->get_id());
00565         this->um_->destroy(path, Update::Topic);
00566 
00567         if (OpenDDS::DCPS::DCPS_debug_level > 4) {
00568           OpenDDS::DCPS::RepoId id = current->second->get_id();
00569           OpenDDS::DCPS::RepoIdConverter converter(id);
00570           ACE_DEBUG((LM_DEBUG,
00571                      ACE_TEXT("(%P|%t) DCPS_IR_Participant::remove_all_dependents: ")
00572                      ACE_TEXT("pushing deletion of topic %C in domain %d.\n"),
00573                      std::string(converter).c_str(),
00574                      this->domain_->get_id()));
00575         }
00576 
00577         // Remove the topic ourselves.
00578         // N.B. This call sets the second (reference) argument to 0, so when
00579         //      clear() is called below, no destructor is (re)called.
00580 
00581         // Get the topic id and topic point before remove_topic since it
00582         // invalidates the iterator. Accessing after removal got SEGV.
00583         OpenDDS::DCPS::RepoId id = current->first;
00584         DCPS_IR_Topic* topic = current->second;
00585 
00586         this->domain_->remove_topic(this, topic);
00587 
00588         if (OpenDDS::DCPS::DCPS_debug_level > 9) {
00589           OpenDDS::DCPS::RepoIdConverter part_converter(id_);
00590           OpenDDS::DCPS::RepoIdConverter topic_converter(id);
00591           ACE_DEBUG((LM_DEBUG,
00592                      ACE_TEXT("(%P|%t) DCPS_IR_Participant::remove_all_dependents: ")
00593                      ACE_TEXT("domain %d participant %C removed topic %C.\n"),
00594                      this->domain_->get_id(),
00595                      std::string(part_converter).c_str(),
00596                      std::string(topic_converter).c_str()));
00597         }
00598       }
00599     }
00600   }
00601 
00602   // Clear the Topic container of null pointers.
00603   this->topicRefs_.clear();
00604 
00605   // The publications and subscriptions can NOT be deleted until after all
00606   // the associations have been removed.  Otherwise an access violation
00607   // can occur because a publication and subscription of this participant
00608   // could be associated.
00609 
00610   // delete all the publications
00611   for (DCPS_IR_Publication_Map::const_iterator current = this->publications_.begin();
00612        current != this->publications_.end();
00613        ++current) {
00614     // Notify the federation to destroy the publication.
00615     if (this->um_ && (this->isBitPublisher() == false)) {
00616       Update::IdPath path(
00617         this->domain_->get_id(),
00618         this->get_id(),
00619         current->second->get_id());
00620       this->um_->destroy(path, Update::Actor, Update::DataWriter);
00621 
00622       if (OpenDDS::DCPS::DCPS_debug_level > 4) {
00623         OpenDDS::DCPS::RepoId id = current->second->get_id();
00624         OpenDDS::DCPS::RepoIdConverter converter(id);
00625         ACE_DEBUG((LM_DEBUG,
00626                    ACE_TEXT("(%P|%t) DCPS_IR_Participant::remove_all_dependents: ")
00627                    ACE_TEXT("pushing deletion of publication %C in domain %d.\n"),
00628                    std::string(converter).c_str(),
00629                    this->domain_->get_id()));
00630       }
00631     }
00632   }
00633 
00634   // Clear the container.
00635   this->publications_.clear();
00636 
00637   // delete all the subscriptions
00638   for (DCPS_IR_Subscription_Map::const_iterator current
00639        = this->subscriptions_.begin();
00640        current != this->subscriptions_.end();
00641        ++current) {
00642     // Notify the federation to destroy the subscription.
00643     if (this->um_ && (this->isBitPublisher() == false)) {
00644       Update::IdPath path(
00645         this->domain_->get_id(),
00646         this->get_id(),
00647         current->second->get_id());
00648       this->um_->destroy(path, Update::Actor, Update::DataReader);
00649 
00650       if (OpenDDS::DCPS::DCPS_debug_level > 4) {
00651         OpenDDS::DCPS::RepoId id = current->second->get_id();
00652         OpenDDS::DCPS::RepoIdConverter converter(id);
00653         ACE_DEBUG((LM_DEBUG,
00654                    ACE_TEXT("(%P|%t) DCPS_IR_Participant::remove_all_dependents: ")
00655                    ACE_TEXT("pushing deletion of subscription %C in domain %d.\n"),
00656                    std::string(converter).c_str(),
00657                    this->domain_->get_id()));
00658       }
00659     }
00660   }
00661 
00662   // Clear the container.
00663   this->subscriptions_.clear();
00664 }

Here is the call graph for this function:

int DCPS_IR_Participant::remove_publication ( OpenDDS::DCPS::RepoId  pubId  ) 

Removes the publication with the id Deletes the publication object if returns successful Returns 0 if successful

Definition at line 228 of file DCPS_IR_Participant.cpp.

References ACE_TEXT(), OpenDDS::DCPS::DCPS_debug_level, DCPS_IR_Domain::dispose_publication_bit(), domain_, id_, LM_DEBUG, LM_ERROR, publications_, DCPS_IR_Topic::release(), and DCPS_IR_Topic::remove_publication_reference().

Referenced by TAO_DDS_DCPSInfo_i::add_publication(), TAO_DDS_DCPSInfo_i::remove_by_owner(), and TAO_DDS_DCPSInfo_i::remove_publication().

00229 {
00230   DCPS_IR_Publication_Map::iterator where = this->publications_.find(pubId);
00231 
00232   if (where != this->publications_.end()) {
00233     DCPS_IR_Topic* topic = where->second->get_topic();
00234     topic->remove_publication_reference(where->second.get());
00235 
00236     if (0 != where->second->remove_associations(false)) {
00237       // N.B. As written today, this branch will never be taken.
00238       OpenDDS::DCPS::RepoIdConverter part_converter(id_);
00239       OpenDDS::DCPS::RepoIdConverter pub_converter(pubId);
00240       ACE_ERROR((LM_ERROR,
00241                  ACE_TEXT("(%P|%t) ERROR: DCPS_IR_Participant::remove_publication: ")
00242                  ACE_TEXT("participant %C unable to remove associations from publication %C\n"),
00243                  std::string(part_converter).c_str(),
00244                  std::string(pub_converter).c_str()));
00245       return -1;
00246     }
00247 
00248     this->domain_->dispose_publication_bit(where->second.get());
00249     topic->release(false);
00250     this->publications_.erase(where);
00251 
00252     if (OpenDDS::DCPS::DCPS_debug_level > 0) {
00253       OpenDDS::DCPS::RepoIdConverter part_converter(id_);
00254       OpenDDS::DCPS::RepoIdConverter pub_converter(pubId);
00255       ACE_DEBUG((LM_DEBUG,
00256                  ACE_TEXT("(%P|%t) DCPS_IR_Participant::remove_publication: ")
00257                  ACE_TEXT("participant %C removed publication %C.\n"),
00258                  std::string(part_converter).c_str(),
00259                  std::string(pub_converter).c_str()));
00260     }
00261 
00262     return 0;
00263 
00264   } else {
00265     OpenDDS::DCPS::RepoIdConverter part_converter(id_);
00266     OpenDDS::DCPS::RepoIdConverter pub_converter(pubId);
00267     ACE_ERROR((LM_ERROR,
00268                ACE_TEXT("(%P|%t) ERROR: DCPS_IR_Participant::remove_publication: ")
00269                ACE_TEXT("participant %C unable to remove publication %C.\n"),
00270                std::string(part_converter).c_str(),
00271                std::string(pub_converter).c_str()));
00272     return -1;
00273   }
00274 }

Here is the call graph for this function:

Here is the caller graph for this function:

int DCPS_IR_Participant::remove_subscription ( OpenDDS::DCPS::RepoId  subId  ) 

Removes the subscription with the id Deletes the subscription object if returns successful Returns 0 if successful

Definition at line 355 of file DCPS_IR_Participant.cpp.

References ACE_TEXT(), OpenDDS::DCPS::DCPS_debug_level, DCPS_IR_Domain::dispose_subscription_bit(), domain_, id_, LM_DEBUG, LM_ERROR, DCPS_IR_Topic::release(), DCPS_IR_Topic::remove_subscription_reference(), and subscriptions_.

Referenced by TAO_DDS_DCPSInfo_i::add_subscription(), TAO_DDS_DCPSInfo_i::remove_by_owner(), and TAO_DDS_DCPSInfo_i::remove_subscription().

00356 {
00357   DCPS_IR_Subscription_Map::iterator where = this->subscriptions_.find(subId);
00358 
00359   if (where != this->subscriptions_.end()) {
00360     DCPS_IR_Topic* topic = where->second->get_topic();
00361     topic->remove_subscription_reference(where->second.get());
00362 
00363     if (0 != where->second->remove_associations(false)) {
00364       // N.B. As written today, this branch will never be taken.
00365       OpenDDS::DCPS::RepoIdConverter part_converter(id_);
00366       OpenDDS::DCPS::RepoIdConverter sub_converter(subId);
00367       ACE_ERROR((LM_ERROR,
00368                  ACE_TEXT("(%P|%t) ERROR: DCPS_IR_Participant::remove_subscription: ")
00369                  ACE_TEXT("participant %C unable to remove associations from subscription %C\n"),
00370                  std::string(part_converter).c_str(),
00371                  std::string(sub_converter).c_str()));
00372       return -1;
00373     }
00374 
00375     this->domain_->dispose_subscription_bit(where->second.get());
00376     topic->release(false);
00377     this->subscriptions_.erase(where);
00378 
00379     if (OpenDDS::DCPS::DCPS_debug_level > 0) {
00380       OpenDDS::DCPS::RepoIdConverter part_converter(id_);
00381       OpenDDS::DCPS::RepoIdConverter sub_converter(subId);
00382       ACE_DEBUG((LM_DEBUG,
00383                  ACE_TEXT("(%P|%t) DCPS_IR_Participant::remove_subscription: ")
00384                  ACE_TEXT("participant %C removed subscription %C.\n"),
00385                  std::string(part_converter).c_str(),
00386                  std::string(sub_converter).c_str()));
00387     }
00388 
00389     return 0;
00390 
00391   } else {
00392     OpenDDS::DCPS::RepoIdConverter part_converter(id_);
00393     OpenDDS::DCPS::RepoIdConverter sub_converter(subId);
00394     ACE_ERROR((LM_ERROR,
00395                ACE_TEXT("(%P|%t) ERROR: DCPS_IR_Participant::remove_subscription: ")
00396                ACE_TEXT("participant %C unable to remove subscription %C.\n"),
00397                std::string(part_converter).c_str(),
00398                std::string(sub_converter).c_str()));
00399     return -1;
00400   }
00401 }

Here is the call graph for this function:

Here is the caller graph for this function:

int DCPS_IR_Participant::remove_topic_reference ( OpenDDS::DCPS::RepoId  topicId,
DCPS_IR_Topic *&  topic 
)

Remove a topic reference Does not change or take ownership of topic Returns 0 if successful

Definition at line 444 of file DCPS_IR_Participant.cpp.

References ACE_TEXT(), OpenDDS::DCPS::DCPS_debug_level, id_, LM_DEBUG, LM_WARNING, and topicRefs_.

Referenced by TAO_DDS_DCPSInfo_i::remove_by_owner(), and DCPS_IR_Domain::remove_topic().

00446 {
00447   DCPS_IR_Topic_Map::iterator where = this->topicRefs_.find(topicId);
00448 
00449   if (where != this->topicRefs_.end()) {
00450     topic = where->second;
00451     this->topicRefs_.erase(where);
00452 
00453     if (OpenDDS::DCPS::DCPS_debug_level > 0) {
00454       OpenDDS::DCPS::RepoIdConverter part_converter(id_);
00455       OpenDDS::DCPS::RepoIdConverter topic_converter(topicId);
00456       ACE_DEBUG((LM_DEBUG,
00457                  ACE_TEXT("(%P|%t) DCPS_IR_Participant::remove_topic_reference: ")
00458                  ACE_TEXT("participant %C removed topic %C at 0x%x.\n"),
00459                  std::string(part_converter).c_str(),
00460                  std::string(topic_converter).c_str(),
00461                  topic));
00462     }
00463 
00464     return 0;
00465 
00466   } else {
00467     if (OpenDDS::DCPS::DCPS_debug_level > 0) {
00468       OpenDDS::DCPS::RepoIdConverter part_converter(id_);
00469       OpenDDS::DCPS::RepoIdConverter topic_converter(topicId);
00470       ACE_ERROR((LM_WARNING,
00471                  ACE_TEXT("(%P|%t) WARNING: DCPS_IR_Participant::remove_topic_reference: ")
00472                  ACE_TEXT("participant %C unable to find topic %C for removal.\n"),
00473                  std::string(part_converter).c_str(),
00474                  std::string(topic_converter).c_str()));
00475     }
00476 
00477     return -1;
00478   }
00479 }

Here is the call graph for this function:

Here is the caller graph for this function:

void DCPS_IR_Participant::set_alive ( CORBA::Boolean  alive  ) 

Definition at line 682 of file DCPS_IR_Participant.cpp.

References aliveStatus_.

00683 {
00684   aliveStatus_ = alive;
00685 }

void DCPS_IR_Participant::set_handle ( DDS::InstanceHandle_t  handle  ) 

Definition at line 814 of file DCPS_IR_Participant.cpp.

References handle_.

Referenced by DCPS_IR_Domain::publish_participant_bit().

00815 {
00816   handle_ = handle;
00817 }

Here is the caller graph for this function:

bool DCPS_IR_Participant::set_qos ( const DDS::DomainParticipantQos qos  ) 

Update 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 DomainParticipantQos do not affect.

Definition at line 824 of file DCPS_IR_Participant.cpp.

References domain_, DCPS_IR_Domain::publish_participant_bit(), and qos_.

Referenced by TAO_DDS_DCPSInfo_i::update_domain_participant_qos().

00825 {
00826   // Do not need re-evaluate compatibility and associations when
00827   // DomainParticipantQos changes since only datareader and datawriter
00828   // QoS are evaludated during normal associations establishment.
00829 
00830   // Do not need publish the QoS change to topics or datareader or
00831   // datawriter BIT as they are independent.
00832   qos_ = qos;
00833   this->domain_->publish_participant_bit(this);
00834 
00835   return true;
00836 }

Here is the call graph for this function:

Here is the caller graph for this function:

const DCPS_IR_Subscription_Map & DCPS_IR_Participant::subscriptions ( void   )  const

Expose a readable reference to the subscription map.

Definition at line 67 of file DCPS_IR_Participant.cpp.

References subscriptions_.

Referenced by TAO_DDS_DCPSInfo_i::disassociate_participant(), and TAO_DDS_DCPSInfo_i::remove_by_owner().

00068 {
00069   return this->subscriptions_;
00070 }

Here is the caller graph for this function:

void DCPS_IR_Participant::takeOwnership (  ) 

Take local ownership of this participant and publish an update.

Publish an update with our ownership.

Definition at line 79 of file DCPS_IR_Participant.cpp.

References ACE_TEXT(), changeOwner(), Update::Manager::create(), OpenDDS::DCPS::DCPS_debug_level, domain_, federationId_, DCPS_IR_Domain::get_id(), TAO_DDS_DCPSFederationId::id(), id_, isBitPublisher(), LM_DEBUG, and um_.

Referenced by TAO_DDS_DCPSInfo_i::attach_participant().

00080 {
00081   /// Publish an update with our ownership.
00082   if (this->um_ && (this->isBitPublisher() == false)) {
00083     this->um_->create(
00084       Update::OwnershipData(
00085         this->domain_->get_id(),
00086         this->id_,
00087         this->federationId_.id()));
00088 
00089     if (OpenDDS::DCPS::DCPS_debug_level > 4) {
00090       OpenDDS::DCPS::RepoIdConverter converter(id_);
00091       ACE_DEBUG((LM_DEBUG,
00092                  ACE_TEXT("(%P|%t) DCPS_IR_Participant::take_ownership: ")
00093                  ACE_TEXT("pushing ownership %C in domain %d.\n"),
00094                  std::string(converter).c_str(),
00095                  this->domain_->get_id()));
00096     }
00097   }
00098 
00099   // And now handle our internal ownership processing.
00100   this->changeOwner(this->federationId_.id(), this->federationId_.id());
00101 }

Here is the call graph for this function:

Here is the caller graph for this function:

const DCPS_IR_Topic_Map & DCPS_IR_Participant::topics (  )  const

Expose a readable reference to the topic map.

Definition at line 73 of file DCPS_IR_Participant.cpp.

References topicRefs_.

Referenced by TAO_DDS_DCPSInfo_i::remove_by_owner().

00074 {
00075   return this->topicRefs_;
00076 }

Here is the caller graph for this function:


Member Data Documentation

Definition at line 218 of file DCPS_IR_Participant.h.

Referenced by dump_to_string(), is_alive(), mark_dead(), and set_alive().

Definition at line 221 of file DCPS_IR_Participant.h.

Referenced by dump_to_string(), isOwner(), and takeOwnership().

Definition at line 219 of file DCPS_IR_Participant.h.

Referenced by get_handle(), and set_handle().

Lists of Ignored Entities

Definition at line 243 of file DCPS_IR_Participant.h.

Referenced by dump_to_string(), ignore_participant(), and is_participant_ignored().

Entity GUID Id generators.

Definition at line 245 of file DCPS_IR_Participant.h.

Referenced by dump_to_string(), ignore_publication(), and is_publication_ignored().

Entity GUID Id generators.

Definition at line 246 of file DCPS_IR_Participant.h.

Referenced by dump_to_string(), ignore_subscription(), and is_subscription_ignored().

Entity GUID Id generators.

Definition at line 244 of file DCPS_IR_Participant.h.

Referenced by dump_to_string(), ignore_topic(), and is_topic_ignored().

Flag indicating this participant publishes built-in topics.

Definition at line 259 of file DCPS_IR_Participant.h.

Referenced by add_publication(), add_subscription(), add_topic_reference(), dump_to_string(), and isBitPublisher().

Definition at line 222 of file DCPS_IR_Participant.h.

Referenced by changeOwner(), dump_to_string(), isOwner(), and owner().

ACE_SYNCH_MUTEX DCPS_IR_Participant::ownerLock_ [private]

Lock portions ownership processing.

Definition at line 225 of file DCPS_IR_Participant.h.

Referenced by changeOwner().

Entity GUID Id generators.

Definition at line 230 of file DCPS_IR_Participant.h.

Referenced by get_next_publication_id(), and last_publication_key().

Definition at line 217 of file DCPS_IR_Participant.h.

Referenced by get_qos(), and set_qos().

Entity GUID Id generators.

Definition at line 231 of file DCPS_IR_Participant.h.

Referenced by get_next_subscription_id(), and last_subscription_key().

Entity GUID Id generators.

Definition at line 229 of file DCPS_IR_Participant.h.

Referenced by get_next_topic_id(), and last_topic_key().

The participant is the only entity that has and deals with dependencies (topics, actors). In handling dependencies it encompasses a bigger role. Therefore it needs to update other entities (specifically the Update::Manager) the changes it makes.

Definition at line 256 of file DCPS_IR_Participant.h.

Referenced by remove_all_dependents(), and takeOwnership().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 10 Aug 2018 for OpenDDS by  doxygen 1.6.1