Rosetta 3.3
Classes | Namespaces | Functions
src/utility/pointer/owning_ptr.hh File Reference

Shared-ownership intrusive reference-counted smart pointer. More...

#include <utility/pointer/owning_ptr.fwd.hh>
#include <utility/pointer/owning_ptr.functions.hh>
#include <utility/down_cast.hh>
#include <cassert>
#include <iosfwd>

Classes

class  utility::pointer::owning_ptr< T >
 Shared-ownership intrusive reference-counted smart pointer. More...

Namespaces

namespace  utility
 

unresizable vector whose size is known at compile time, which may be allocated on the stack, and which indexes from 1.


namespace  utility::pointer

Functions

template<typename T , typename U >
bool utility::pointer::operator== (owning_ptr< T > const &a, owning_ptr< U > const &b)
 owning_ptr == owning_ptr
template<typename T >
bool utility::pointer::operator== (owning_ptr< T > const &a, T const *const b)
 owning_ptr == pointer
template<typename T >
bool utility::pointer::operator== (T const *const a, owning_ptr< T > const &b)
 pointer == owning_ptr
template<typename T , typename U >
bool utility::pointer::operator!= (owning_ptr< T > const &a, owning_ptr< U > const &b)
 owning_ptr != owning_ptr
template<typename T >
bool utility::pointer::operator!= (owning_ptr< T > const &a, T const *const b)
 owning_ptr != pointer
template<typename T >
bool utility::pointer::operator!= (T const *const a, owning_ptr< T > const &b)
 pointer != owning_ptr
template<typename T , typename U >
bool utility::pointer::operator< (owning_ptr< T > const &a, owning_ptr< U > const &b)
 owning_ptr < owning_ptr
template<typename T >
bool utility::pointer::operator< (owning_ptr< T > const &a, T const *const b)
 owning_ptr < pointer
template<typename T >
bool utility::pointer::operator< (T const *const a, owning_ptr< T > const &b)
 pointer < owning_ptr
template<typename T >
void utility::pointer::swap (owning_ptr< T > &a, owning_ptr< T > &b)
 Swap two owning_ptr objects.
template<typename T >
T * utility::pointer::get_pointer (owning_ptr< T > const &a)
 Get pointer of owning_ptr: needed by boost::mem_fn.
template<typename T , typename U >
owning_ptr< T > utility::pointer::static_pointer_cast (owning_ptr< U > const &a)
 Static cast an owning_ptr.
template<typename T , typename U >
owning_ptr< T > utility::pointer::const_pointer_cast (owning_ptr< U > const &a)
 Const cast an owning_ptr.
template<typename T , typename U >
owning_ptr< T > utility::pointer::dynamic_pointer_cast (owning_ptr< U > const &a)
 Dynamic cast an owning_ptr.
template<typename T , typename U >
owning_ptr< T > utility::pointer::down_pointer_cast (owning_ptr< U > const &a)
 Down cast an owning_ptr.
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)
 Stream output.

Detailed Description

Shared-ownership intrusive reference-counted smart pointer.

Author:
Stuart G. Mentzer (Stuart_Mentzer@objexx.com)
Remarks:
  • Holds a pointer to an object that owning_ptr owns with other smart pointers using the object's reference counting mechanism.
  • The object type can be const.
  • Can copy construct and assign from pointer, object, or owning_ptr of an assignable type, including from owning_ptr< T > to owning_ptr< T const >.
  • Functions owning_ptr_acquire() and owning_ptr_release() must be defined for all types that will be reference counted.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines