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 OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL 00013 00014 namespace OpenDDS { 00015 namespace DCPS { 00016 00017 ACE_INLINE 00018 TransportRegistry::~TransportRegistry() 00019 { 00020 DBG_ENTRY_LVL("TransportRegistry", "~TransportRegistry", 6); 00021 } 00022 00023 ACE_INLINE 00024 TransportConfig_rch 00025 TransportRegistry::global_config() const 00026 { 00027 DBG_ENTRY_LVL("TransportRegistry", "global_config()", 6); 00028 GuardType guard(this->lock_); 00029 return this->global_config_; 00030 } 00031 00032 ACE_INLINE 00033 void 00034 TransportRegistry::global_config(const TransportConfig_rch& cfg) 00035 { 00036 DBG_ENTRY_LVL("TransportRegistry", "global_config(cfg)", 6); 00037 GuardType guard(this->lock_); 00038 this->global_config_ = cfg; 00039 } 00040 00041 ACE_INLINE 00042 void 00043 TransportRegistry::domain_default_config(DDS::DomainId_t domain, 00044 const TransportConfig_rch& cfg) 00045 { 00046 GuardType guard(this->lock_); 00047 domain_default_config_map_[domain] = cfg; 00048 } 00049 00050 ACE_INLINE 00051 TransportConfig_rch 00052 TransportRegistry::domain_default_config(DDS::DomainId_t domain) const 00053 { 00054 GuardType guard(this->lock_); 00055 const DomainConfigMap::const_iterator iter = 00056 domain_default_config_map_.find(domain); 00057 return (iter == domain_default_config_map_.end()) 00058 ? TransportConfig_rch() : iter->second; 00059 } 00060 00061 ACE_INLINE 00062 void 00063 TransportRegistry::remove_inst(const TransportInst_rch& inst) 00064 { 00065 GuardType guard(this->lock_); 00066 this->inst_map_.erase(inst->name()); 00067 } 00068 00069 ACE_INLINE 00070 void 00071 TransportRegistry::remove_config(const TransportConfig_rch& cfg) 00072 { 00073 GuardType guard(this->lock_); 00074 this->config_map_.erase(cfg->name()); 00075 } 00076 00077 ACE_INLINE 00078 void 00079 TransportRegistry::bind_config(const OPENDDS_STRING& name, 00080 DDS::Entity_ptr entity) 00081 { 00082 this->bind_config(this->get_config(name), entity); 00083 } 00084 00085 } 00086 } 00087 00088 OPENDDS_END_VERSIONED_NAMESPACE_DECL