Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

CORBA_DefaultValueRefCountBase Class Reference

Default mix-in for reference count of a valuetype. More...

#include <ValueBase.h>

Inheritance diagram for CORBA_DefaultValueRefCountBase:

Inheritance graph
[legend]
Collaboration diagram for CORBA_DefaultValueRefCountBase:

Collaboration graph
[legend]
List of all members.

Public Methods

virtual void _add_ref (void)
 %! virtual CORBA::ValueBase* _copy_value (void) = 0;. More...

virtual void _remove_ref (void)
virtual CORBA::ULong _refcount_value (void)
void _tao_add_ref (void)
 The _tao variants are inline for fast access from T_var (if valuetype T is compiled with optimization for that.) %! (todo). More...

void _tao_remove_ref (void)
CORBA::ULong _tao_refcount_value (void)

Protected Methods

 CORBA_DefaultValueRefCountBase (void)
 CORBA_DefaultValueRefCountBase (const CORBA_DefaultValueRefCountBase &)
virtual ~CORBA_DefaultValueRefCountBase ()

Private Methods

void operator= (const CORBA_DefaultValueRefCountBase &)

Private Attributes

CORBA::ULong _tao_reference_count_
TAO_SYNCH_MUTEX _tao_reference_count_lock_

Detailed Description

Default mix-in for reference count of a valuetype.

Definition at line 158 of file ValueBase.h.


Constructor & Destructor Documentation

ACE_INLINE CORBA_DefaultValueRefCountBase::CORBA_DefaultValueRefCountBase void    [protected]
 

Definition at line 200 of file ValueBase.i.

00201     : _tao_reference_count_ (1)
00202 {
00203 }

CORBA_DefaultValueRefCountBase::CORBA_DefaultValueRefCountBase const CORBA_DefaultValueRefCountBase &    [protected]
 

CORBA_DefaultValueRefCountBase::~CORBA_DefaultValueRefCountBase   [protected, virtual]
 

Definition at line 294 of file ValueBase.cpp.

00295 {
00296 }


Member Function Documentation

void CORBA_DefaultValueRefCountBase::_add_ref void    [virtual]
 

%! virtual CORBA::ValueBase* _copy_value (void) = 0;.

Implements CORBA_ValueBase.

Definition at line 299 of file ValueBase.cpp.

References _tao_add_ref.

00300 {
00301   this->_tao_add_ref ();
00302 }

CORBA::ULong CORBA_DefaultValueRefCountBase::_refcount_value void    [virtual]
 

Implements CORBA_ValueBase.

Definition at line 311 of file ValueBase.cpp.

References _tao_refcount_value.

00312 {
00313   return this->_tao_refcount_value ();
00314 }

void CORBA_DefaultValueRefCountBase::_remove_ref void    [virtual]
 

Implements CORBA_ValueBase.

Definition at line 305 of file ValueBase.cpp.

References _tao_remove_ref.

00306 {
00307   this->_tao_remove_ref ();
00308 }

ACE_INLINE void CORBA_DefaultValueRefCountBase::_tao_add_ref void   
 

The _tao variants are inline for fast access from T_var (if valuetype T is compiled with optimization for that.) %! (todo).

Definition at line 207 of file ValueBase.i.

References _tao_reference_count_, ACE_GUARD, and TAO_SYNCH_MUTEX.

Referenced by _add_ref.

00208 {
00209   ACE_GUARD (TAO_SYNCH_MUTEX, guard, this->_tao_reference_count_lock_);
00210   ++_tao_reference_count_;
00211 }

ACE_INLINE CORBA::ULong CORBA_DefaultValueRefCountBase::_tao_refcount_value void   
 

Definition at line 229 of file ValueBase.i.

References _tao_reference_count_, ACE_GUARD_RETURN, and TAO_SYNCH_MUTEX.

Referenced by _refcount_value.

00230 {
00231   ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, guard, this->_tao_reference_count_lock_,0);
00232   return _tao_reference_count_;
00233 }

ACE_INLINE void CORBA_DefaultValueRefCountBase::_tao_remove_ref void   
 

Definition at line 214 of file ValueBase.i.

References _tao_reference_count_, ACE_GUARD, and TAO_SYNCH_MUTEX.

Referenced by _remove_ref.

00215 {
00216   {
00217     ACE_GUARD (TAO_SYNCH_MUTEX, guard, this->_tao_reference_count_lock_);
00218     -- this->_tao_reference_count_;
00219     if (this->_tao_reference_count_ != 0)
00220       return;
00221   }
00222   // The guard has been already given up, but this is no problem
00223   // cause we have held the last reference, and this one we don't give
00224   // away anymore, we do:
00225   delete this;
00226 }

void CORBA_DefaultValueRefCountBase::operator= const CORBA_DefaultValueRefCountBase &    [private]
 


Member Data Documentation

CORBA::ULong CORBA_DefaultValueRefCountBase::_tao_reference_count_ [private]
 

Definition at line 181 of file ValueBase.h.

Referenced by _tao_add_ref, _tao_refcount_value, and _tao_remove_ref.

TAO_SYNCH_MUTEX CORBA_DefaultValueRefCountBase::_tao_reference_count_lock_ [private]
 

Definition at line 182 of file ValueBase.h.


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 14:57:38 2003 for TAO by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002