diff options
author | bala <balanatarajan@users.noreply.github.com> | 2000-12-07 23:49:59 +0000 |
---|---|---|
committer | bala <balanatarajan@users.noreply.github.com> | 2000-12-07 23:49:59 +0000 |
commit | 9c59765bf00cb46c2638e0ad7edf2fcc1eea000e (patch) | |
tree | f581994603321ef174fa5d9ea2a56cf6adbabc28 /TAO/tao/GIOP_Message_Generator_Parser.h | |
parent | 02cc34690ecada2356e3ea9cbe358e2441a46ff2 (diff) | |
download | ATCD-9c59765bf00cb46c2638e0ad7edf2fcc1eea000e.tar.gz |
ChangeLogTag: Thu Dec 7 17:36:47 2000 Balachandran Natarajan <bala@cs.wustl.edu>
Diffstat (limited to 'TAO/tao/GIOP_Message_Generator_Parser.h')
-rw-r--r-- | TAO/tao/GIOP_Message_Generator_Parser.h | 126 |
1 files changed, 126 insertions, 0 deletions
diff --git a/TAO/tao/GIOP_Message_Generator_Parser.h b/TAO/tao/GIOP_Message_Generator_Parser.h new file mode 100644 index 00000000000..73228199d17 --- /dev/null +++ b/TAO/tao/GIOP_Message_Generator_Parser.h @@ -0,0 +1,126 @@ + +// -*- C++ -*- +// =================================================================== +/** + * @file GIOP_Message_Generator_Parser.h + * + * $Id$ + * + * @author Balachandran Natarajan <bala@cs.wustl.edu> + */ +// =================================================================== + +#ifndef TAO_GIOP_MESSAGE_GENERATOR_PARSER_H +#define TAO_GIOP_MESSAGE_GENERATOR_PARSER_H +#include "ace/pre.h" + +#include "tao/corbafwd.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#if defined(_MSC_VER) +#if (_MSC_VER >= 1200) +#pragma warning(push) +#endif /* _MSC_VER >= 1200 */ +#pragma warning(disable:4250) +#endif /* _MSC_VER */ + +class TAO_Operation_Details; +class TAO_Target_Specification; +class TAO_OutputCDR; +class TAO_InputCDR; +class TAO_Pluggable_Reply_Params; +class TAO_GIOP_Locate_Status_Msg; +class TAO_GIOP_Locate_Request_Header; +class TAO_Tagged_Profile; + +/** + * @class TAO_GIOP_Message_Generator_Parser + * + * @brief Base class for the GIOP Message generator and parser + * + * Version specific classes would inherit from this class. Strategy to + * determine which version of the GIOP request have we received and + * which version do we need to use to send messages. + */ + +class TAO_Export TAO_GIOP_Message_Generator_Parser +{ +public: + + /// Write the request header in to <msg> + virtual int write_request_header ( + const TAO_Operation_Details &opdetails, + TAO_Target_Specification &spec, + TAO_OutputCDR &msg) = 0; + + /// Write the LocateRequest header + virtual int write_locate_request_header ( + CORBA::ULong request_id, + TAO_Target_Specification &spec, + TAO_OutputCDR &msg) = 0; + + /// Write the reply header in to <output> + virtual int write_reply_header ( + TAO_OutputCDR &output, + TAO_Pluggable_Reply_Params &reply, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment ()) + ACE_THROW_SPEC ((CORBA::SystemException)) = 0; + + /// Writes the locate _reply message in to the <output> + virtual int write_locate_reply_mesg ( + TAO_OutputCDR &output, + CORBA::ULong request_id, + TAO_GIOP_Locate_Status_Msg &status) = 0; + + /// Parse the Request Header from the incoming stream. This will do a + /// version specific parsing of the incoming Request header + virtual int parse_request_header (TAO_ServerRequest &) = 0; + + /// Parse the Loacte Request Header from the incoming stream. This will do a + /// version specific parsing of the incoming Request header + virtual int parse_locate_header ( + TAO_GIOP_Locate_Request_Header &) = 0; + + /// Parse the reply message + virtual int parse_reply (TAO_InputCDR &input, + TAO_Pluggable_Reply_Params ¶ms); + + /// Parse the locate reply message from the server + virtual int parse_locate_reply (TAO_InputCDR &input, + TAO_Pluggable_Reply_Params ¶ms); + + /// Our versions + virtual CORBA::Octet major_version (void) = 0; + virtual CORBA::Octet minor_version (void) = 0; + + +protected: + + /// Marshall the reply status + void marshal_reply_status (TAO_OutputCDR &output, + TAO_Pluggable_Reply_Params &reply); + + /// Unmarshals the received object key + CORBA::Boolean unmarshall_object_key (TAO_ObjectKey &object_key, + TAO_InputCDR &cdr); + + /// Unmarshall the IOP::TaggedProfile + CORBA::Boolean unmarshall_iop_profile (TAO_Tagged_Profile &profile, + TAO_InputCDR &cdr); + + /// Unmarshalls the GIOP::IORAddressingInfo + CORBA::Boolean unmarshall_ref_addr (TAO_Tagged_Profile &profile, + TAO_InputCDR &cdr); + +}; + +#if defined (__ACE_INLINE__) +# include "tao/GIOP_Message_Generator_Parser.inl" +#endif /* __ACE_INLINE__ */ + +#include "ace/post.h" +#endif /*TAO_GIOP_MESSAGE_GENERATOR_PARSER_H*/ |