blob: 0e7c3617a1f1e317fb136f5f5401ab7df2dc1f7c (
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
#ifndef TAO_Notify_CONTAINER_T_CPP
#define TAO_Notify_CONTAINER_T_CPP
#include "orbsvcs/Notify/Container_T.h"
#include "orbsvcs/Notify/Properties.h"
#include "orbsvcs/Notify/Factory.h"
#include "orbsvcs/Notify/POA_Helper.h"
#include "orbsvcs/ESF/ESF_Proxy_Collection.h"
#include "orbsvcs/ESF/ESF_Shutdown_Proxy.h"
#if ! defined (__ACE_INLINE__)
#include "orbsvcs/Notify/Container_T.inl"
#endif /* __ACE_INLINE__ */
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
template<class TYPE> void
TAO_Notify_Container_T<TYPE>::Destroyer::work (TYPE* type)
{
type->destroy ();
}
template<class TYPE>
TAO_Notify_Container_T<TYPE>::TAO_Notify_Container_T (void)
: collection_ (0)
{
}
template<class TYPE>
TAO_Notify_Container_T<TYPE>::~TAO_Notify_Container_T ()
{
delete collection_;
}
template <class TYPE> void
TAO_Notify_Container_T<TYPE>::shutdown (void)
{
TAO_ESF_Shutdown_Proxy<TYPE> shutdown_worker;
this->collection_->for_each (&shutdown_worker);
}
template <class TYPE> void
TAO_Notify_Container_T<TYPE>::destroy (void)
{
Destroyer destroyer;
this->collection_->for_each (&destroyer);
}
template<class TYPE> void
TAO_Notify_Container_T<TYPE>::insert (TYPE* type)
{
this->collection_->connected (type);
}
template<class TYPE> void
TAO_Notify_Container_T<TYPE>::remove (TYPE* type)
{
this->collection_->disconnected (type);
}
template<class TYPE> void
TAO_Notify_Container_T<TYPE>::init (void)
{
// get the factory
TAO_Notify_Factory* factory = TAO_Notify_PROPERTIES::instance ()->factory ();
// Init variables
factory->create (this->collection_);
}
TAO_END_VERSIONED_NAMESPACE_DECL
#endif /* TAO_Notify_CONTAINER_T_CPP */
|