Regina Calculation Engine
|
A base class for objects of type T to be referenceable by a SafePtr. More...
#include <utilities/safepointeebase.h>
Public Types | |
typedef T | SafePointeeType |
The type of object being pointed to. More... | |
Public Member Functions | |
SafePointeeBase (const SafePointeeBase &)=delete | |
Prevent derived classes from accidentally calling the copy constructor. More... | |
~SafePointeeBase () | |
Destructor. More... | |
SafePointeeBase & | operator= (const SafePointeeBase &)=delete |
Prevent derived classes from accidentally calling the assignment operator. More... | |
Protected Member Functions | |
SafePointeeBase () | |
Default constructor. More... | |
Friends | |
class | detail::SafeRemnant< T > |
A base class for objects of type T to be referenceable by a SafePtr.
Such objects are referred to as pointees of SafePtr.
The class T must derive from SafePointeeBase<T>, and must implement hasOwner() to indicate whether any non-SafePtr claims ownership of it. Details of ownership semantics (and in particular, the requirements for hasOwner()) are explained in the documentation for SafePtr.
The overhead introduced by subclassing from SafePointeeBase without using the features of the accompanying smart pointer SafePtr are minimal: one extra pointer that needs to be zeroed upon construction.
Regina's classes that derive from SafePointeeBase do so to help with python wrapping.
T | the type of object being pointed to. This must derive from SafePointeeBase<T>. |