RAVENNAKIT
Loading...
Searching...
No Matches
rav::CountedObject Class Reference

Little helper class which keeps track of how many instances of this class have been created and how many are still alive. More...

#include <object_counter.hpp>

Public Member Functions

 CountedObject ()=delete
 CountedObject (ObjectCounter &counter)
 ~CountedObject ()
 CountedObject (const CountedObject &)=delete
CountedObject & operator= (const CountedObject &)=delete
 CountedObject (CountedObject &&)=delete
CountedObject & operator= (CountedObject &&)=delete
size_t index () const

Detailed Description

Little helper class which keeps track of how many instances of this class have been created and how many are still alive.

Useful to track object creation and destruction in tests.

Definition at line 42 of file object_counter.hpp.

Constructor & Destructor Documentation

◆ CountedObject() [1/4]

rav::CountedObject::CountedObject ( )
delete

◆ CountedObject() [2/4]

rav::CountedObject::CountedObject ( ObjectCounter & counter)
inlineexplicit

Definition at line 46 of file object_counter.hpp.

◆ ~CountedObject()

rav::CountedObject::~CountedObject ( )
inline

Definition at line 50 of file object_counter.hpp.

◆ CountedObject() [3/4]

rav::CountedObject::CountedObject ( const CountedObject & )
delete

◆ CountedObject() [4/4]

rav::CountedObject::CountedObject ( CountedObject && )
delete

Member Function Documentation

◆ index()

size_t rav::CountedObject::index ( ) const
inlinenodiscard
Returns
The index of the object, which is based on given counter.

Definition at line 64 of file object_counter.hpp.

◆ operator=() [1/2]

CountedObject & rav::CountedObject::operator= ( const CountedObject & )
delete

◆ operator=() [2/2]

CountedObject & rav::CountedObject::operator= ( CountedObject && )
delete

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