ACE 8.0.1
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Attributes | Private Member Functions | List of all members
ACE_Auto_IncDec< ACE_SAFELY_INCREMENTABLE_DECREMENTABLE > Class Template Reference

This class automatically increments and decrements a parameterized counter. More...

#include <Auto_IncDec_T.h>

Public Member Functions

 ACE_Auto_IncDec (ACE_SAFELY_INCREMENTABLE_DECREMENTABLE &counter)
 Implicitly increment the counter.
 
 ~ACE_Auto_IncDec ()
 Implicitly decrement the counter.
 
void dump () const
 Dump the state of an object.
 

Public Attributes

 ACE_ALLOC_HOOK_DECLARE
 Declare the dynamic allocation hooks.
 

Protected Attributes

ACE_SAFELY_INCREMENTABLE_DECREMENTABLEcounter_
 

Private Member Functions

void operator= (const ACE_Auto_IncDec< ACE_SAFELY_INCREMENTABLE_DECREMENTABLE > &)=delete
 
 ACE_Auto_IncDec (const ACE_Auto_IncDec< ACE_SAFELY_INCREMENTABLE_DECREMENTABLE > &)=delete
 

Detailed Description

template<class ACE_SAFELY_INCREMENTABLE_DECREMENTABLE>
class ACE_Auto_IncDec< ACE_SAFELY_INCREMENTABLE_DECREMENTABLE >

This class automatically increments and decrements a parameterized counter.

This data structure is meant to be used within a method, function, or scope. The actual parameter given for the ACE_SAFELY_INCREMENTABLE_DECREMENTABLE template parameter must provide at least operators ++ and –.

Constructor & Destructor Documentation

◆ ACE_Auto_IncDec() [1/2]

Implicitly increment the counter.

◆ ~ACE_Auto_IncDec()

Implicitly decrement the counter.

◆ ACE_Auto_IncDec() [2/2]

Member Function Documentation

◆ dump()

Dump the state of an object.

◆ operator=()

Member Data Documentation

◆ ACE_ALLOC_HOOK_DECLARE

Declare the dynamic allocation hooks.

◆ counter_

Reference to the ACE_SAFELY_INCREMENTABLE_DECREMENTABLE counter we're incrementing/decrementing.


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