Public Member Functions | Private Attributes | List of all members
RTT::os::AtomicInt Class Reference

#include <Atomic.hpp>

Public Member Functions

void add (int i)
 
 AtomicInt (int value=0)
 
 AtomicInt (const AtomicInt &orig)
 
void dec ()
 
bool dec_and_test ()
 
void inc ()
 
bool inc_and_test ()
 
const AtomicIntoperator= (const AtomicInt &orig)
 
int read () const
 
void set (int i)
 
void sub (int i)
 
bool sub_and_test (int i)
 
 ~AtomicInt ()
 

Private Attributes

oro_atomic_t _val
 

Detailed Description

C++ abstraction of atomic integer operations.

Definition at line 49 of file Atomic.hpp.

Constructor & Destructor Documentation

RTT::os::AtomicInt::AtomicInt ( int  value = 0)
inline

Definition at line 53 of file Atomic.hpp.

RTT::os::AtomicInt::AtomicInt ( const AtomicInt orig)
inline

Definition at line 58 of file Atomic.hpp.

RTT::os::AtomicInt::~AtomicInt ( )
inline

Definition at line 63 of file Atomic.hpp.

Member Function Documentation

void RTT::os::AtomicInt::add ( int  i)
inline

Definition at line 84 of file Atomic.hpp.

void RTT::os::AtomicInt::dec ( )
inline

Definition at line 97 of file Atomic.hpp.

bool RTT::os::AtomicInt::dec_and_test ( )
inline

Decrement and test if the result is zero

Returns
true if the atomic is zero after the decrement, and false otherwise

Definition at line 104 of file Atomic.hpp.

void RTT::os::AtomicInt::inc ( )
inline

Definition at line 95 of file Atomic.hpp.

bool RTT::os::AtomicInt::inc_and_test ( )
inline

Increment and test if the result is zero

Returns
true if the atomic is zero after the increment, and false otherwise

Definition at line 111 of file Atomic.hpp.

const AtomicInt& RTT::os::AtomicInt::operator= ( const AtomicInt orig)
inline

Definition at line 68 of file Atomic.hpp.

int RTT::os::AtomicInt::read ( ) const
inline

Read the current value of the integer.

Definition at line 77 of file Atomic.hpp.

void RTT::os::AtomicInt::set ( int  i)
inline

Set the integer to a new value.

Definition at line 82 of file Atomic.hpp.

void RTT::os::AtomicInt::sub ( int  i)
inline

Definition at line 86 of file Atomic.hpp.

bool RTT::os::AtomicInt::sub_and_test ( int  i)
inline

Subtract a value and test if the result is zero

Returns
true if the atomic is zero after the decrement, and false otherwise

Definition at line 93 of file Atomic.hpp.

Member Data Documentation

oro_atomic_t RTT::os::AtomicInt::_val
private

Definition at line 51 of file Atomic.hpp.


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


rtt
Author(s): RTT Developers
autogenerated on Fri Oct 25 2019 03:59:47