Rosetta Utilities  2014.35
Classes | Typedefs | Functions
utility::pointer Namespace Reference

Classes

class  access_ptr
 Non-owning access smart pointer. More...
 
class  owning_ptr
 Shared-ownership intrusive reference-counted smart pointer. More...
 
class  ReferenceCount
 Base class for reference-counted polymorphic classes. More...
 
class  ReferenceCountMI
 Interface class for reference counted polymorphic classes. More...
 
class  ReferenceCountMI_
 Base class for reference counted polymorphic classes. More...
 

Typedefs

typedef access_ptr< boolaccess_ptr_bool
 
typedef access_ptr< short intaccess_ptr_short
 
typedef access_ptr< intaccess_ptr_int
 
typedef access_ptr< long intaccess_ptr_long
 
typedef access_ptr< unsigned
short int
access_ptr_ushort
 
typedef access_ptr< unsigned intaccess_ptr_uint
 
typedef access_ptr< unsigned
long int
access_ptr_ulong
 
typedef access_ptr< std::size_t > access_ptr_size_t
 
typedef access_ptr< floataccess_ptr_float
 
typedef access_ptr< doubleaccess_ptr_double
 
typedef access_ptr< long doubleaccess_ptr_longdouble
 
typedef access_ptr< char > access_ptr_char
 
typedef access_ptr< unsigned char > access_ptr_uchar
 
typedef access_ptr< signed char > access_ptr_schar
 
typedef owning_ptr
< ReferenceCount
ReferenceCountOP
 
typedef owning_ptr
< ReferenceCount const > 
ReferenceCountCOP
 

Functions

template<typename T , typename U >
bool operator== (access_ptr< T > const &a, access_ptr< U > const &b)
 access_ptr == access_ptr More...
 
template<typename T >
bool operator== (access_ptr< T > const &a, T const *const b)
 access_ptr == pointer More...
 
template<typename T >
bool operator== (T const *const a, access_ptr< T > const &b)
 pointer == access_ptr More...
 
template<typename T , typename U >
bool operator!= (access_ptr< T > const &a, access_ptr< U > const &b)
 access_ptr != access_ptr More...
 
template<typename T >
bool operator!= (access_ptr< T > const &a, T const *const b)
 access_ptr != pointer More...
 
template<typename T >
bool operator!= (T const *const a, access_ptr< T > const &b)
 pointer != access_ptr More...
 
template<typename T , typename U >
bool operator< (access_ptr< T > const &a, access_ptr< U > const &b)
 access_ptr < access_ptr More...
 
template<typename T >
bool operator< (access_ptr< T > const &a, T const *const b)
 access_ptr < pointer More...
 
template<typename T >
bool operator< (T const *const a, access_ptr< T > const &b)
 pointer < access_ptr More...
 
template<typename T >
void swap (access_ptr< T > &a, access_ptr< T > &b)
 Swap two access_ptr objects. More...
 
template<typename T >
T * get_pointer (access_ptr< T > const &a)
 Get pointer of access_ptr: needed by boost::mem_fn. More...
 
template<typename T , typename U >
access_ptr< T > static_pointer_cast (access_ptr< U > const &a)
 Static cast an access_ptr. More...
 
template<typename T , typename U >
access_ptr< T > const_pointer_cast (access_ptr< U > const &a)
 Const cast an access_ptr. More...
 
template<typename T , typename U >
access_ptr< T > dynamic_pointer_cast (access_ptr< U > const &a)
 Dynamic cast an access_ptr. More...
 
template<typename T , typename U >
access_ptr< T > down_pointer_cast (access_ptr< U > const &a)
 Down cast an access_ptr. More...
 
template<typename CharT , typename CharTraits , typename T >
std::basic_ostream< CharT,
CharTraits > & 
operator<< (std::basic_ostream< CharT, CharTraits > &os, access_ptr< T > const &a)
 Stream output. More...
 
template<typename T >
void owning_ptr_acquire (T *p)
 Add a reference to the object acquired by an owning_ptr. More...
 
