1 #ifndef INCLUDE_ORA_NAMEDREF_H
2 #define INCLUDE_ORA_NAMEDREF_H
7 #include <boost/shared_ptr.hpp>
22 boost::shared_ptr<void>&
ptr()
const;
27 mutable boost::shared_ptr<void>
m_ptr;
43 operator bool ()
const;
45 boost::shared_ptr<T>
share()
const;
108 T*
p = share().get();
109 if( !p && throw_flag)
throwException(
"Underlying pointer is null.",
"NamedRef::safePtr");
115 return safePtr(
true );
120 return *safePtr(
true );
125 return safePtr(
false);
130 return safePtr(
false);
135 return boost::static_pointer_cast<
T>(ptr());
140 return safePtr(
false)==0;
145 return share() == rhs.
share();
156 return share() == rhs.
share();
boost::shared_ptr< void > & ptr() const
NamedReference & operator=(const NamedReference &rhs)
const std::string & name() const
virtual ~NamedReference()
bool operator==(const NamedRef< T > &rhs) const
bool operator==(const QGLikelihoodParameters &lhs, const QGLikelihoodCategory &rhs)
Test if parameters are compatible with category.
bool isPersistent() const
T * safePtr(bool throw_flag) const
bool operator!=(const NamedRef< T > &rhs) const
NamedRef< T > & operator=(const NamedRef< T > &rhs)
boost::shared_ptr< T > share() const
void throwException(const std::string &message, const std::string &methodName) __attribute__((noreturn))
char data[epos_bytes_allocation]
void set(const std::string &name)
boost::shared_ptr< void > m_ptr