~ubuntu-branches/ubuntu/breezy/ace/breezy

« back to all changes in this revision

Viewing changes to TAO/orbsvcs/orbsvcs/Notify/Admin.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad, Benjamin Montgomery, Adam Conrad
  • Date: 2005-09-18 22:51:38 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 sarge) (0.1.2 woody)
  • Revision ID: james.westby@ubuntu.com-20050918225138-seav22q6fyylb536
Tags: 5.4.7-3ubuntu1
[ Benjamin Montgomery ]
* Added a patch for amd64 and powerpc that disables the compiler
  option -fvisibility-inlines-hidden

[ Adam Conrad ]
* Added DPATCH_OPTION_CPP=1 to debian/patches/00options to make
  Benjamin's above changes work correctly with dpatch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// Admin.cpp,v 1.6 2003/10/28 18:34:23 bala Exp
2
 
#include "Admin.h"
3
 
 
4
 
#if ! defined (__ACE_INLINE__)
5
 
#include "Admin.inl"
6
 
#endif /* __ACE_INLINE__ */
7
 
 
8
 
ACE_RCSID (Notify, 
9
 
           TAO_Notify_Admin, 
10
 
           "Admin.cpp,v 1.6 2003/10/28 18:34:23 bala Exp")
11
 
 
12
 
#include "orbsvcs/CosNotifyChannelAdminC.h"
13
 
 
14
 
#include "Container_T.h"
15
 
#include "Proxy.h"
16
 
#include "EventChannel.h"
17
 
 
18
 
TAO_Notify_Admin::TAO_Notify_Admin (void)
19
 
  : ec_ (0)
20
 
  , proxy_container_ (0)
21
 
  , filter_operator_ (CosNotifyChannelAdmin::OR_OP)
22
 
{
23
 
  // Initialize all Admin objects to initially be subscribed for all events.
24
 
  // This is a reasonable default and is required to allow Cos Event consumers/suppliers to send/receive events,
25
 
  this->subscribed_types_.insert (TAO_Notify_EventType::special ());
26
 
}
27
 
 
28
 
TAO_Notify_Admin::~TAO_Notify_Admin ()
29
 
{
30
 
  this->ec_->_decr_refcnt ();
31
 
}
32
 
 
33
 
void
34
 
TAO_Notify_Admin::init (TAO_Notify_EventChannel *ec ACE_ENV_ARG_DECL)
35
 
{
36
 
  this->ec_ = ec;
37
 
 
38
 
  this->ec_->_incr_refcnt ();
39
 
 
40
 
  this->TAO_Notify_Object::init (ec);
41
 
 
42
 
  ACE_NEW_THROW_EX (this->proxy_container_,
43
 
                    TAO_Notify_Proxy_Container (),
44
 
                    CORBA::INTERNAL ());
45
 
  ACE_CHECK;
46
 
 
47
 
  this->proxy_container_->init (ACE_ENV_SINGLE_ARG_PARAMETER);
48
 
  ACE_CHECK;
49
 
 
50
 
}
51
 
 
52
 
void
53
 
TAO_Notify_Admin::remove (TAO_Notify_Proxy* proxy ACE_ENV_ARG_DECL)
54
 
{
55
 
  this->proxy_container_->remove (proxy ACE_ENV_ARG_PARAMETER);
56
 
  ACE_CHECK;
57
 
}
58
 
 
59
 
void
60
 
TAO_Notify_Admin::subscribed_types (TAO_Notify_EventTypeSeq& subscribed_types ACE_ENV_ARG_DECL)
61
 
{
62
 
  ACE_GUARD_THROW_EX (TAO_SYNCH_MUTEX, ace_mon, this->lock_,
63
 
                      CORBA::INTERNAL ());
64
 
  ACE_CHECK;
65
 
 
66
 
  // copy
67
 
  subscribed_types = this->subscribed_types_;
68
 
}
69
 
 
70
 
int
71
 
TAO_Notify_Admin::shutdown (ACE_ENV_SINGLE_ARG_DECL)
72
 
{
73
 
  if (TAO_Notify_Object::shutdown (ACE_ENV_SINGLE_ARG_PARAMETER) == 1)
74
 
    return 1;
75
 
 
76
 
  this->proxy_container_->shutdown (ACE_ENV_SINGLE_ARG_PARAMETER);
77
 
  ACE_CHECK_RETURN (1);
78
 
 
79
 
  delete this->proxy_container_;
80
 
 
81
 
  return 0;
82
 
}
83
 
 
84
 
void
85
 
TAO_Notify_Admin::insert (TAO_Notify_Proxy* proxy ACE_ENV_ARG_DECL)
86
 
{
87
 
  this->proxy_container_->insert (proxy ACE_ENV_ARG_PARAMETER);
88
 
}
89
 
 
90
 
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
91
 
 
92
 
template class TAO_ESF_Shutdown_Proxy<TAO_Notify_Proxy>;
93
 
template class TAO_Notify_Container_T <TAO_Notify_Proxy>;
94
 
 
95
 
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
96
 
 
97
 
#pragma TAO_ESF_Shutdown_Proxy<TAO_Notify_Proxy>
98
 
#pragma instantiate TAO_Notify_Container_T <TAO_Notify_Proxy>
99
 
 
100
 
#endif /*ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */