blob: 59aaa305d2c267ee07af8167ce5209aa04b93b1a (
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
|
/* -*- C++ -*- */
/**
* @file Consumer_T.h
*
* $Id$
*
* @author Pradeep Gore <pradeep@oomworks.com>
*
*
*/
#ifndef TAO_Notify_Tests_CONSUMER_T_H
#define TAO_Notify_Tests_CONSUMER_T_H
#include /**/ "ace/pre.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
#include "Peer_T.h"
class TAO_Notify_Tests_ConsumerAdmin_Traits
{
public:
typedef CosNotifyChannelAdmin::ConsumerAdmin INTERFACE;
typedef CosNotifyChannelAdmin::ConsumerAdmin_ptr PTR;
typedef CosNotifyChannelAdmin::ConsumerAdmin_var VAR;
};
class TAO_Notify_Tests_ConsumerAdmin_Ext_Traits
{
public:
typedef NotifyExt::ConsumerAdmin INTERFACE;
typedef NotifyExt::ConsumerAdmin_ptr PTR;
typedef NotifyExt::ConsumerAdmin_var VAR;
};
/**
* @class TAO_Notify_Tests_Consumer_T
*
* @brief Base template to implement Consumers.
*
*/
template <class Consumer_Traits>
class TAO_Notify_Tests_Consumer_T : public TAO_Notify_Tests_Peer_T <Consumer_Traits>
{
typedef typename Consumer_Traits::Admin_Traits Admin_Traits;
typedef typename Consumer_Traits::Admin_Ext_Traits Admin_Ext_Traits;
typedef typename Consumer_Traits::Proxy_Traits Proxy_Traits;
typedef typename Proxy_Traits::INTERFACE Proxy_Traits_INTERFACE;
typedef typename Proxy_Traits::PTR Proxy_Traits_PTR;
typedef typename Admin_Traits::PTR Admin_Traits_PTR;
typedef typename Admin_Ext_Traits::PTR Admin_Ext_Traits_PTR;
public:
/// Constuctor
TAO_Notify_Tests_Consumer_T (void);
/// Destructor
~TAO_Notify_Tests_Consumer_T ();
/// For backward compatibility. use <get_proxy> instead.
Proxy_Traits_PTR get_proxy_supplier (void);
/// Send subscription_change
virtual void subscription_change (CosNotification::EventTypeSeq &added, CosNotification::EventTypeSeq& removed ACE_ENV_ARG_DECL);
protected:
/// Obtain Proxy.
virtual Proxy_Traits_PTR obtain_proxy (Admin_Traits_PTR admin_ptr ACE_ENV_ARG_DECL);
/// Obtain Proxy with QoS.
virtual Proxy_Traits_PTR obtain_proxy (Admin_Ext_Traits_PTR admin_ptr
, CosNotification::QoSProperties& qos
ACE_ENV_ARG_DECL);
// = NotifyPublish method
virtual void offer_change (const CosNotification::EventTypeSeq & added,
const CosNotification::EventTypeSeq & removed
ACE_ENV_ARG_DECL
)
ACE_THROW_SPEC ((
CORBA::SystemException,
CosNotifyComm::InvalidEventType
));
};
#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
#include "Consumer_T.cpp"
#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
#pragma implementation ("Consumer_T.cpp")
#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
#include /**/ "ace/post.h"
#endif /* TAO_Notify_Tests_CONSUMER_T_H */
|