00001 /* 00002 * 00003 * 00004 * Distributed under the OpenDDS License. 00005 * See: http://www.opendds.org/license.html 00006 */ 00007 00008 #include "EntryExit.h" 00009 #include "TransportInst.h" 00010 #include "TransportType.h" 00011 00012 namespace OpenDDS { 00013 namespace DCPS { 00014 00015 ACE_INLINE 00016 TransportRegistry::~TransportRegistry() 00017 { 00018 DBG_ENTRY_LVL("TransportRegistry", "~TransportRegistry", 6); 00019 release(); 00020 } 00021 00022 ACE_INLINE 00023 TransportConfig_rch 00024 TransportRegistry::global_config() const 00025 { 00026 DBG_ENTRY_LVL("TransportRegistry", "global_config()", 6); 00027 GuardType guard(this->lock_); 00028 return this->global_config_; 00029 } 00030 00031 ACE_INLINE 00032 void 00033 TransportRegistry::global_config(const TransportConfig_rch& cfg) 00034 { 00035 DBG_ENTRY_LVL("TransportRegistry", "global_config(cfg)", 6); 00036 GuardType guard(this->lock_); 00037 this->global_config_ = cfg; 00038 } 00039 00040 ACE_INLINE 00041 void 00042 TransportRegistry::domain_default_config(DDS::DomainId_t domain, 00043 const TransportConfig_rch& cfg) 00044 { 00045 GuardType guard(this->lock_); 00046 domain_default_config_map_[domain] = cfg; 00047 } 00048 00049 ACE_INLINE 00050 TransportConfig_rch 00051 TransportRegistry::domain_default_config(DDS::DomainId_t domain) const 00052 { 00053 GuardType guard(this->lock_); 00054 const DomainConfigMap::const_iterator iter = 00055 domain_default_config_map_.find(domain); 00056 return (iter == domain_default_config_map_.end()) 00057 ? TransportConfig_rch() : iter->second; 00058 } 00059 00060 ACE_INLINE 00061 void 00062 TransportRegistry::remove_inst(const TransportInst_rch& inst) 00063 { 00064 GuardType guard(this->lock_); 00065 this->inst_map_.erase(inst->name()); 00066 } 00067 00068 ACE_INLINE 00069 void 00070 TransportRegistry::remove_config(const TransportConfig_rch& cfg) 00071 { 00072 GuardType guard(this->lock_); 00073 this->config_map_.erase(cfg->name()); 00074 } 00075 00076 ACE_INLINE 00077 void 00078 TransportRegistry::bind_config(const OPENDDS_STRING& name, 00079 DDS::Entity_ptr entity) 00080 { 00081 this->bind_config(this->get_config(name), entity); 00082 } 00083 00084 } 00085 }