Reference-counting helpers - Disable copy/move cons/ass in base class
This commit is contained in:
parent
6afe127d13
commit
270da6492a
1 changed files with 12 additions and 0 deletions
|
@ -40,10 +40,22 @@ class T_ReferenceCountedClass
|
|||
bool decreaseReferences_( ) noexcept;
|
||||
|
||||
protected:
|
||||
// Initialise the counter to 0
|
||||
T_ReferenceCountedClass( ) noexcept;
|
||||
|
||||
public:
|
||||
// Get the reference count
|
||||
uint32_t getReferenceCount( ) const noexcept;
|
||||
|
||||
// Deleted copy/move constructors and assignment operators
|
||||
T_ReferenceCountedClass(
|
||||
T_ReferenceCountedClass< UseAtomic > const& ) = delete;
|
||||
T_ReferenceCountedClass< UseAtomic >& operator =(
|
||||
T_ReferenceCountedClass< UseAtomic > const& ) = delete;
|
||||
T_ReferenceCountedClass(
|
||||
T_ReferenceCountedClass< UseAtomic >&& ) = delete;
|
||||
T_ReferenceCountedClass< UseAtomic >& operator =(
|
||||
T_ReferenceCountedClass< UseAtomic >&& ) = delete;
|
||||
};
|
||||
|
||||
// Shortcuts
|
||||
|
|
Loading…
Reference in a new issue