00001 #include "CondCore/ORA/interface/NamedRef.h" 00002 00003 ora::NamedReference::NamedReference(): 00004 m_name(""),m_isPersistent(false),m_ptr(){ 00005 } 00006 00007 ora::NamedReference::NamedReference( const std::string& name ): 00008 m_name(name),m_isPersistent(false),m_ptr(){ 00009 } 00010 00011 ora::NamedReference::NamedReference( const std::string& name, boost::shared_ptr<void> ptr ): 00012 m_name(name),m_isPersistent(false),m_ptr( ptr ){ 00013 } 00014 00015 ora::NamedReference::NamedReference( const NamedReference& rhs ): 00016 m_name(rhs.m_name),m_isPersistent(rhs.m_isPersistent),m_ptr(rhs.m_ptr){ 00017 } 00018 00019 ora::NamedReference::~NamedReference(){ 00020 } 00021 00022 ora::NamedReference& ora::NamedReference::operator=( const NamedReference& rhs ){ 00023 if( this != &rhs ){ 00024 m_name = rhs.m_name; 00025 m_isPersistent = rhs.m_isPersistent; 00026 m_ptr = rhs.m_ptr; 00027 } 00028 return *this; 00029 } 00030 00031 void ora::NamedReference::set( const std::string& name ){ 00032 m_name = name; 00033 m_isPersistent = false; 00034 } 00035 00036 const std::string& ora::NamedReference::name() const { 00037 return m_name; 00038 } 00039 00040 bool ora::NamedReference::isPersistent() const { 00041 return m_isPersistent; 00042 } 00043 00044 boost::shared_ptr<void>& ora::NamedReference::ptr() const { 00045 return m_ptr; 00046 } 00047 00048 void ora::NamedReference::reset() { 00049 m_ptr.reset(); 00050 m_name.clear(); 00051 m_isPersistent = false; 00052 }