Rosetta Utilities  2014.35
Public Types | Public Member Functions | Private Attributes | Friends | List of all members
utility::pointer::access_ptr< T > Class Template Reference

Non-owning access smart pointer. More...

#include <access_ptr.hh>

Public Types

typedefValue
 
typedef T & Reference
 
typedef T const & ConstReference
 
typedef T * Pointer
 
typedef T const * ConstPointer
 
typedefvalue_type
 
typedefelement_type
 
typedef T & reference
 
typedef T const & const_reference
 
typedef T * pointer
 
typedef T const * const_pointer
 

Public Member Functions

 access_ptr ()
 Default constructor. More...
 
 access_ptr (access_ptr const &a)
 Copy constructor (implicit) More...
 
template<typename U >
 access_ptr (access_ptr< U > const &a)
 Assignable copy constructor (implicit) More...
 
 access_ptr (pointer object_p)
 Object pointer constructor (implicit) More...
 
 access_ptr (reference object)
 Object constructor. More...
 
 ~access_ptr ()
 Destructor: Non-owning => doesn't delete object. More...
 
access_ptroperator= (access_ptr const &a)
 Copy assignment. More...
 
template<typename U >
access_ptroperator= (access_ptr< U > const &a)
 Assignable copy assignment. More...
 
access_ptroperator= (pointer object_p)
 Object pointer assignment. More...
 
access_ptroperator= (reference object)
 Object assignment. More...
 
 operator bool () const
 bool conversion: points to something? More...
 
reference operator* () const
 Dereference. More...
 
pointer operator-> () const
 Indirection. More...
 
pointer operator() () const
 Raw pointer. More...
 
bool operator! () const
 Points to nothing? (some compilers need this) More...
 
pointer get () const
 Raw pointer. More...
 
void reset_to_null ()
 Reset. More...
 
void swap (access_ptr &a)
 Swap. More...
 

Private Attributes

pointer p_
 Pointer to object. More...
 

Friends

template<typename >
class access_ptr
 

Detailed Description

template<typename T>
class utility::pointer::access_ptr< T >

Non-owning access smart pointer.

Member Typedef Documentation

template<typename T>
typedef T const* utility::pointer::access_ptr< T >::const_pointer
template<typename T>
typedef T const& utility::pointer::access_ptr< T >::const_reference
template<typename T>
typedef T const* utility::pointer::access_ptr< T >::ConstPointer
template<typename T>
typedef T const& utility::pointer::access_ptr< T >::ConstReference
template<typename T>
typedef T utility::pointer::access_ptr< T >::element_type
template<typename T>
typedef T* utility::pointer::access_ptr< T >::Pointer
template<typename T>
typedef T* utility::pointer::access_ptr< T >::pointer
template<typename T>
typedef T& utility::pointer::access_ptr< T >::Reference
template<typename T>
typedef T& utility::pointer::access_ptr< T >::reference
template<typename T>
typedef T utility::pointer::access_ptr< T >::Value
template<typename T>
typedef T utility::pointer::access_ptr< T >::value_type

Constructor & Destructor Documentation

template<typename T>
utility::pointer::access_ptr< T >::access_ptr ( )
inline

Default constructor.

template<typename T>
utility::pointer::access_ptr< T >::access_ptr ( access_ptr< T > const &  a)
inline

Copy constructor (implicit)

template<typename T>
template<typename U >
utility::pointer::access_ptr< T >::access_ptr ( access_ptr< U > const &  a)
inline

Assignable copy constructor (implicit)

template<typename T>
utility::pointer::access_ptr< T >::access_ptr ( pointer  object_p)
inline

Object pointer constructor (implicit)

template<typename T>
utility::pointer::access_ptr< T >::access_ptr ( reference  object)
inlineexplicit

Object constructor.

template<typename T>
utility::pointer::access_ptr< T >::~access_ptr ( )
inline

Destructor: Non-owning => doesn't delete object.

Member Function Documentation

template<typename T>
pointer utility::pointer::access_ptr< T >::get ( ) const
inline
template<typename T>
utility::pointer::access_ptr< T >::operator bool ( ) const
inline

bool conversion: points to something?

Note
Enables unwanted conversions but work-around has compiler-dependencies

References utility::pointer::access_ptr< T >::p_.

template<typename T>
bool utility::pointer::access_ptr< T >::operator! ( ) const
inline

Points to nothing? (some compilers need this)

References utility::pointer::access_ptr< T >::p_.

template<typename T>
pointer utility::pointer::access_ptr< T >::operator() ( ) const
inline

Raw pointer.

References utility::pointer::access_ptr< T >::p_.

template<typename T>
reference utility::pointer::access_ptr< T >::operator* ( ) const
inline

Dereference.

References utility::pointer::access_ptr< T >::p_.

template<typename T>
pointer utility::pointer::access_ptr< T >::operator-> ( ) const
inline

Indirection.

References utility::pointer::access_ptr< T >::p_.

template<typename T>
access_ptr& utility::pointer::access_ptr< T >::operator= ( access_ptr< T > const &  a)
inline

Copy assignment.

References utility::pointer::access_ptr< T >::p_.

template<typename T>
template<typename U >
access_ptr& utility::pointer::access_ptr< T >::operator= ( access_ptr< U > const &  a)
inline

Assignable copy assignment.

References utility::pointer::access_ptr< T >::p_.

template<typename T>
access_ptr& utility::pointer::access_ptr< T >::operator= ( pointer  object_p)
inline

Object pointer assignment.

References utility::pointer::access_ptr< T >::p_.

template<typename T>
access_ptr& utility::pointer::access_ptr< T >::operator= ( reference  object)
inline

Object assignment.

References utility::pointer::access_ptr< T >::p_.

template<typename T>
void utility::pointer::access_ptr< T >::reset_to_null ( )
inline
template<typename T>
void utility::pointer::access_ptr< T >::swap ( access_ptr< T > &  a)
inline

Friends And Related Function Documentation

template<typename T>
template<typename >
friend class access_ptr
friend

Member Data Documentation

template<typename T>
pointer utility::pointer::access_ptr< T >::p_
private

The documentation for this class was generated from the following files: