Rosetta Utilities  2014.35
Public Types | Public Member Functions | Protected Member Functions | Friends | List of all members
utility::pointer::ReferenceCountMI Class Referenceabstract

Interface class for reference counted polymorphic classes. More...

#include <ReferenceCountMI.hh>

Public Types

typedef platform::Size Size
 
typedef platform::Size size_type
 

Public Member Functions

virtual ~ReferenceCountMI ()
 Destructor. More...
 
virtual Size ref_count () const =0
 Reference count. More...
 

Protected Member Functions

 ReferenceCountMI ()
 Default constructor. More...
 
 ReferenceCountMI (ReferenceCountMI const &)
 Copy constructor. More...
 
ReferenceCountMIoperator= (ReferenceCountMI const &)
 Copy assignment. More...
 
virtual void add_ref () const =0
 Add a reference: Increment the count. More...
 
virtual void remove_ref () const =0
 Remove a reference: Decrement the count: Self-destruct if count hits zero. More...
 

Friends

template<typename T >
void owning_ptr_acquire (T *)
 Add a reference to the object acquired by an owning_ptr. More...
 
template<typename T >
void owning_ptr_release (T *)
 Remove a reference from the object released by an owning_ptr. More...
 

Detailed Description

Interface class for reference counted polymorphic classes.

Member Typedef Documentation

Constructor & Destructor Documentation

utility::pointer::ReferenceCountMI::ReferenceCountMI ( )
inlineprotected

Default constructor.

utility::pointer::ReferenceCountMI::ReferenceCountMI ( ReferenceCountMI const &  )
inlineprotected

Copy constructor.

virtual utility::pointer::ReferenceCountMI::~ReferenceCountMI ( )
inlinevirtual

Destructor.

Member Function Documentation

virtual void utility::pointer::ReferenceCountMI::add_ref ( ) const
protectedpure virtual

Add a reference: Increment the count.

Implemented in utility::pointer::ReferenceCountMI_.

ReferenceCountMI& utility::pointer::ReferenceCountMI::operator= ( ReferenceCountMI const &  )
inlineprotected

Copy assignment.

virtual Size utility::pointer::ReferenceCountMI::ref_count ( ) const
pure virtual

Reference count.

Implemented in utility::pointer::ReferenceCountMI_.

virtual void utility::pointer::ReferenceCountMI::remove_ref ( ) const
protectedpure virtual

Remove a reference: Decrement the count: Self-destruct if count hits zero.

Implemented in utility::pointer::ReferenceCountMI_.

Friends And Related Function Documentation

template<typename T >
void owning_ptr_acquire ( T *  p)
friend

Add a reference to the object acquired by an owning_ptr.

template<typename T >
void owning_ptr_release ( T *  p)
friend

Remove a reference from the object released by an owning_ptr.


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