Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / TAO / tao / Pluggable_Messaging_Utils.h
blob6cab6a91408bf44f8b7a7bcb60acb57d533404d1
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Pluggable_Messaging_Utils.h
7 * Utility classes for the TAO pluggable messaging framework.
9 * @author Balachandran Natarajan <bala@cs.wustl.edu>
11 //=============================================================================
14 #ifndef TAO_PLUGGABLE_MESSAGING_UTILS_H
15 #define TAO_PLUGGABLE_MESSAGING_UTILS_H
17 #include /**/ "ace/pre.h"
19 #include "tao/GIOPC.h"
21 #if !defined (ACE_LACKS_PRAGMA_ONCE)
22 # pragma once
23 #endif /* ACE_LACKS_PRAGMA_ONCE */
25 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
27 class TAO_Transport;
29 /**
30 * @class TAO_Pluggable_Reply_Params_Base
32 * @brief TAO_Pluggable_Reply_Params_Base
34 * This represents a set of data that would be assembled by the
35 * acceptor to pass to the connector. This base class is used by
36 * TAO_ServerRequest. The child class TAO_Pluggable_Reply_Params
37 * is used on the client side, and contains an additional
38 * TAO_InputCDR member, not needed on the server side.
40 class TAO_Export TAO_Pluggable_Reply_Params_Base
42 public:
43 /// Constructor.
44 TAO_Pluggable_Reply_Params_Base ();
46 /// The IOP service context list.
47 IOP::ServiceContextList svc_ctx_;
49 /// The request id for which the reply we (connector) has received.
50 CORBA::ULong request_id_;
52 /**
53 * Since this class no longer contains an NVList, this is the
54 * way to determine if the request was DSI, so we can use Carlos'
55 * service context list no-deep-copy optimization.
57 CORBA::Boolean is_dsi_;
59 /// Info required for DSI optimization that pads the outgoing
60 /// CDR stream according to the alignment of the NVList.
61 ptrdiff_t dsi_nvlist_align_;
63 /**
64 * Get and Set methods for the service context list that we dont
65 * own. This is useful for cases where the application objects own
66 * a service context list and would like to pass on their contents
67 * without a copy.
69 IOP::ServiceContextList &service_context_notowned ();
70 void service_context_notowned (IOP::ServiceContextList *svc);
72 /// A flag that indicates if there is any data is going to get
73 /// marshalled in the reply
74 CORBA::Boolean argument_flag_;
76 GIOP::ReplyStatusType reply_status () const;
77 void reply_status (GIOP::ReplyStatusType status);
79 GIOP::LocateStatusType locate_reply_status () const;
80 void locate_reply_status (GIOP::LocateStatusType status);
82 protected:
83 /// The service context list that we don't own.
84 IOP::ServiceContextList *service_context_;
85 private:
86 /// The reply status.
87 GIOP::ReplyStatusType reply_status_;
89 /// The locate reply status
90 GIOP::LocateStatusType locate_reply_status_;
93 /**
94 * @class TAO_Pluggable_Reply_Params
96 * @brief TAO_Pluggable_Connector_Params
98 class TAO_Export TAO_Pluggable_Reply_Params
99 : public TAO_Pluggable_Reply_Params_Base
101 public:
102 /// Constructor.
103 TAO_Pluggable_Reply_Params (TAO_Transport *t);
105 /// The stream with the non-demarshaled reply. This stream will be
106 /// passed up to the stubs to demarshal the parameter values.
107 TAO_InputCDR *input_cdr_;
109 TAO_Transport *transport_;
112 TAO_END_VERSIONED_NAMESPACE_DECL
114 #if defined (__ACE_INLINE__)
115 #include "tao/Pluggable_Messaging_Utils.inl"
116 #endif /* __ACE_INLINE__ */
118 #include /**/ "ace/post.h"
120 #endif /* TAO_PLUGGABLE_MESSAGING_UTILS_H */