template<typename T >
void owning_ptr_release (T *p)
 Remove a reference from the object released by an owning_ptr. More...
 
template<typename T , typename U >
bool operator== (owning_ptr< T > const &a, owning_ptr< U > const &b)
 owning_ptr == owning_ptr More...
 
template<typename T >
bool operator== (owning_ptr< T > const &a, T const *const b)
 owning_ptr == pointer More...
 
template<typename T >
bool operator== (T const *const a, owning_ptr< T > const &b)
 pointer == owning_ptr More...
 
template<typename T , typename U >
bool operator!= (owning_ptr< T > const &a, owning_ptr< U > const &b)
 owning_ptr != owning_ptr More...
 
template<typename T >
bool operator!= (owning_ptr< T > const &a, T const *const b)
 owning_ptr != pointer More...
 
template<typename T >
bool operator!= (T const *const a, owning_ptr< T > const &b)
 pointer != owning_ptr More...
 
template<typename T , typename U >
bool operator< (owning_ptr< T > const &a, owning_ptr< U > const &b)
 owning_ptr < owning_ptr More...
 
template<typename T >
bool operator< (owning_ptr< T > const &a, T const *const b)
 owning_ptr < pointer More...
 
template<typename T >
bool operator< (T const *const a, owning_ptr< T > const &b)
 pointer < owning_ptr More...
 
template<typename T >
void swap (owning_ptr< T > &a, owning_ptr< T > &b)
 Swap two owning_ptr objects. More...
 
template<typename T >
T * get_pointer (owning_ptr< T > const &a)
 Get pointer of owning_ptr: needed by boost::mem_fn. More...
 
template<typename T , typename U >
owning_ptr< T > static_pointer_cast (owning_ptr< U > const &a)
 Static cast an owning_ptr. More...
 
template<typename T , typename U >
owning_ptr< T > const_pointer_cast (owning_ptr< U > const &a)
 Const cast an owning_ptr. More...
 
template<typename T , typename U >
owning_ptr< T > dynamic_pointer_cast (owning_ptr< U > const &a)
 Dynamic cast an owning_ptr. More...
 
template<typename T , typename U >
owning_ptr< T > down_pointer_cast (owning_ptr< U > const &a)
 Down cast an owning_ptr. More...
 
template<typename CharT , typename CharTraits , typename T >
std::basic_ostream< CharT,
CharTraits > & 
operator<< (std::basic_ostream< CharT, CharTraits > &os, owning_ptr< T > const &a)
 Stream output. More...
 
template<typename T >
void delete_and_assign (T *&p, T *n)
 Delete a pointer and assign a new pointer. More...
 
template<typename T >
void delete_and_zero (T *&p)
 Delete a pointer and assign and set it to zero. More...
 
template<typename T >
void delete_and_assign_array (T *&p, T *n)
 Delete a pointer to an array and assign a new pointer. More...
 
template<typename T >
void delete_and_zero_array (T *&p)
 Delete a pointer to an array and set it to zero. More...
 

Typedef Documentation

Function Documentation

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

Const cast an access_ptr.

References basic::T().

template<typename T , typename U >
owning_ptr< T > utility::pointer::const_pointer_cast ( owning_ptr< U > const &  a)
inline

Const cast an owning_ptr.

References basic::T().

template<typename T >
void utility::pointer::delete_and_assign ( T *&  p,
T *  n 
)
inline

Delete a pointer and assign a new pointer.

template<typename T >
void utility::pointer::delete_and_assign_array ( T *&  p,
T *  n 
)
inline

Delete a pointer to an array and assign a new pointer.

template<typename T >
void utility::pointer::delete_and_zero ( T *&  p)
inline

Delete a pointer and assign and set it to zero.

template<typename T >
void utility::pointer::delete_and_zero_array ( T *&  p)
inline

Delete a pointer to an array and set it to zero.

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

Down cast an access_ptr.

References utility::down_cast(), and basic::T().

template<typename T , typename U >
owning_ptr< T > utility::pointer::down_pointer_cast ( owning_ptr< U > const &  a)
inline

Down cast an owning_ptr.

