Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / GIOP_Message_Generator_Parser.h
blob7a901a16a4124e66da8d5e4770ee2d08b1bc4b35
1 // -*- C++ -*-
3 // ===================================================================
4 /**
5 * @file GIOP_Message_Generator_Parser.h
7 * @author Balachandran Natarajan <bala@cs.wustl.edu>
8 */
9 // ===================================================================
11 #ifndef TAO_GIOP_MESSAGE_GENERATOR_PARSER_H
12 #define TAO_GIOP_MESSAGE_GENERATOR_PARSER_H
14 #include /**/ "ace/pre.h"
15 #include "ace/Global_Macros.h"
17 #if !defined (ACE_LACKS_PRAGMA_ONCE)
18 # pragma once
19 #endif /* ACE_LACKS_PRAGMA_ONCE */
21 #include "tao/Basic_Types.h"
22 #include "tao/TAO_Export.h"
24 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
26 class TAO_Operation_Details;
27 class TAO_Target_Specification;
28 class TAO_OutputCDR;
29 class TAO_InputCDR;
30 class TAO_Pluggable_Reply_Params;
31 class TAO_Pluggable_Reply_Params_Base;
32 class TAO_GIOP_Locate_Status_Msg;
33 class TAO_GIOP_Locate_Request_Header;
34 class TAO_ServerRequest;
36 /**
37 * @class TAO_GIOP_Message_Generator_Parser
39 * @brief Base class for the GIOP Message generator and parser
41 * Version specific classes would inherit from this class. Strategy to
42 * determine which version of the GIOP request have we received and
43 * which version do we need to use to send messages.
46 class TAO_GIOP_Message_Generator_Parser
48 public:
49 virtual ~TAO_GIOP_Message_Generator_Parser ();
51 /// Write the request header in to @a msg
52 virtual bool write_request_header (
53 const TAO_Operation_Details &opdetails,
54 TAO_Target_Specification &spec,
55 TAO_OutputCDR &msg) = 0;
57 /// Write the LocateRequest header
58 virtual bool write_locate_request_header (
59 CORBA::ULong request_id,
60 TAO_Target_Specification &spec,
61 TAO_OutputCDR &msg) = 0;
63 /// Write the reply header in to @a output
64 virtual bool write_reply_header (
65 TAO_OutputCDR &output,
66 TAO_Pluggable_Reply_Params_Base &reply) = 0;
68 /// Writes the locate _reply message in to the @a output
69 virtual bool write_locate_reply_mesg (
70 TAO_OutputCDR &output,
71 CORBA::ULong request_id,
72 TAO_GIOP_Locate_Status_Msg &status) = 0;
74 /// Write the GIOP fragment message header to the output CDR stream
75 /// @a cdr.
76 virtual bool write_fragment_header (TAO_OutputCDR & cdr,
77 CORBA::ULong request_id) = 0;
79 /// Parse the Request Header from the incoming stream. This will do a
80 /// version specific parsing of the incoming Request header
81 virtual int parse_request_header (TAO_ServerRequest &) = 0;
83 /// Parse the Locate Request Header from the incoming stream. This will do a
84 /// version specific parsing of the incoming Request header
85 virtual int parse_locate_header (TAO_GIOP_Locate_Request_Header &) = 0;
87 /// Parse the reply message
88 virtual int parse_reply (TAO_InputCDR &input,
89 TAO_Pluggable_Reply_Params &params);
91 /// Parse the locate reply message from the server
92 virtual int parse_locate_reply (TAO_InputCDR &input,
93 TAO_Pluggable_Reply_Params &params);
95 /// Our versions
96 virtual CORBA::Octet major_version () const = 0;
97 virtual CORBA::Octet minor_version () const = 0;
99 /// Is the messaging object ready for processing BiDirectional
100 /// request/response?
101 virtual bool is_ready_for_bidirectional () const;
103 /// The header length of a fragment
104 virtual size_t fragment_header_length () const = 0;
107 TAO_END_VERSIONED_NAMESPACE_DECL
109 #include /**/ "ace/post.h"
111 #endif /*TAO_GIOP_MESSAGE_GENERATOR_PARSER_H*/