rippled
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
ripple::CountedObjects::Counter Class Reference

Implementation for CountedObject. More...

#include <CountedObject.h>

Collaboration diagram for ripple::CountedObjects::Counter:
Collaboration graph
[legend]

Public Member Functions

 Counter (std::string name) noexcept
 
 ~Counter () noexcept=default
 
int increment () noexcept
 
int decrement () noexcept
 
int getCount () const noexcept
 
CountergetNext () const noexcept
 
std::string const & getName () const noexcept
 

Private Attributes

std::string const name_
 
std::atomic< int > count_
 
Counternext_
 

Detailed Description

Implementation for CountedObject.

Definition at line 31 of file CountedObject.h.

Constructor & Destructor Documentation

◆ Counter()

ripple::CountedObjects::Counter::Counter ( std::string  name)
noexcept

Definition at line 34 of file CountedObject.h.

◆ ~Counter()

ripple::CountedObjects::Counter::~Counter ( )
defaultnoexcept

Member Function Documentation

◆ increment()

int ripple::CountedObjects::Counter::increment ( )
noexcept

Definition at line 52 of file CountedObject.h.

◆ decrement()

int ripple::CountedObjects::Counter::decrement ( )
noexcept

Definition at line 58 of file CountedObject.h.

◆ getCount()

int ripple::CountedObjects::Counter::getCount ( ) const
noexcept

Definition at line 64 of file CountedObject.h.

◆ getNext()

Counter * ripple::CountedObjects::Counter::getNext ( ) const
noexcept

Definition at line 70 of file CountedObject.h.

◆ getName()

std::string const & ripple::CountedObjects::Counter::getName ( ) const
noexcept

Definition at line 76 of file CountedObject.h.

Member Data Documentation

◆ name_

std::string const ripple::CountedObjects::Counter::name_
private

Definition at line 82 of file CountedObject.h.

◆ count_

std::atomic<int> ripple::CountedObjects::Counter::count_
private

Definition at line 83 of file CountedObject.h.

◆ next_

Counter* ripple::CountedObjects::Counter::next_
private

Definition at line 84 of file CountedObject.h.