xrpld
Loading...
Searching...
No Matches
xrpl::CountedObject< Object > Class Template Reference

Tracks the number of instances of an object. More...

#include <CountedObject.h>

Inheritance diagram for xrpl::CountedObject< Object >:

Public Member Functions

 ~CountedObject () noexcept

Public Attributes

friend Object

Private Member Functions

 CountedObject () noexcept
 CountedObject (CountedObject const &) noexcept
CountedObjectoperator= (CountedObject const &) noexcept=default

Static Private Member Functions

static auto & getCounter () noexcept

Detailed Description

template<class Object>
class xrpl::CountedObject< Object >

Tracks the number of instances of an object.

Derived classes have their instances counted automatically. This is used for reporting purposes.

Definition at line 105 of file CountedObject.h.

Constructor & Destructor Documentation

◆ CountedObject() [1/2]

template<class Object>
xrpl::CountedObject< Object >::CountedObject ( )
privatenoexcept

Definition at line 115 of file CountedObject.h.

◆ CountedObject() [2/2]

template<class Object>
xrpl::CountedObject< Object >::CountedObject ( CountedObject< Object > const & )
privatenoexcept

Definition at line 120 of file CountedObject.h.

◆ ~CountedObject()

template<class Object>
xrpl::CountedObject< Object >::~CountedObject ( )
noexcept

Definition at line 129 of file CountedObject.h.

Member Function Documentation

◆ getCounter()

template<class Object>
auto & xrpl::CountedObject< Object >::getCounter ( )
staticprivatenoexcept

Definition at line 109 of file CountedObject.h.

◆ operator=()

template<class Object>
CountedObject & xrpl::CountedObject< Object >::operator= ( CountedObject< Object > const & )
privatedefaultnoexcept

Member Data Documentation

◆ Object

template<class Object>
friend xrpl::CountedObject< Object >::Object

Definition at line 134 of file CountedObject.h.