TAO::Null_RefCount_Policy Class Reference

No-op reference counting policy. More...

#include <Null_RefCount_Policy.h>

Inheritance diagram for TAO::Null_RefCount_Policy:

Inheritance graph
[legend]
List of all members.

Public Member Functions

void add_ref (void)
 No-op reference increment.

void remove_ref (void)
 No-op reference decrement.


Detailed Description

No-op reference counting policy.

This class is intended to be used as a "policy" argument to a host class template that implements no-op reference counting. That class would then inherit privately from it like so:

template <class RefCountPolicy> class MyHostClass : private RefCountPolicy { public: void my_add_ref (void) { this->RefCountPolicy::add_ref (); } void my_remove_ref (void) { this->RefCountPolicy::remove_ref (); } };

and use it like so:

typedef MyHostClass<TAO::Null_RefCount_Policy> MyNonRefCountedClass; MyNonRefCountedClass m; ...

Note:
In order to incur no size overhead on the host class due to virtual tables, no base class defining an interface is defined. This allows C++ compilers to apply the Empty Base Class Optimization.

Definition at line 66 of file Null_RefCount_Policy.h.


Member Function Documentation

void TAO::Null_RefCount_Policy::add_ref void   )  [inline]
 

No-op reference increment.

Definition at line 71 of file Null_RefCount_Policy.h.

00071 { }

void TAO::Null_RefCount_Policy::remove_ref void   )  [inline]
 

No-op reference decrement.

Definition at line 74 of file Null_RefCount_Policy.h.

00074 { }


The documentation for this class was generated from the following file:
Generated on Sun Jan 27 13:22:08 2008 for TAO_AnyTypeCode by doxygen 1.3.6