rippled
Public Member Functions | Private Attributes | List of all members
ripple::CountedObjects::Counter Class Reference

Implementation for CountedObject. More...

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

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

Detailed Description

Implementation for CountedObject.

Definition at line 49 of file CountedObject.h.

Constructor & Destructor Documentation

◆ Counter()

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

Definition at line 52 of file CountedObject.h.

◆ ~Counter()

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

Member Function Documentation

◆ increment()

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

Definition at line 70 of file CountedObject.h.

◆ decrement()

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

Definition at line 76 of file CountedObject.h.

◆ getCount()

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

Definition at line 82 of file CountedObject.h.

◆ getNext()

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

Definition at line 88 of file CountedObject.h.

◆ getName()

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

Definition at line 94 of file CountedObject.h.

Member Data Documentation

◆ name_

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

Definition at line 100 of file CountedObject.h.

◆ count_

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

Definition at line 101 of file CountedObject.h.

◆ next_

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

Definition at line 102 of file CountedObject.h.