Kryptostack
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Private Attributes | List of all members
Counter< T > Class Template Reference

Counter base class. More...

#include <counter.h>

+ Collaboration diagram for Counter< T >:

Public Member Functions

Counter< T > & operator= (const Counter< T > &)=delete
 
 Counter (Counter< T > &&)=delete
 
Counter< T > & operator= (Counter< T > &&)=delete
 

Static Public Member Functions

static int getTotalCounter ()
 Static getter for totaly created objects.
 
static int getAliveCounter ()
 Static getter for objects alive.
 
static int getWatermarkCounter ()
 Static getter for the object counter watermark.
 

Protected Member Functions

 Counter ()
 Ctor.
 
 Counter (const Counter< T > &)
 Copy ctor.
 
 ~Counter ()
 Dtor.
 

Static Private Attributes

static int total_ = 0
 Number of objects created. More...
 
static int alive_ = 0
 Objects currently alive. More...
 
static int watermark_ = 0
 Maximum of objects alive at a point in time.
 

Detailed Description

template<typename T>
class Counter< T >

Counter base class.

Invariant
Can't be instantiated. This is forced by a protected ctor.

Member Data Documentation

◆ alive_

template<typename T >
int Counter< T >::alive_ = 0
staticprivate

Objects currently alive.

Target is to have 0 at programm exit.

◆ total_

template<typename T >
int Counter< T >::total_ = 0
inlinestaticprivate

Number of objects created.

Indented for performance analysis.


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