CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
NamedRef.cc
Go to the documentation of this file.
2 
4  m_name(""),m_isPersistent(false),m_ptr(){
5 }
6 
8  m_name(name),m_isPersistent(false),m_ptr(){
9 }
10 
11 ora::NamedReference::NamedReference( const std::string& name, boost::shared_ptr<void> ptr ):
12  m_name(name),m_isPersistent(false),m_ptr( ptr ){
13 }
14 
16  m_name(rhs.m_name),m_isPersistent(rhs.m_isPersistent),m_ptr(rhs.m_ptr){
17 }
18 
20 }
21 
23  if( this != &rhs ){
24  m_name = rhs.m_name;
25  m_isPersistent = rhs.m_isPersistent;
26  m_ptr = rhs.m_ptr;
27  }
28  return *this;
29 }
30 
31 void ora::NamedReference::set( const std::string& name ){
32  m_name = name;
33  m_isPersistent = false;
34 }
35 
36 const std::string& ora::NamedReference::name() const {
37  return m_name;
38 }
39 
41  return m_isPersistent;
42 }
43 
44 boost::shared_ptr<void>& ora::NamedReference::ptr() const {
45  return m_ptr;
46 }
47 
49  m_ptr.reset();
50  m_name.clear();
51  m_isPersistent = false;
52 }
boost::shared_ptr< void > & ptr() const
Definition: NamedRef.cc:44
NamedReference & operator=(const NamedReference &rhs)
Definition: NamedRef.cc:22
const std::string & name() const
Definition: NamedRef.cc:36
virtual ~NamedReference()
Definition: NamedRef.cc:19
bool isPersistent() const
Definition: NamedRef.cc:40
std::string m_name
Definition: NamedRef.h:25
void set(const std::string &name)
Definition: NamedRef.cc:31
boost::shared_ptr< void > m_ptr
Definition: NamedRef.h:27