20 #ifndef RIPPLE_BASICS_COUNTEDOBJECT_H_INCLUDED
21 #define RIPPLE_BASICS_COUNTEDOBJECT_H_INCLUDED
109 template <class Object>
115 getCounter().increment();
120 getCounter().increment();
128 getCounter().decrement();
142 return Object::getCountedObjectName();
std::atomic< int > m_count
Tracks the number of instances of an object.
std::atomic< int > m_count
~CountedObject() noexcept
CounterBase * getNext() const noexcept
CountedObjects() noexcept
char const * getName() const override
static CountedObjects & getInstance() noexcept
int getCount() const noexcept
virtual ~CounterBase() noexcept
CountedObject(CountedObject const &) noexcept
Manages all counted object types.
Implementation for CountedObject.
virtual char const * getName() const =0
std::atomic< CounterBase * > m_head
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
virtual void checkPureVirtual() const =0
List getCounts(int minimumThreshold) const
static Counter & getCounter() noexcept
void checkPureVirtual() const override