References utility::down_cast(), and basic::T().

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

Dynamic cast an access_ptr.

References basic::T().

template<typename T , typename U >
owning_ptr< T > utility::pointer::dynamic_pointer_cast ( owning_ptr< U > const &  a)
inline

Dynamic cast an owning_ptr.

References basic::T().

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

Get pointer of access_ptr: needed by boost::mem_fn.

template<typename T >
T* utility::pointer::get_pointer ( owning_ptr< T > const &  a)
inline

Get pointer of owning_ptr: needed by boost::mem_fn.

template<typename T , typename U >
bool utility::pointer::operator!= ( access_ptr< T > const &  a,
access_ptr< U > const &  b 
)
inline
template<typename T >
bool utility::pointer::operator!= ( access_ptr< T > const &  a,
T const *const  b 
)
inline

access_ptr != pointer

template<typename T >
bool utility::pointer::operator!= ( T const *const  a,
access_ptr< T > const &  b 
)
inline

pointer != access_ptr

template<typename T , typename U >
bool utility::pointer::operator!= ( owning_ptr< T > const &  a,
owning_ptr< U > const &  b 
)
inline
template<typename T >
bool utility::pointer::operator!= ( owning_ptr< T > const &  a,
T const *const  b 
)
inline

owning_ptr != pointer

template<typename T >
bool utility::pointer::operator!= ( T const *const  a,
owning_ptr< T > const &  b 
)
inline

pointer != owning_ptr

template<typename T , typename U >
bool utility::pointer::operator< ( access_ptr< T > const &  a,
access_ptr< U > const &  b 
)
inline
template<typename T >
bool utility::pointer::operator< ( access_ptr< T > const &  a,
T const *const  b 
)
inline

access_ptr < pointer

template<typename T >
bool utility::pointer::operator< ( T const *const  a,
access_ptr< T > const &  b 
)
inline

pointer < access_ptr

template<typename T , typename U >
bool utility::pointer::operator< ( owning_ptr< T > const &  a,
owning_ptr< U > const &  b 
)
inline
template<typename T >
bool utility::pointer::operator< ( owning_ptr< T > const &  a,
T const *const  b 
)
inline

owning_ptr < pointer

template<typename T >
bool utility::pointer::operator< ( T const *const  a,
owning_ptr< T > const &  b 
)
inline

pointer < owning_ptr

template<typename CharT , typename CharTraits , typename T >
std::basic_ostream< CharT, CharTraits >& utility::pointer::operator<< ( std::basic_ostream< CharT, CharTraits > &  os,
access_ptr< T > const &  a 
)
inline

Stream output.

template<typename CharT , typename CharTraits , typename T >
std::basic_ostream< CharT, CharTraits >& utility::pointer::operator<< ( std::basic_ostream< CharT, CharTraits > &  os,
owning_ptr< T > const &  a 
)
inline

Stream output.

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

access_ptr == pointer

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

pointer == access_ptr

template<typename T , typename U >
bool utility::pointer::operator== ( owning_ptr< T > const &  a,
owning_ptr< U > const &  b 
)
inline
template<typename T >
bool utility::pointer::operator== ( owning_ptr< T > const &  a,
T const *const  b 
)
inline

owning_ptr == pointer

template<typename T >
bool utility::pointer::operator== ( T const *const  a,
owning_ptr< T > const &  b 
)
inline

pointer == owning_ptr

template<typename T >
void utility::pointer::owning_ptr_acquire ( T *  p)
inline
template<typename T >
void utility::pointer::owning_ptr_release ( T *  p)
inline
template<typename T , typename U >
access_ptr< T > utility::pointer::static_pointer_cast ( access_ptr< U > const &  a)
inline
template<typename T , typename U >
owning_ptr< T > utility::pointer::static_pointer_cast ( owning_ptr< U > const &  a)
inline

Static cast an owning_ptr.

References basic::T().

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

Swap two access_ptr objects.

template<typename T >
void utility::pointer::swap ( owning_ptr< T > &  a,
owning_ptr< T > &  b 
)
inline

Swap two owning_ptr objects.