Shared counter.
More...
#include <JSharedCounter.hh>
Shared counter.
Definition at line 19 of file JSharedCounter.hh.
◆ JSharedCounter()
JLANG::JSharedCounter::JSharedCounter |
( |
| ) |
|
|
inline |
◆ initialise()
void JLANG::JSharedCounter::initialise |
( |
| ) |
|
|
inline |
◆ attach()
Attach this counter to given shared counter object.
- Parameters
-
Definition at line 46 of file JSharedCounter.hh.
47 {
49
51
53 ++(*counter);
54 }
55 }
◆ detach()
bool JLANG::JSharedCounter::detach |
( |
| ) |
|
|
inline |
Detach.
- Returns
- true if counter at zero; else false
Definition at line 63 of file JSharedCounter.hh.
64 {
66
68
70
72
73 return true;
74 }
75
77 }
78
79 return false;
80 }
◆ getCount()
const int JLANG::JSharedCounter::getCount |
( |
| ) |
|
|
inline |
◆ counter
int* JLANG::JSharedCounter::counter |
|
protected |
The documentation for this class was generated from the following file: