blob: 7cddc56764d507d90c0d186a8cc7b4ad1bb40721 (
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
|
// $Id$
#ifndef TAO_NS_CONTAINER_T_CPP
#define TAO_NS_CONTAINER_T_CPP
#include "Container_T.h"
#include "orbsvcs/ESF/ESF_Proxy_Collection.h"
#include "orbsvcs/ESF/ESF_Shutdown_Proxy.h"
#include "Properties.h"
#include "Factory.h"
#include "POA_Helper.h"
#if ! defined (__ACE_INLINE__)
#include "Container_T.inl"
#endif /* __ACE_INLINE__ */
ACE_RCSID(Notify, TAO_NS_Container_T, "$Id$")
template<class TYPE>
TAO_NS_Container_T<TYPE>::TAO_NS_Container_T (void)
: collection_ (0)
{
}
template<class TYPE>
TAO_NS_Container_T<TYPE>::~TAO_NS_Container_T ()
{
delete collection_;
}
template <class TYPE> void
TAO_NS_Container_T<TYPE>::shutdown (ACE_ENV_SINGLE_ARG_DECL)
{
TAO_ESF_Shutdown_Proxy<TYPE> shutdown_worker;
this->collection_->for_each (&shutdown_worker ACE_ENV_ARG_PARAMETER);
}
template<class TYPE> void
TAO_NS_Container_T<TYPE>::insert (TYPE* type ACE_ENV_ARG_DECL)
{
this->collection_->connected (type ACE_ENV_ARG_PARAMETER);
}
template<class TYPE> void
TAO_NS_Container_T<TYPE>::remove (TYPE* type ACE_ENV_ARG_DECL)
{
this->collection_->disconnected (type ACE_ENV_ARG_PARAMETER);
}
template<class TYPE> void
TAO_NS_Container_T<TYPE>::init (ACE_ENV_SINGLE_ARG_DECL)
{
// get the factory
TAO_NS_Factory* factory = TAO_NS_PROPERTIES::instance ()->factory ();
// Init variables
factory->create (this->collection_ ACE_ENV_ARG_PARAMETER);
}
#endif /* TAO_NS_CONTAINER_T_CPP */
|