CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
ora::Ptr< T > Class Template Reference

#include <Ptr.h>

Public Member Functions

void * address () const
 
template<class C >
Ptr< T > & cast (const Ptr< C > &)
 
template<class C >
ora::Ptr< T > & cast (const Ptr< C > &aPtr)
 
Tget () const
 
bool isLoaded () const
 
void load () const
 
boost::shared_ptr< IPtrLoader > & loader () const
 
 operator bool () const
 
bool operator! () const
 
template<class C >
bool operator!= (const Ptr< C > &aPtr) const
 
Toperator* () const
 
Toperator-> () const
 
Ptr< T > & operator= (T *)
 
Ptr< T > & operator= (const Ptr< T > &)
 
template<class C >
Ptr< T > & operator= (const Ptr< C > &)
 
template<class C >
ora::Ptr< T > & operator= (const Ptr< C > &aPtr)
 
template<class C >
bool operator== (const Ptr< C > &aPtr) const
 
 Ptr ()
 
 Ptr (T *anObject)
 
 Ptr (const Ptr< T > &)
 
template<class C >
 Ptr (const Ptr< C > &)
 
void reset ()
 
boost::shared_ptr< T > & share () const
 
virtual ~Ptr ()
 

Private Member Functions

Tptr (bool throw_flag) const
 

Private Attributes

bool m_isLoaded
 
boost::shared_ptr< IPtrLoaderm_loader
 
boost::shared_ptr< Tm_ptr
 

Detailed Description

template<typename T>
class ora::Ptr< T >

Templated class for the persistency of associated objects. The embedded object is treated as a normal C++ pointer in the writing mode, without to require an explicit write request on it. In the reading mode, the embedded object is loaded only at access time (lazy loading).

Definition at line 47 of file Ptr.h.

Constructor & Destructor Documentation

template<class T >
ora::Ptr< T >::Ptr ( )
inline

Definition at line 148 of file Ptr.h.

template<class T >
ora::Ptr< T >::Ptr ( T anObject)
inlineexplicit

Definition at line 152 of file Ptr.h.

template<class T >
ora::Ptr< T >::Ptr ( const Ptr< T > &  aPtr)
inline

Definition at line 156 of file Ptr.h.

template<class T >
template<class C >
ora::Ptr< T >::Ptr ( const Ptr< C > &  aPtr)
inline

Definition at line 162 of file Ptr.h.

template<class T >
ora::Ptr< T >::~Ptr ( )
inlinevirtual

Definition at line 169 of file Ptr.h.

Member Function Documentation

template<class T >
void * ora::Ptr< T >::address ( ) const
inline

Definition at line 227 of file Ptr.h.

template<typename T >
template<class C >
Ptr<T>& ora::Ptr< T >::cast ( const Ptr< C > &  )
template<typename T >
template<class C >
ora::Ptr<T>& ora::Ptr< T >::cast ( const Ptr< C > &  aPtr)
inline

Definition at line 199 of file Ptr.h.

template<class T >
T * ora::Ptr< T >::get ( ) const
inline

Definition at line 217 of file Ptr.h.

Referenced by Options.Options::__getitem__().

template<typename T >
bool ora::Ptr< T >::isLoaded ( ) const
inline

Definition at line 123 of file Ptr.h.

template<class T >
void ora::Ptr< T >::load ( ) const
inline
template<typename T >
boost::shared_ptr<IPtrLoader>& ora::Ptr< T >::loader ( ) const
inline

Definition at line 115 of file Ptr.h.

template<class T >
ora::Ptr< T >::operator bool ( ) const
inline

Definition at line 232 of file Ptr.h.

template<class T >
bool ora::Ptr< T >::operator! ( ) const
inline

Definition at line 237 of file Ptr.h.

template<typename T >
template<class C >
bool ora::Ptr< T >::operator!= ( const Ptr< C > &  aPtr) const
inline

Definition at line 105 of file Ptr.h.

template<class T >
T & ora::Ptr< T >::operator* ( ) const
inline

Definition at line 212 of file Ptr.h.

template<class T >
T * ora::Ptr< T >::operator-> ( ) const
inline

Definition at line 207 of file Ptr.h.

template<class T >
ora::Ptr< T > & ora::Ptr< T >::operator= ( T aPtr)
inline

Definition at line 173 of file Ptr.h.

template<class T >
ora::Ptr< T > & ora::Ptr< T >::operator= ( const Ptr< T > &  aPtr)
inline

Definition at line 180 of file Ptr.h.

template<typename T >
template<class C >
Ptr<T>& ora::Ptr< T >::operator= ( const Ptr< C > &  )
template<typename T >
template<class C >
ora::Ptr<T>& ora::Ptr< T >::operator= ( const Ptr< C > &  aPtr)
inline

Definition at line 189 of file Ptr.h.

template<typename T >
template<class C >
bool ora::Ptr< T >::operator== ( const Ptr< C > &  aPtr) const
inline

Definition at line 101 of file Ptr.h.

template<class T >
T * ora::Ptr< T >::ptr ( bool  throw_flag) const
inlineprivate

Definition at line 254 of file Ptr.h.

template<class T >
void ora::Ptr< T >::reset ( void  )
inline

Definition at line 242 of file Ptr.h.

template<class T >
boost::shared_ptr< T > & ora::Ptr< T >::share ( ) const
inline

Definition at line 222 of file Ptr.h.

Member Data Documentation

template<typename T >
bool ora::Ptr< T >::m_isLoaded
mutableprivate

Definition at line 141 of file Ptr.h.

template<typename T >
boost::shared_ptr<IPtrLoader> ora::Ptr< T >::m_loader
mutableprivate

Definition at line 138 of file Ptr.h.

template<typename T >
boost::shared_ptr<T> ora::Ptr< T >::m_ptr
mutableprivate

Definition at line 135 of file Ptr.h.