summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/Notify/Admin.h
blob: 12228fb5a67c29a6753b054dfb9912a07331a706 (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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
/* -*- C++ -*- */
/**
 *  @file Admin.h
 *
 *  $Id$
 *
 *  @author Pradeep Gore <pradeep@oomworks.com>
 *
 *
 */

#ifndef TAO_NS_ADMIN_H
#define TAO_NS_ADMIN_H
#include "ace/pre.h"

#include "notify_export.h"

#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */

#include "FilterAdmin.h"
#include "EventTypeSeq.h"
#include "Object.h"

class TAO_NS_Proxy;
class TAO_NS_EventChannel;
template <class TYPE> class TAO_NS_Container_T;

/**
 * @class TAO_NS_Admin
 *
 * @brief Base class for the ConsumerAdmin and SupplierAdmin.
 *
 */

class TAO_Notify_Export TAO_NS_Admin : public virtual TAO_NS_Object
{
  friend class TAO_NS_Builder;
public:
  typedef CosNotifyChannelAdmin::AdminIDSeq SEQ;
  typedef CosNotifyChannelAdmin::AdminIDSeq_var SEQ_VAR;

  /// Constuctor
  TAO_NS_Admin (void);

  /// Destructor
  ~TAO_NS_Admin ();

  /// Init
  void init (TAO_NS_EventChannel *ec ACE_ENV_ARG_DECL);

  /// Insert the proxy in the <proxy_container_>.
  void insert (TAO_NS_Proxy* proxy ACE_ENV_ARG_DECL);

  /// Remove type from container_
  void remove (TAO_NS_Proxy *proxy ACE_ENV_ARG_DECL);

  /// Access Admin FilterAdmin.
  TAO_NS_FilterAdmin& filter_admin (void);

  /// Set Filter operator
  void filter_operator (CosNotifyChannelAdmin::InterFilterGroupOperator filter_operator);

  /// Access Filter operator
  CosNotifyChannelAdmin::InterFilterGroupOperator filter_operator (void);

  /// Obtain the Admin's subscribed types.
  void subscribed_types (TAO_NS_EventTypeSeq& subscribed_types ACE_ENV_ARG_DECL);

  /// Shutdown
  virtual int shutdown (ACE_ENV_SINGLE_ARG_DECL);

protected:
  typedef TAO_NS_Container_T <TAO_NS_Proxy> TAO_NS_Proxy_Container;

  /// = Data Members

  /// The EventChannel.
  TAO_NS_EventChannel *ec_;

  /// The Proxy Container.
  TAO_NS_Proxy_Container *proxy_container_;;

  /// The types that we've subscribed our proxy objects with the event manager.
  TAO_NS_EventTypeSeq subscribed_types_;

  /// Filter Administration
  TAO_NS_FilterAdmin filter_admin_;

  /// Filter operator
  CosNotifyChannelAdmin::InterFilterGroupOperator filter_operator_;
};

#if defined (__ACE_INLINE__)
#include "Admin.inl"
#endif /* __ACE_INLINE__ */

#include "ace/post.h"
#endif /* TAO_NS_ADMIN_H */