mi::base::Atom32 Class Reference
[Multithreading Support]
Description
A 32-bit unsigned counter with atomic arithmetic, increments, and decrements.
Public Constructors
- Atom32()
- The default constructor initializes the counter to zero.
- Atom32( const Uint32 value)
- This constructor initializes the counter to value.
- Atom32( const Atom32& other)
- The copy constructor assigns the value of other to the counter.
Public Member Functions
- operator Uint32() const
- Conversion operator to mi::Uint32.
- Uint32 operator++()
- Increments the counter by one (pre-increment).
- Uint32 operator++( int )
- Increments the counter by one (post-increment).
- Uint32 operator+=( const Uint32 rhs)
- Adds rhs to the counter.
- Uint32 operator--()
- Decrements the counter by one (pre-decrement).
- Uint32 operator--( int )
- Decrements the counter by one (post-decrement).
- Uint32 operator-=( const Uint32 rhs)
- Subtracts rhs from the counter.
- Atom32& operator=( const Atom32& rhs)
- Assigns the value of rhs to the counter.
- Uint32 operator=( const Uint32 rhs)
- Assigns rhs to the counter.
- Uint32 swap( const Uint32 rhs)
- Assigns rhs to the counter and returns the old value of counter.
Constructors
- mi::base::Atom32::Atom32() [inline]
-
The default constructor initializes the counter to zero.
- mi::base::Atom32::Atom32( const Uint32 value) [inline]
-
This constructor initializes the counter to value.
- mi::base::Atom32::Atom32( const Atom32& other)
-
The copy constructor assigns the value of other to the counter.
Member Functions
- mi::base::Atom32::operator Uint32() const [inline]
-
Conversion operator to mi::Uint32.
- Uint32 mi::base::Atom32::operator++()
-
Increments the counter by one (pre-increment).
- Uint32 mi::base::Atom32::operator++( int )
-
Increments the counter by one (post-increment).
- Uint32 mi::base::Atom32::operator+=( const Uint32 rhs)
-
Adds rhs to the counter.
- Uint32 mi::base::Atom32::operator--()
-
Decrements the counter by one (pre-decrement).
- Uint32 mi::base::Atom32::operator--( int )
-
Decrements the counter by one (post-decrement).
- Uint32 mi::base::Atom32::operator-=( const Uint32 rhs)
-
Subtracts rhs from the counter.
- Atom32& mi::base::Atom32::operator=( const Atom32& rhs)
-
Assigns the value of rhs to the counter.
- Uint32 mi::base::Atom32::operator=( const Uint32 rhs) [inline]
-
Assigns rhs to the counter.
- Uint32 mi::base::Atom32::swap( const Uint32 rhs)
-
Assigns rhs to the counter and returns the old value of counter.