Public Member Functions | Private Member Functions | Private Attributes
FIX::atomic_count Class Reference

Atomic count class - consider using interlocked functions. More...

#include <AtomicCount.h>

Collaboration diagram for FIX::atomic_count:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 atomic_count (long v)
long operator++ ()
long operator-- ()
 operator long () const

Private Member Functions

 atomic_count (atomic_count const &)
atomic_countoperator= (atomic_count const &)

Private Attributes

Mutex m_mutex
long m_counter

Detailed Description

Atomic count class - consider using interlocked functions.

Definition at line 71 of file AtomicCount.h.


Constructor & Destructor Documentation

FIX::atomic_count::atomic_count ( long  v) [inline, explicit]

Definition at line 74 of file AtomicCount.h.

                                   : m_counter( v )
    {
    }

Member Function Documentation

FIX::atomic_count::operator long ( ) const [inline]

Definition at line 90 of file AtomicCount.h.

References m_counter.

    {
      return static_cast<long const volatile &>( m_counter );
    }
long FIX::atomic_count::operator++ ( ) [inline]

Definition at line 78 of file AtomicCount.h.

References m_counter, and m_mutex.

    {
      Locker _lock(m_mutex);
      return ++m_counter;
    }
long FIX::atomic_count::operator-- ( ) [inline]

Definition at line 84 of file AtomicCount.h.

References m_counter, and m_mutex.

    {
      Locker _lock(m_mutex);
      return --m_counter;
    }
atomic_count& FIX::atomic_count::operator= ( atomic_count const &  ) [private]

Member Data Documentation

Definition at line 101 of file AtomicCount.h.

Referenced by operator long(), operator++(), and operator--().

Definition at line 100 of file AtomicCount.h.

Referenced by operator++(), and operator--().


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

Generated on Mon Jun 23 2014 23:49:39 for QuickFIX by doxygen 1.7.6.1 written by Dimitri van Heesch, © 1997-2001