summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/Notify/Event_Map_Entry_T.cpp
blob: 5488c3ad42014061e5923eb9635e28af65dd259d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
// $Id$

#ifndef TAO_Notify_EVENT_MAP_ENTRY_CPP
#define TAO_Notify_EVENT_MAP_ENTRY_CPP

#include "orbsvcs/Notify/Event_Map_Entry_T.h"

#if ! defined (__ACE_INLINE__)
#include "orbsvcs/Notify/Event_Map_Entry_T.inl"
#endif /* __ACE_INLINE__ */

ACE_RCSID (Notify, 
           TAO_Notify_Event_Map_Entry_T, 
           "$Id$")

#include "orbsvcs/ESF/ESF_Proxy_Collection.h"
#include "orbsvcs/Notify/Properties.h"
#include "orbsvcs/Notify/Factory.h"

TAO_BEGIN_VERSIONED_NAMESPACE_DECL

template <class PROXY>
TAO_Notify_Event_Map_Entry_T<PROXY>::TAO_Notify_Event_Map_Entry_T (void)
  : collection_ (0), count_ (0), usage_count_ (1)
{
}

template <class PROXY>
TAO_Notify_Event_Map_Entry_T<PROXY>::~TAO_Notify_Event_Map_Entry_T ()
{
  delete collection_;
}

template <class PROXY> void
TAO_Notify_Event_Map_Entry_T<PROXY>::init (ACE_ENV_SINGLE_ARG_DECL)
{
  TAO_Notify_Factory* factory = TAO_Notify_PROPERTIES::instance ()->factory ();

  factory->create (collection_ ACE_ENV_ARG_PARAMETER);
}

template <class PROXY> void
TAO_Notify_Event_Map_Entry_T<PROXY>::connected (PROXY* proxy ACE_ENV_ARG_DECL)
{
  this->collection_->connected (proxy ACE_ENV_ARG_PARAMETER);
  ++count_;
}

template <class PROXY> void
TAO_Notify_Event_Map_Entry_T<PROXY>::disconnected (PROXY* proxy ACE_ENV_ARG_DECL)
{
  this->collection_->disconnected (proxy ACE_ENV_ARG_PARAMETER);
  --count_;
}

TAO_END_VERSIONED_NAMESPACE_DECL

#endif /* TAO_Notify_EVENT_MAP_ENTRY_CPP */