B2BITS FIX Antenna HFT  1.0.16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Utils::ReferenceCounter Class Reference

A generic reference counter. More...

#include <B2BITS_ReferenceCounter.h>

+ Inheritance diagram for Utils::ReferenceCounter:

Public Member Functions

virtual bool addRef () const throw ()
 Increments reference counter. More...
 
long decrement () const throw ()
 
virtual long getNRef () const throw ()
 Returns the current value of the reference counter. More...
 
 ReferenceCounter () throw ()
 Constructor. More...
 
virtual long release () const throw ()
 Decrements reference counter. More...
 

Protected Member Functions

virtual ~ReferenceCounter ()
 Destructor. More...
 

Protected Attributes

volatile System::u32 m_nRef
 The counter. More...
 

Detailed Description

A generic reference counter.

Constructor & Destructor Documentation

Utils::ReferenceCounter::ReferenceCounter ( )
throw (
)

Constructor.

virtual Utils::ReferenceCounter::~ReferenceCounter ( )
protectedvirtual

Destructor.

Member Function Documentation

virtual bool Utils::ReferenceCounter::addRef ( ) const
throw (
)
virtual

Increments reference counter.

Returns
true if the reference counter was incremented, false otherwise.
long Utils::ReferenceCounter::decrement ( ) const
throw (
)
virtual long Utils::ReferenceCounter::getNRef ( ) const
throw (
)
virtual

Returns the current value of the reference counter.

virtual long Utils::ReferenceCounter::release ( ) const
throw (
)
virtual

Decrements reference counter.

If it becomes equal to 0 then calls destructor.

Member Data Documentation

volatile System::u32 Utils::ReferenceCounter::m_nRef
mutableprotected

The counter.