Event_Map_Entry_T.h

Go to the documentation of this file.
00001 /* -*- C++ -*- */
00002 /**
00003  *  @file Event_Map_Entry_T.h
00004  *
00005  *  Event_Map_Entry_T.h,v 1.12 2006/03/14 06:14:34 jtc Exp
00006  *
00007  *  @author Pradeep Gore <pradeep@oomworks.com>
00008  *
00009  *
00010  */
00011 
00012 #ifndef TAO_Notify_EVENT_MAP_ENTRY_T_H
00013 #define TAO_Notify_EVENT_MAP_ENTRY_T_H
00014 
00015 #include /**/ "ace/pre.h"
00016 
00017 #include "orbsvcs/Notify/notify_serv_export.h"
00018 
00019 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00020 # pragma once
00021 #endif /* ACE_LACKS_PRAGMA_ONCE */
00022 
00023 #include "ace/Copy_Disabled.h"
00024 #include "ace/Atomic_Op.h"
00025 #include "ace/CORBA_macros.h"
00026 #include "tao/ORB_Constants.h"
00027 #include "tao/orbconf.h"
00028 
00029 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00030 
00031 template <class PROXY, class ACE_LOCK> class TAO_Notify_Event_Map_T;
00032 template <class PROXY> class TAO_ESF_Proxy_Collection;
00033 
00034 /**
00035  * @class TAO_Notify_Event_Map_Entry_T
00036  *
00037  * @brief The entry stored in the event map.
00038  *
00039  */
00040 template <class PROXY>
00041 class TAO_Notify_Event_Map_Entry_T : private ACE_Copy_Disabled
00042 {
00043 public:
00044   typedef TAO_ESF_Proxy_Collection<PROXY> COLLECTION;
00045 
00046   /// Constructor
00047   TAO_Notify_Event_Map_Entry_T (void);
00048 
00049   /// Destructor
00050   ~TAO_Notify_Event_Map_Entry_T (void);
00051 
00052   /// Init - Allocates collection
00053   void init (ACE_ENV_SINGLE_ARG_DECL);
00054 
00055   /// Connect
00056   void connected (PROXY* proxy ACE_ENV_ARG_DECL);
00057 
00058   /// Disconnect
00059   void disconnected (PROXY* proxy ACE_ENV_ARG_DECL);
00060 
00061   /// Collection accessor
00062   COLLECTION* collection (void);
00063 
00064   /// Count accessor
00065   int count (void);
00066 
00067   ///= Reference counting methods.
00068   // Incr the ref count.
00069   CORBA::ULong _incr_refcnt (void);
00070 
00071   // Decr the ref count. This object is destroyed when the count is 0.
00072   CORBA::ULong _decr_refcnt (void);
00073 
00074 protected:
00075   /// The Collection
00076   COLLECTION* collection_;
00077 
00078   /// Count of PROXY's connected in the collection;
00079   int count_;
00080 
00081   /// Count of users accessing this entry.
00082   ACE_Atomic_Op<TAO_SYNCH_MUTEX,int> usage_count_;
00083 };
00084 
00085 TAO_END_VERSIONED_NAMESPACE_DECL
00086 
00087 #if defined (__ACE_INLINE__)
00088 #include "orbsvcs/Notify/Event_Map_Entry_T.inl"
00089 #endif /* __ACE_INLINE__ */
00090 
00091 #if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
00092 #include "orbsvcs/Notify/Event_Map_Entry_T.cpp"
00093 #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
00094 
00095 #if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
00096 #pragma implementation ("Event_Map_Entry_T.cpp")
00097 #endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
00098 
00099 #include /**/ "ace/post.h"
00100 
00101 #endif /* TAO_Notify_EVENT_MAP_ENTRY_T_H */

Generated on Thu Nov 9 13:24:10 2006 for TAO_CosNotification by doxygen 1.3.6