blob: 96658ed76c5492b3f1c40b00a23d6c978cb0c015 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
/* -*- C++ -*- */
// $Id$
// Implicitly and automatically increment the counter.
template <class ACE_SAFELY_INCREMENTABLE_DECREMENTABLE> ACE_INLINE
ACE_Auto_IncDec<ACE_SAFELY_INCREMENTABLE_DECREMENTABLE>::ACE_Auto_IncDec
(ACE_SAFELY_INCREMENTABLE_DECREMENTABLE &counter)
: counter_ (counter)
{
++this->counter_;
}
// Implicitly and automatically decrement the counter.
template <class ACE_SAFELY_INCREMENTABLE_DECREMENTABLE> ACE_INLINE
ACE_Auto_IncDec<ACE_SAFELY_INCREMENTABLE_DECREMENTABLE>::~ACE_Auto_IncDec (void)
{
--this->counter_;
}
|