ROSE  0.9.9.123
Public Member Functions | List of all members
Sawyer::SharedObject Class Reference

Description

Base class for reference counted objects.

Any reference counted object should inherit from this class, which provides a default constructor, virtual destructor, and a private reference count data member.

See also
SharedPointer, SharedFromThis

Definition at line 22 of file SharedObject.h.

#include <SharedObject.h>

Inheritance diagram for Sawyer::SharedObject:
Inheritance graph
[legend]

Public Member Functions

 SharedObject ()
 Default constructor. More...
 
 SharedObject (const SharedObject &)
 Copy constructor. More...
 
virtual ~SharedObject ()
 Virtual destructor. More...
 
SharedObjectoperator= (const SharedObject &)
 Assignment. More...
 

Constructor & Destructor Documentation

Sawyer::SharedObject::SharedObject ( )
inline

Default constructor.

Initializes the reference count to zero.

Definition at line 28 of file SharedObject.h.

Sawyer::SharedObject::SharedObject ( const SharedObject )
inline

Copy constructor.

Shared objects are not typically copy-constructed, but we must support it anyway in case the user wants to copy-construct some shared object. The new object has a ref-count of zero.

Definition at line 34 of file SharedObject.h.

virtual Sawyer::SharedObject::~SharedObject ( )
inlinevirtual

Virtual destructor.

Verifies that the reference count is zero.

Definition at line 37 of file SharedObject.h.

Member Function Documentation

SharedObject& Sawyer::SharedObject::operator= ( const SharedObject )
inline

Assignment.

Assigning one object to another doesn't change the reference count or mutex of either object.

Definition at line 44 of file SharedObject.h.


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