osl::AtomicCounter Class Reference

`#include <atomicCounter.h>`

## Public Types

typedef IncrementLock< AtomicCounter > | IncLock

## Public Member Functions

| AtomicCounter (int count_=0)
void | inc ()
void | inc (int value)
int | valueAndinc ()
void | dec ()
void | max (int val)
int | value () const
void | setValue (int value)

## Private Attributes

std::atomic< int > | count

## Detailed Description

Definition at line 29 of file atomicCounter.h.

## Member Typedef Documentation

## IncLock

typedef IncrementLock<AtomicCounter> osl::misc::AtomicCounter::IncLock

Definition at line 61 of file atomicCounter.h.

## Constructor & Destructor Documentation

## AtomicCounter()

osl::misc::AtomicCounter::AtomicCounter | ( | int | count_ = 0 | ) |

inline explicit

Definition at line 33 of file atomicCounter.h.

## Member Function Documentation

## dec()

void osl::misc::AtomicCounter::dec | ( |  | ) |

inline

Definition at line 45 of file atomicCounter.h.

## inc() [1/2]

void osl::misc::AtomicCounter::inc | ( |  | ) |

inline

Definition at line 36 of file atomicCounter.h.

## inc() [2/2]

void osl::misc::AtomicCounter::inc | ( | int | value | ) |

inline

Definition at line 39 of file atomicCounter.h.

## max()

void osl::misc::AtomicCounter::max | ( | int | val | ) |

inline

Definition at line 48 of file atomicCounter.h.

## setValue()

void osl::misc::AtomicCounter::setValue | ( | int | value | ) |

inline

Definition at line 58 of file atomicCounter.h.

## value()

int osl::misc::AtomicCounter::value | ( |  | ) | const

inline

Definition at line 55 of file atomicCounter.h.

## valueAndinc()

int osl::misc::AtomicCounter::valueAndinc | ( |  | ) |

inline

Definition at line 42 of file atomicCounter.h.

## Member Data Documentation

## count

std::atomic<int> osl::misc::AtomicCounter::count

private

Definition at line 31 of file atomicCounter.h.

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

- atomicCounter.h