summaryrefslogtreecommitdiff
path: root/TAO/tao/DynamicInterface/DII_Reply_Handler.h
blob: fd8b33bf26165ad408dad969cef885dde3bdaaec (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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
// -*- C++ -*-

//==============================================================
/**
 *  @file DII_Reply_Handler.h
 *
 *  @brief Handler of DII twoway asynch replies type.
 */
// =============================================================

#ifndef TAO_DII_REPLY_HANDLER_H
#define TAO_DII_REPLY_HANDLER_H
#include /**/ "ace/pre.h"

#include "tao/orbconf.h"

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

#include "tao/LocalObject.h"
#include "dynamicinterface_export.h"

TAO_BEGIN_VERSIONED_NAMESPACE_DECL

/// Forward declaration
class TAO_DII_Reply_Handler;
typedef TAO_DII_Reply_Handler* TAO_DII_Reply_Handler_ptr;

/**
 * @class TAO_DII_Reply_Handler_var
 *
 * @brief The T_var class for reply handler
 *
 * As any other pseudo object, this class has a T_var class too.
 */
class TAO_DynamicInterface_Export TAO_DII_Reply_Handler_var
{
public:
  TAO_DII_Reply_Handler_var (void);
  TAO_DII_Reply_Handler_var (TAO_DII_Reply_Handler_ptr);
  TAO_DII_Reply_Handler_var (const TAO_DII_Reply_Handler_var &);
  ~TAO_DII_Reply_Handler_var (void);

  TAO_DII_Reply_Handler_var &operator= (TAO_DII_Reply_Handler_ptr);
  TAO_DII_Reply_Handler_var &operator= (const TAO_DII_Reply_Handler_var &);
  TAO_DII_Reply_Handler_ptr operator-> (void) const;

  operator const TAO_DII_Reply_Handler_ptr &() const;
  operator TAO_DII_Reply_Handler_ptr &();

  TAO_DII_Reply_Handler_ptr in (void) const;
  TAO_DII_Reply_Handler_ptr &inout (void);
  TAO_DII_Reply_Handler_ptr &out (void);
  TAO_DII_Reply_Handler_ptr _retn (void);
  TAO_DII_Reply_Handler_ptr ptr (void) const;

private:
  TAO_DII_Reply_Handler_ptr ptr_;
};

/**
 * @class TAO_DII_Reply_Handler
 *
 * @brief The class for DII reply handler
 *
 * Provides a way to create requests and populate it with parameters for
 * use in the Dynamic Invocation Interface.
 */
class TAO_DynamicInterface_Export TAO_DII_Reply_Handler
  : public virtual ::CORBA::LocalObject
{
public:
  TAO_DII_Reply_Handler ();
  virtual ~TAO_DII_Reply_Handler (void);

  /// Callback method for asynchronous requests.
  virtual void handle_response (TAO_InputCDR &incoming) = 0;

  virtual void handle_excep (TAO_InputCDR &incoming,
                             CORBA::ULong reply_status) = 0;

  /// Handle a location forward message. This one has a default method
  /// supplied that simply forwards to the handle_response, since that
  /// is what the legacy code did. This way we maintain backwards
  /// compatibility.
  virtual void handle_location_forward (TAO_InputCDR &incoming,
                                        CORBA::ULong reply_status);

  /// CORBA Object related methods
  static TAO_DII_Reply_Handler* _duplicate (TAO_DII_Reply_Handler_ptr);
  static TAO_DII_Reply_Handler* _nil ();
  static TAO_DII_Reply_Handler* _narrow (CORBA::Object_ptr);
  static TAO_DII_Reply_Handler* _unchecked_narrow (CORBA::Object_ptr);

  static int _tao_class_id;

  typedef TAO_DII_Reply_Handler_ptr _ptr_type;
  typedef TAO_DII_Reply_Handler_var _var_type;

#if defined (ACE_WIN32_VC14)
  // Workaround for connect issue 1577211
  ACE_UNIMPLEMENTED_FUNC (TAO_DII_Reply_Handler (const TAO_DII_Reply_Handler &))
  ACE_UNIMPLEMENTED_FUNC (TAO_DII_Reply_Handler &operator = (const TAO_DII_Reply_Handler &))
#endif
};

TAO_END_VERSIONED_NAMESPACE_DECL

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

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