blob: de0933ec05cfdf3d7533530e6317a66bc7dbb76b (
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
|
/* -*- C++ -*- */
// $Id$
// ============================================================================
//
// = LIBRARY
// ace
//
// = FILENAME
// Channel_Clients_T
//
// = AUTHOR
// Tim Harrison (harrison@cs.wustl.edu) and
// Douglas Schmidt (schmidt@cs.wustl.edu)
//
// = DESCRIPTION
// These classes allow applications to be consumer, suppliers, and
// consumer suppliers, as well as being active objects. This is
// accomplished with adapters to prevent the use of multiple
// inheritence (which is this root of all evil.)
//
// ============================================================================
#ifndef ACE_CHANNEL_CLIENTS_T_H
#define ACE_CHANNEL_CLIENTS_T_H
#include /**/ "ace/pre.h"
#include "orbsvcs/RtecEventCommS.h"
/**
* @class ACE_PushConsumer_Adapter
*
* @brief ACE Push Consumer Adapter
*
* Forwards all calls to the target_.
*/
template <class TARGET>
class ACE_PushConsumer_Adapter : public POA_RtecEventComm::PushConsumer
{
public:
/// Forwards all calls to @a target.
ACE_PushConsumer_Adapter (TARGET *target);
/// Forwards to target_.
virtual void push (const RtecEventComm::EventSet& events
ACE_ENV_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC (( CORBA::SystemException));
/// Forwards to target_.
virtual void disconnect_push_consumer (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC (( CORBA::SystemException));
private:
TARGET *target_;
};
// ************************************************************
/**
* @class ACE_PushSupplier_Adapter
*
* @brief ACE Push Supplier Adapter
*
* Forwards all calls to disconnect_push_supplier to the target_.
*/
template <class TARGET>
class ACE_PushSupplier_Adapter : public POA_RtecEventComm::PushSupplier
{
public:
/// Forwards all calls to <owner>.
ACE_PushSupplier_Adapter (TARGET *target);
/// Forwards to target_.
virtual void disconnect_push_supplier (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
ACE_THROW_SPEC (( CORBA::SystemException));
private:
TARGET *target_;
};
#if defined (__ACE_INLINE__)
#include "orbsvcs/Channel_Clients_T.i"
#endif /* __ACE_INLINE__ */
#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
#include "orbsvcs/Channel_Clients_T.cpp"
#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
#pragma implementation ("Channel_Clients_T.cpp")
#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
#include /**/ "ace/post.h"
#endif /* ACE_CHANNEL_CLIENTS_T_H */
|