Public Member Functions | Private Attributes

TAO_Notify_ID_Factory Class Reference

A simple factory for generating ID's for objects created by Notify. More...

#include <ID_Factory.h>

List of all members.

Public Member Functions

 TAO_Notify_ID_Factory (void)
 Constructor.
 ~TAO_Notify_ID_Factory ()
 Destructor.
TAO_Notify_Object::ID id (void)
void set_last_used (const TAO_Notify_Object::ID id)

Private Attributes

TAO_Notify_Object::ID seed_
 Can't use atomic op, because we added the set_last_used() method.
TAO_SYNCH_MUTEX mtx_

Detailed Description

A simple factory for generating ID's for objects created by Notify.

Definition at line 35 of file ID_Factory.h.


Constructor & Destructor Documentation

TAO_Notify_ID_Factory::TAO_Notify_ID_Factory ( void   ) 

Constructor.

Definition at line 13 of file ID_Factory.cpp.

  : seed_ (0)
{
}

TAO_Notify_ID_Factory::~TAO_Notify_ID_Factory (  ) 

Destructor.

Definition at line 18 of file ID_Factory.cpp.

{
}


Member Function Documentation

TAO_Notify_Object::ID TAO_Notify_ID_Factory::id ( void   ) 

Definition at line 8 of file ID_Factory.inl.

{
  ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->mtx_, 0);
  return ++seed_;
}

void TAO_Notify_ID_Factory::set_last_used ( const TAO_Notify_Object::ID  id  ) 

Definition at line 15 of file ID_Factory.inl.

{
  ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mtx_);
  if (this->seed_ < id)
  {
    this->seed_ = id;
  }
}


Member Data Documentation

TAO_SYNCH_MUTEX TAO_Notify_ID_Factory::mtx_ [private]

Definition at line 51 of file ID_Factory.h.

Can't use atomic op, because we added the set_last_used() method.

Definition at line 50 of file ID_Factory.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines