diff options
Diffstat (limited to 'TAO/tao')
38 files changed, 4729 insertions, 1175 deletions
diff --git a/TAO/tao/CDR_Encaps_Codec.cpp b/TAO/tao/CDR_Encaps_Codec.cpp new file mode 100644 index 00000000000..211a9cb1d7c --- /dev/null +++ b/TAO/tao/CDR_Encaps_Codec.cpp @@ -0,0 +1,292 @@ +// -*- C++ -*- +// +// $Id$ + +#include "CDR.h" +#include "OctetSeqC.h" +#include "Any.h" +#include "Typecode.h" +#include "Marshal.h" + +#include "CDR_Encaps_Codec.h" + +ACE_RCSID (TAO_CodecFactory, + CDR_Encaps_Codec, + "$Id$") + + +TAO_CDR_Encaps_Codec::TAO_CDR_Encaps_Codec (CORBA::Octet major, + CORBA::Octet minor) + : major_ (major), + minor_ (minor) +{ +} + +TAO_CDR_Encaps_Codec::~TAO_CDR_Encaps_Codec (void) +{ +} + +CORBA::OctetSeq * +TAO_CDR_Encaps_Codec::encode (const CORBA::Any & data, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException, + IOP::Codec::InvalidTypeForEncoding)) +{ + this->check_type_for_encoding (data, + ACE_TRY_ENV); + ACE_CHECK_RETURN (0); + + // ---------------------------------------------------------------- + + TAO_OutputCDR cdr; + if ((cdr << TAO_OutputCDR::from_boolean (TAO_ENCAP_BYTE_ORDER)) + && (cdr << data)) + { + CORBA::OctetSeq * octet_seq = 0; + + ACE_NEW_THROW_EX (octet_seq, + CORBA::OctetSeq, + CORBA::NO_MEMORY ( + CORBA_SystemException::_tao_minor_code ( + TAO_DEFAULT_MINOR_CODE, + ENOMEM), + CORBA::COMPLETED_NO)); + ACE_CHECK_RETURN (0); + + CORBA::OctetSeq_var safe_octet_seq = octet_seq; + + octet_seq->length (cdr.total_length ()); + CORBA::Octet *buf = octet_seq->get_buffer (); + + for (const ACE_Message_Block *i = cdr.begin (); + i != 0; + i = i->cont ()) + { + size_t len = i->length (); + ACE_OS_String::memcpy (buf, i->rd_ptr (), len); + buf += len; + } + + return safe_octet_seq._retn (); + } + + ACE_THROW_RETURN (CORBA::MARSHAL (), 0); +} + +CORBA::Any * +TAO_CDR_Encaps_Codec::decode (const CORBA::OctetSeq & data, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException, + IOP::Codec::FormatMismatch)) +{ + // @todo How do we check for a format mismatch so that we can throw + // a IOP::Codec::FormatMismatch exception? + // @todo Is this the best way to extract the Any from the OctetSeq? + + // Notice that we need to extract the TypeCode and the value from + // the octet sequence, and place them into the Any. We can't just + // insert the octet sequence into the Any. + + TAO_InputCDR cdr (ACE_reinterpret_cast (const char*, + data.get_buffer ()), + data.length ()); + + CORBA::Boolean byte_order; + if (cdr >> TAO_InputCDR::to_boolean (byte_order)) + { + cdr.reset_byte_order (ACE_static_cast (int, byte_order)); + + CORBA::Any * any = 0; + ACE_NEW_THROW_EX (any, + CORBA::Any, + CORBA::NO_MEMORY ( + CORBA_SystemException::_tao_minor_code ( + TAO_DEFAULT_MINOR_CODE, + ENOMEM), + CORBA::COMPLETED_NO)); + ACE_CHECK_RETURN (0); + + CORBA::Any_var safe_any = any; + + if (cdr >> (*any)) + return safe_any._retn (); + } + + ACE_THROW_RETURN (IOP::Codec::FormatMismatch (), 0); +} + +CORBA::OctetSeq * +TAO_CDR_Encaps_Codec::encode_value (const CORBA::Any & data, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException, + IOP::Codec::InvalidTypeForEncoding)) +{ + this->check_type_for_encoding (data, + ACE_TRY_ENV); + ACE_CHECK_RETURN (0); + + // ---------------------------------------------------------------- + TAO_OutputCDR cdr; + + if ((cdr << TAO_OutputCDR::from_boolean (TAO_ENCAP_BYTE_ORDER))) + { + CORBA::TypeCode_var tc = data.type (); + + TAO_InputCDR input (data._tao_get_cdr (), + data._tao_byte_order ()); + + TAO_Marshal_Object::perform_append (tc.in (), + &input, + &cdr, + ACE_TRY_ENV); + ACE_CHECK_RETURN (0); + + // TAO extension: replace the contents of the octet sequence with + // the CDR stream. + CORBA::OctetSeq * octet_seq = 0; + + ACE_NEW_THROW_EX (octet_seq, + CORBA::OctetSeq, + CORBA::NO_MEMORY ( + CORBA_SystemException::_tao_minor_code ( + TAO_DEFAULT_MINOR_CODE, + ENOMEM), + CORBA::COMPLETED_NO)); + ACE_CHECK_RETURN (0); + + CORBA::OctetSeq_var safe_octet_seq = octet_seq; + + octet_seq->length (cdr.total_length ()); + CORBA::Octet *buf = octet_seq->get_buffer (); + + for (const ACE_Message_Block *i = cdr.begin (); + i != 0; + i = i->cont ()) + { + size_t len = i->length (); + ACE_OS_String::memcpy (buf, i->rd_ptr (), len); + buf += len; + } + + return safe_octet_seq._retn (); + } + + ACE_THROW_RETURN (CORBA::MARSHAL (), 0); +} + +CORBA::Any * +TAO_CDR_Encaps_Codec::decode_value (const CORBA::OctetSeq & data, + CORBA::TypeCode_ptr tc, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException, + IOP::Codec::FormatMismatch, + IOP::Codec::TypeMismatch)) +{ + // @todo How do we check for a type mismatch so that we can + // throw a IOP::Codec::TypeMismatch exception? + // @@ I added a check below. See the comment. I'm not sure + // if it is a valid check. + // -Ossama + + // @todo Most of this code was copied from + // operator>> (TAO_InputCDR &cdr, CORBA::Any &x) + // in Any.cpp. Rather than copy the code, the code should be + // refactored to make it possible to use the given TypeCode + // rather than attempt to extract it from the CDR + // encapsulation. + + CORBA::ULong sequence_length = data.length (); + TAO_InputCDR cdr (ACE_reinterpret_cast (const char*, + data.get_buffer ()), + sequence_length); + + CORBA::Boolean byte_order; + if (cdr >> TAO_InputCDR::to_boolean (byte_order)) + { + cdr.reset_byte_order (ACE_static_cast (int, byte_order)); + + // @@ (JP) The following code depends on the fact that + // TAO_InputCDR does not contain chained message blocks, + // otherwise <begin> and <end> could be part of + // different buffers! + + // This will be the start of a new message block. + char *begin = cdr.rd_ptr (); + + // Skip over the next argument. + CORBA::TypeCode::traverse_status status = + TAO_Marshal_Object::perform_skip (tc, &cdr, ACE_TRY_ENV); + ACE_CHECK_RETURN (0); // @@ Should we throw a + // IOP::Codec::TypeMismatch exception + // here if this fails? + + if (status == CORBA::TypeCode::TRAVERSE_CONTINUE) + { + // This will be the end of the new message block. + char *end = cdr.rd_ptr (); + + size_t size = end - begin; + + // @@ I added the following check, but I'm not sure if it is + // a valid check. Can someone verify this? + // -Ossama + + // If the unaligned buffer size is not equal to the octet + // sequence length (minus the "byte order byte") then the + // TypeCode does not correspond to the data in the CDR + // encapsulation. However, even if they do match it is + // still uncertain if the TypeCode corresponds to the data + // in the octet sequence. With this test, it is only + // possible to determine if the TypeCode does *not* match + // the data, not if it does match. + if (size != sequence_length - 1) + ACE_THROW_RETURN (IOP::Codec::TypeMismatch (), 0); + + ACE_Message_Block mb (size + ACE_CDR::MAX_ALIGNMENT); + ACE_CDR::mb_align (&mb); + ptr_arith_t offset = + ptr_arith_t (begin) % ACE_CDR::MAX_ALIGNMENT; + mb.rd_ptr (offset); + mb.wr_ptr (offset + size); + + ACE_OS::memcpy (mb.rd_ptr (), begin, size); + + CORBA::Any * any = 0; + ACE_NEW_THROW_EX (any, + CORBA::Any, + CORBA::NO_MEMORY ( + CORBA_SystemException::_tao_minor_code ( + TAO_DEFAULT_MINOR_CODE, + ENOMEM), + CORBA::COMPLETED_NO)); + ACE_CHECK_RETURN (0); + + CORBA::Any_var safe_any = any; + + // Stick it into the Any. It gets duplicated there. + any->_tao_replace (tc, + cdr.byte_order (), + &mb); + + return safe_any._retn (); + } + else + ACE_THROW_RETURN (IOP::Codec::TypeMismatch (), 0); + } + + ACE_THROW_RETURN (IOP::Codec::FormatMismatch (), 0); +} + +void +TAO_CDR_Encaps_Codec::check_type_for_encoding ( + const CORBA::Any & data, + CORBA::Environment &ACE_TRY_ENV) +{ + // @@ TODO: Are there any other conditions we need to check? + + CORBA::TypeCode_var typecode = data.type (); + if (this->major_ == 1 + && this->minor_ == 0 + && typecode->equivalent (CORBA::_tc_wstring)) + ACE_THROW (IOP::Codec::InvalidTypeForEncoding ()); +} diff --git a/TAO/tao/CDR_Encaps_Codec.h b/TAO/tao/CDR_Encaps_Codec.h new file mode 100644 index 00000000000..bf8189983e0 --- /dev/null +++ b/TAO/tao/CDR_Encaps_Codec.h @@ -0,0 +1,140 @@ +// -*- C++ -*- + +//============================================================================= +/** + * @file CDR_Encaps_Codec.h + * + * $Id$ + * + * @author Ossama Othman <ossama@uci.edu> + */ +//============================================================================= + +#ifndef TAO_CDR_ENCAPS_CODEC_H +#define TAO_CDR_ENCAPS_CODEC_H + +#include "ace/pre.h" + +#include "TAO_Export.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "IOPC.h" +#include "LocalObject.h" + +// This is to remove "inherits via dominance" warnings from MSVC. +// MSVC is being a little too paranoid. +#if defined(_MSC_VER) +#if (_MSC_VER >= 1200) +#pragma warning(push) +#endif /* _MSC_VER >= 1200 */ +#pragma warning(disable:4250) +#endif /* _MSC_VER */ + + +/** + * @class TAO_CDR_Encaps_Codec + * + * @brief Implementation of a CDR encapsulation coder/decoder + * (Codec). + * + * This coder/decoder (Codec) class encodes and decodes data to and + * from a CDR encapsulation, respectively. It is useful for creation + * of octet sequences that contain CDR encapsulations. Those octet + * sequences can then be placed in a IOP::ServiceContext or an + * IOP::TaggedComponent, for example. + * + * @note This Codec should not be used for operations internal to the + * ORB core since it uses interpretive marshaling rather than compiled + * marshaling. + */ +class TAO_Export TAO_CDR_Encaps_Codec + : public virtual IOP::Codec, + public virtual TAO_Local_RefCounted_Object +{ +public: + + /// Constructor. + TAO_CDR_Encaps_Codec (CORBA::Octet major, CORBA::Octet minor); + + /// Encode the given data, including the TypeCode, into an octet + /// sequence. + virtual CORBA::OctetSeq * encode (const CORBA::Any & data, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment ()) + ACE_THROW_SPEC ((CORBA::SystemException, + IOP::Codec::InvalidTypeForEncoding)); + + // Extract the TypeCode and the value from the octet sequence and + // place them into an Any. + virtual CORBA::Any * decode (const CORBA::OctetSeq & data, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment ()) + ACE_THROW_SPEC ((CORBA::SystemException, + IOP::Codec::FormatMismatch)); + + /// Encode the given data, excluding the TypeCode, into an octet + /// sequence. + virtual CORBA::OctetSeq * encode_value (const CORBA::Any & data, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment ()) + ACE_THROW_SPEC ((CORBA::SystemException, + IOP::Codec::InvalidTypeForEncoding)); + + // Extract the value from the octet sequence, based on the given + // TypeCode, and place it into an Any. + virtual CORBA::Any * decode_value (const CORBA::OctetSeq & data, + CORBA::TypeCode_ptr tc, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment ()) + ACE_THROW_SPEC ((CORBA::SystemException, + IOP::Codec::FormatMismatch, + IOP::Codec::TypeMismatch)); + +protected: + + /// Destructor. + /** + * Only allow this class to be instantiated on the heap since it is + * reference counted. + */ + ~TAO_CDR_Encaps_Codec (void); + + /// Verify that it is possible to encode the given data using this + /// Codec. + /** + * Typical reasons for failure include attempting to encode a type + * that isn't supported for the version of GIOP associated with this + * Codec. + */ + void check_type_for_encoding (const CORBA::Any & data, + CORBA::Environment &ACE_TRY_ENV); + +private: + + /// Prevent copying through the copy constructor and the assignment + /// operator. + ACE_UNIMPLEMENTED_FUNC ( + TAO_CDR_Encaps_Codec (const TAO_CDR_Encaps_Codec &)) + ACE_UNIMPLEMENTED_FUNC (void operator= (const TAO_CDR_Encaps_Codec &)) + +private: + + /// The major GIOP version associated with this Codec. + CORBA::Octet major_; + + /// The minor GIOP version associated with this Codec. + CORBA::Octet minor_; + +}; + +#if defined(_MSC_VER) && (_MSC_VER >= 1200) +#pragma warning(pop) +#endif /* _MSC_VER */ + +#include "ace/post.h" + +#endif /* TAO_CDR_ENCAPS_CODEC_H */ + diff --git a/TAO/tao/ClientRequestInfo.cpp b/TAO/tao/ClientRequestInfo.cpp index 2d9938e2a3a..bd10c821b82 100644 --- a/TAO/tao/ClientRequestInfo.cpp +++ b/TAO/tao/ClientRequestInfo.cpp @@ -7,7 +7,9 @@ #include "Stub.h" #include "Tagged_Components.h" -ACE_RCSID (tao, ClientRequestInfo, "$Id$") +ACE_RCSID (TAO, + ClientRequestInfo, + "$Id$") #if TAO_HAS_INTERCEPTORS == 1 @@ -18,7 +20,7 @@ ACE_RCSID (tao, ClientRequestInfo, "$Id$") TAO_ClientRequestInfo::TAO_ClientRequestInfo (TAO_GIOP_Invocation *inv, CORBA::Object_ptr target) : invocation_ (inv), - target_ (CORBA::Object::_duplicate (target)), + target_ (target), // No need to duplicate. caught_exception_ (0), response_expected_ (1), reply_status_ (-1) @@ -29,25 +31,14 @@ CORBA::Object_ptr TAO_ClientRequestInfo::target (CORBA::Environment &) ACE_THROW_SPEC ((CORBA::SystemException)) { - if (this->reply_status_ == - PortableInterceptor::LOCATION_FORWARD_PERMANENT) - { - // TAO_GIOP_Invocation::forward_reference() already duplicates - // the reference before returning it so there is no need to - // duplicate it here. - return this->invocation_->forward_reference (); - } - - return CORBA::Object::_duplicate (this->target_.in ()); + return CORBA::Object::_duplicate (this->target_); } CORBA::Object_ptr TAO_ClientRequestInfo::effective_target (CORBA::Environment &) ACE_THROW_SPEC ((CORBA::SystemException)) { - if (this->reply_status_ == PortableInterceptor::LOCATION_FORWARD - || this->reply_status_ == - PortableInterceptor::LOCATION_FORWARD_PERMANENT) + if (this->reply_status_ == PortableInterceptor::LOCATION_FORWARD) { // TAO_GIOP_Invocation::forward_reference() already duplicates // the reference before returning it so there is no need to @@ -55,7 +46,7 @@ TAO_ClientRequestInfo::effective_target (CORBA::Environment &) return this->invocation_->forward_reference (); } - return CORBA::Object::_duplicate (this->target_.in ()); + return CORBA::Object::_duplicate (this->target_); } IOP::TaggedProfile * @@ -93,13 +84,12 @@ TAO_ClientRequestInfo::received_exception (CORBA::Environment &ACE_TRY_ENV) if (this->reply_status_ != PortableInterceptor::SYSTEM_EXCEPTION && this->reply_status_ != PortableInterceptor::USER_EXCEPTION) { - // @@ Need the minor code once it is available. - ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (), 0); + ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (10, CORBA::COMPLETED_NO), 0); } // The spec says that if it is a user exception which can't be // inserted then the UNKNOWN exception needs to be thrown with minor - // code TBD_U. + // code 1. CORBA::Any * temp = 0; @@ -137,9 +127,9 @@ TAO_ClientRequestInfo::received_exception_id ( if (this->reply_status_ != PortableInterceptor::SYSTEM_EXCEPTION && this->reply_status_ != PortableInterceptor::USER_EXCEPTION) { - // Need the minor code from the PI spec once it becomes - // available. - ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (), 0); + ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (10, + CORBA::COMPLETED_NO), + 0); } return CORBA::string_dup (this->caught_exception_->_id ()); @@ -151,32 +141,96 @@ TAO_ClientRequestInfo::get_effective_component ( CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { - IOP::TaggedComponent *tagged_component = 0; - ACE_NEW_THROW_EX (tagged_component, - IOP::TaggedComponent, - CORBA::NO_MEMORY ( - CORBA::SystemException::_tao_minor_code ( - TAO_DEFAULT_MINOR_CODE, - ENOMEM), - CORBA::COMPLETED_NO)); - ACE_CHECK_RETURN (0); + TAO_Tagged_Components &ecs = + this->target_->_stubobj ()->profile_in_use ()->tagged_components (); - IOP::TaggedComponent_var safe_tagged_component = tagged_component; + IOP::MultipleComponentProfile &components = ecs.components (); - const TAO_Tagged_Components &ecs = + CORBA::ULong len = components.length (); + for (CORBA::ULong i = 0; i < len; ++i) + { + if (components[i].tag == id) + { + IOP::TaggedComponent *tagged_component = 0; + + // Only allocate a sequence if we have a tagged component + // that matches the given IOP::ComponentId. + ACE_NEW_THROW_EX (tagged_component, + IOP::TaggedComponent, + CORBA::NO_MEMORY ( + CORBA::SystemException::_tao_minor_code ( + TAO_DEFAULT_MINOR_CODE, + ENOMEM), + CORBA::COMPLETED_NO)); + ACE_CHECK_RETURN (0); + + IOP::TaggedComponent_var safe_tagged_component = + tagged_component; + + (*tagged_component) = components[i]; // Deep copy + + return safe_tagged_component._retn (); + } + } + + // No tagged component was found that matched the given + // IOP::ComponentId. + ACE_THROW_RETURN (CORBA::BAD_PARAM (25, CORBA::COMPLETED_NO), + 0); +} + +IOP::TaggedComponentSeq * +TAO_ClientRequestInfo::get_effective_components ( + IOP::ComponentId id, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_Tagged_Components &ecs = this->target_->_stubobj ()->profile_in_use ()->tagged_components (); - tagged_component->tag = id; + IOP::MultipleComponentProfile &components = ecs.components (); + + IOP::TaggedComponentSeq *tagged_components = 0; + IOP::TaggedComponentSeq_var safe_tagged_components; + + CORBA::ULong len = components.length (); + for (CORBA::ULong i = 0; i < len; ++i) + { + if (components[i].tag == id) + { + if (tagged_components == 0) + { + // Only allocate a sequence if we have tagged components + // to place into the sequence. + ACE_NEW_THROW_EX (tagged_components, + IOP::TaggedComponentSeq, + CORBA::NO_MEMORY ( + CORBA::SystemException::_tao_minor_code ( + TAO_DEFAULT_MINOR_CODE, + ENOMEM), + CORBA::COMPLETED_NO)); + ACE_CHECK_RETURN (0); + + safe_tagged_components = tagged_components; + } + + CORBA::ULong old_len = safe_tagged_components->length (); + safe_tagged_components->length (old_len + 1); - if (!ecs.get_component (*tagged_component)) - ACE_THROW_RETURN (CORBA::BAD_PARAM ( - CORBA::SystemException::_tao_minor_code ( - TAO_DEFAULT_MINOR_CODE, - EINVAL), // @@ Need minor code from PI spec! - CORBA::COMPLETED_NO), - 0); + safe_tagged_components[old_len] = components[i]; // Deep copy + } + } - return safe_tagged_component._retn (); + if (tagged_components == 0) + { + // No tagged component sequence was allocated, meaning no tagged + // components were found that matched the given + // IOP::ComponentId. + ACE_THROW_RETURN (CORBA::BAD_PARAM (25, CORBA::COMPLETED_NO), + 0); + } + + return safe_tagged_components._retn (); } CORBA::Policy_ptr @@ -214,8 +268,7 @@ TAO_ClientRequestInfo::add_request_service_context ( return; } else - // @@ Need the minor code once it becomes available. - ACE_THROW (CORBA::BAD_INV_ORDER ()); + ACE_THROW (CORBA::BAD_INV_ORDER (11, CORBA::COMPLETED_NO)); } } @@ -243,40 +296,40 @@ Dynamic::ParameterList * TAO_ClientRequestInfo::arguments (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { - // @@ Need the minor code once it becomes available. - ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (), 0); + ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (10, CORBA::COMPLETED_NO), + 0); } Dynamic::ExceptionList * TAO_ClientRequestInfo::exceptions (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { - // @@ Need the minor code once it becomes available. - ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (), 0); + ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (10, CORBA::COMPLETED_NO), + 0); } Dynamic::ContextList * TAO_ClientRequestInfo::contexts (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { - // @@ Need the minor code once it becomes available. - ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (), 0); + ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (10, CORBA::COMPLETED_NO), + 0); } Dynamic::RequestContext * TAO_ClientRequestInfo::operation_context (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { - // @@ Need the minor code once it becomes available. - ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (), 0); + ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (10, CORBA::COMPLETED_NO), + 0); } CORBA::Any * TAO_ClientRequestInfo::result (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { - // @@ Need the minor code once it becomes available. - ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (), 0); + ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (10, CORBA::COMPLETED_NO), + 0); } CORBA::Boolean @@ -304,8 +357,8 @@ TAO_ClientRequestInfo::sync_scope (CORBA::Environment &ACE_TRY_ENV) if (inv != 0 && this->response_expected_ == 0) return inv->sync_scope (); - // @@ Need the minor once it becomes available. - ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (), -1); + ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (10, CORBA::COMPLETED_NO), + -1); } #endif /* TAO_HAS_CORBA_MESSAGING == 1 */ @@ -315,7 +368,7 @@ TAO_ClientRequestInfo::reply_status (CORBA::Environment &ACE_TRY_ENV) { if (this->reply_status_ == -1) // A reply hasn't been received yet. - ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (), -1); + ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (10, CORBA::COMPLETED_NO), -1); return this->reply_status_; } @@ -324,11 +377,8 @@ CORBA::Object_ptr TAO_ClientRequestInfo::forward_reference (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { - // @@ Need the minor code once it becomes available. - if (this->reply_status_ != PortableInterceptor::LOCATION_FORWARD - && this->reply_status_ != - PortableInterceptor::LOCATION_FORWARD_PERMANENT) - ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (), + if (this->reply_status_ != PortableInterceptor::LOCATION_FORWARD) + ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (10, CORBA::COMPLETED_NO), CORBA::Object::_nil ()); // TAO_GIOP_Invocation::forward_reference() already duplicates the @@ -381,11 +431,7 @@ TAO_ClientRequestInfo::get_request_service_context ( return safe_service_context._retn (); } - ACE_THROW_RETURN (CORBA::BAD_PARAM ( - CORBA::SystemException::_tao_minor_code ( - TAO_DEFAULT_MINOR_CODE, - EINVAL), // @@ Need minor code from PI spec! - CORBA::COMPLETED_NO), + ACE_THROW_RETURN (CORBA::BAD_PARAM (23, CORBA::COMPLETED_NO), 0); } @@ -419,11 +465,7 @@ TAO_ClientRequestInfo::get_reply_service_context ( return safe_service_context._retn (); } - ACE_THROW_RETURN (CORBA::BAD_PARAM ( - CORBA::SystemException::_tao_minor_code ( - TAO_DEFAULT_MINOR_CODE, - EINVAL), // @@ Need minor code from PI spec! - CORBA::COMPLETED_NO), + ACE_THROW_RETURN (CORBA::BAD_PARAM (23, CORBA::COMPLETED_NO), 0); } diff --git a/TAO/tao/ClientRequestInfo.h b/TAO/tao/ClientRequestInfo.h index 4704fed93ff..357811b7194 100644 --- a/TAO/tao/ClientRequestInfo.h +++ b/TAO/tao/ClientRequestInfo.h @@ -144,6 +144,11 @@ public: CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) ACE_THROW_SPEC ((CORBA::SystemException)); + virtual IOP::TaggedComponentSeq * get_effective_components ( + IOP::ComponentId id, + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) + ACE_THROW_SPEC ((CORBA::SystemException)); + virtual CORBA::Policy_ptr get_request_policy ( CORBA::PolicyType type, CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) @@ -176,7 +181,7 @@ protected: TAO_GIOP_Invocation *invocation_; - CORBA::Object_var target_; + CORBA::Object_ptr target_; CORBA::Exception *caught_exception_; CORBA::Boolean response_expected_; diff --git a/TAO/tao/ClientRequestInfo.inl b/TAO/tao/ClientRequestInfo.inl index 50bd99d0a2c..6d9c27c5127 100644 --- a/TAO/tao/ClientRequestInfo.inl +++ b/TAO/tao/ClientRequestInfo.inl @@ -55,10 +55,5 @@ TAO_ClientRequestInfo::forward_reference ( // handled by the TAO_GIOP_Invocation object so that its profiles // can be added to the list of forward profiles. - if (exc.permanent) - this->reply_status_ = - PortableInterceptor::LOCATION_FORWARD_PERMANENT; - else - this->reply_status_ = - PortableInterceptor::LOCATION_FORWARD; + this->reply_status_ = PortableInterceptor::LOCATION_FORWARD; } diff --git a/TAO/tao/CodecFactory.cpp b/TAO/tao/CodecFactory.cpp new file mode 100644 index 00000000000..f595e37db6e --- /dev/null +++ b/TAO/tao/CodecFactory.cpp @@ -0,0 +1,68 @@ +// -*- C++ -*- +// +// $Id$ + +#include "CodecFactory.h" +#include "CDR_Encaps_Codec.h" + +ACE_RCSID (TAO_CodecFactory, + CodecFactory, + "$Id$") + +TAO_CodecFactory::TAO_CodecFactory (void) +{ +} + +IOP::Codec_ptr +TAO_CodecFactory::create_codec (const IOP::Encoding & enc, + CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException, + IOP::CodecFactory::UnknownEncoding)) +{ + // @todo: Ideally we should have some sort of CodecFactory + // registry to make it possible to add factories + // dynamically. However, there currently isn't a need to + // support anything other than CDR encapsulations yet so we + // hardcode its Codec. This may change once TAO starts to + // support messaging formats other than GIOP. + + IOP::Codec_ptr codec = IOP::Codec::_nil (); + + switch (enc.format) + { + + // @@ MSVC 6 gets confused and thinks that + // IOP::ENCODING_CDR_ENCAPS is not a constant, so its actual + // value (0) is used instead. + case 0 /* IOP::ENCODING_CDR_ENCAPS */: + if (enc.major_version < 1) + { + // There is no such thing as a "0.x" CDR encapsulation. + ACE_THROW_RETURN (CORBA::BAD_PARAM ( + CORBA_SystemException::_tao_minor_code ( + TAO_DEFAULT_MINOR_CODE, + EINVAL), + CORBA::COMPLETED_NO), + IOP::Codec::_nil ()); + } + + ACE_NEW_THROW_EX (codec, + TAO_CDR_Encaps_Codec (enc.major_version, + enc.minor_version), + CORBA::NO_MEMORY ( + CORBA_SystemException::_tao_minor_code ( + TAO_DEFAULT_MINOR_CODE, + ENOMEM), + CORBA::COMPLETED_MAYBE)); + ACE_CHECK_RETURN (IOP::Codec::_nil ()); + break; + + default: + ACE_THROW_RETURN (IOP::CodecFactory::UnknownEncoding (), + IOP::Codec::_nil ()); + break; + + } + + return codec; +} diff --git a/TAO/tao/CodecFactory.h b/TAO/tao/CodecFactory.h new file mode 100644 index 00000000000..63f76a7dae1 --- /dev/null +++ b/TAO/tao/CodecFactory.h @@ -0,0 +1,78 @@ +// -*- C++ -*- + +//============================================================================= +/** + * @file CodecFactory.h + * + * $Id$ + * + * @author Ossama Othman <ossama@uci.edu> + */ +//============================================================================= + +#ifndef TAO_CODEC_FACTORY_H +#define TAO_CODEC_FACTORY_H + +#include "ace/pre.h" + +#include "TAO_Export.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "IOPC.h" +#include "LocalObject.h" + +// This is to remove "inherits via dominance" warnings from MSVC. +// MSVC is being a little too paranoid. +#if defined(_MSC_VER) +#if (_MSC_VER >= 1200) +#pragma warning(push) +#endif /* _MSC_VER >= 1200 */ +#pragma warning(disable:4250) +#endif /* _MSC_VER */ + + +/** + * @class TAO_CodecFactory + * + * @brief Implementation of the IOP::CodecFactory interface. + * + * This class can be used to create Codec of a given type, such as a + * CDR encapsulation Codec. + */ +class TAO_Export TAO_CodecFactory + : public virtual IOP::CodecFactory, + public virtual CORBA::LocalObject +{ +public: + + /// Constructor + TAO_CodecFactory (void); + + /// Create a Coder/Decoder for the given type of encoding. + virtual IOP::Codec_ptr create_codec (const IOP::Encoding & enc, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment ()) + ACE_THROW_SPEC ((CORBA::SystemException, + IOP::CodecFactory::UnknownEncoding)); + +private: + + /// Prevent copying through the copy constructor and the assignment + /// operator. + ACE_UNIMPLEMENTED_FUNC ( + TAO_CodecFactory (const TAO_CodecFactory &)) + ACE_UNIMPLEMENTED_FUNC (void operator= (const TAO_CodecFactory &)) + +}; + +#if defined(_MSC_VER) && (_MSC_VER >= 1200) +#pragma warning(pop) +#endif /* _MSC_VER */ + +#include "ace/post.h" + +#endif /* TAO_CODEC_FACTORY_H */ + diff --git a/TAO/tao/CodecFactory_ORBInitializer.cpp b/TAO/tao/CodecFactory_ORBInitializer.cpp new file mode 100644 index 00000000000..1e386c94d55 --- /dev/null +++ b/TAO/tao/CodecFactory_ORBInitializer.cpp @@ -0,0 +1,34 @@ +// -*- C++ -*- +// +// $Id$ + +#include "CodecFactory_ORBInitializer.h" +#include "CodecFactory.h" + +ACE_RCSID (TAO_CodecFactory, + CodecFactory_ORBInitializer, + "$Id$") + +void +TAO_CodecFactory_ORBInitializer::pre_init ( + PortableInterceptor::ORBInitInfo_ptr info + TAO_ENV_ARG_DECL) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + TAO_ENV_ARG_DEFN; + + // The CodecFactory is stateless and reentrant, so share a single + // instance between all ORBs. + info->register_initial_reference ("CodecFactory", + &(this->codec_factory_), + ACE_TRY_ENV); + ACE_CHECK; +} + +void +TAO_CodecFactory_ORBInitializer::post_init ( + PortableInterceptor::ORBInitInfo_ptr + TAO_ENV_ARG_DECL_NOT_USED) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ +} diff --git a/TAO/tao/CodecFactory_ORBInitializer.h b/TAO/tao/CodecFactory_ORBInitializer.h new file mode 100644 index 00000000000..bbaf3fc8f0e --- /dev/null +++ b/TAO/tao/CodecFactory_ORBInitializer.h @@ -0,0 +1,75 @@ +// -*- C++ -*- + +//============================================================================= +/** + * @file CodecFactory_ORBInitializer.h + * + * $Id$ + * + * @author Ossama Othman <ossama@uci.edu> + */ +//============================================================================= + + +#ifndef TAO_CODEC_FACTORY_ORB_INITIALIZER_H +#define TAO_CODEC_FACTORY_ORB_INITIALIZER_H + +#include "ace/pre.h" + +#include "TAO_Export.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "PortableInterceptorC.h" +#include "LocalObject.h" +#include "CodecFactory.h" + +// This is to remove "inherits via dominance" warnings from MSVC. +// MSVC is being a little too paranoid. +#if defined(_MSC_VER) +#if (_MSC_VER >= 1200) +#pragma warning(push) +#endif /* _MSC_VER >= 1200 */ +#pragma warning(disable:4250) +#endif /* _MSC_VER */ + + +/** + * @class TAO_CodecFactory_ORBInitializer + * + * @brief ORBInitializer for the CodecFactory support. + * + * This class simply registers the CodecFactory object with the ORB + * resolve_initial_references() mechanism. + */ +class TAO_Export TAO_CodecFactory_ORBInitializer + : public virtual PortableInterceptor::ORBInitializer, + public virtual TAO_Local_RefCounted_Object +{ +public: + + virtual void pre_init (PortableInterceptor::ORBInitInfo_ptr info + TAO_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException)); + + virtual void post_init (PortableInterceptor::ORBInitInfo_ptr info + TAO_ENV_ARG_DECL_WITH_DEFAULTS) + ACE_THROW_SPEC ((CORBA::SystemException)); + +private: + + /// Instance of the IOP::CodecFactory. + /// The CodecFactory is stateless and reentrant, so share a single + /// instance between all ORBs. + TAO_CodecFactory codec_factory_; +}; + +#if defined(_MSC_VER) && (_MSC_VER >= 1200) +#pragma warning(pop) +#endif /* _MSC_VER */ + +#include "ace/post.h" + +#endif /* TAO_CODEC_FACTORY_ORB_INITIALIZER_H */ diff --git a/TAO/tao/IOP.pidl b/TAO/tao/IOP.pidl index 0a6077b5f8a..66b06ba33a4 100644 --- a/TAO/tao/IOP.pidl +++ b/TAO/tao/IOP.pidl @@ -8,6 +8,7 @@ // is: // // tao_idl +// -Ge 1 // -Wb,export_macro=TAO_Export // -Wb,export_include="tao/TAO_Export.h" // -Wb,pre_include="ace/pre.h" @@ -18,6 +19,8 @@ #ifndef TAO_IOP_PIDL #define TAO_IOP_PIDL +#include "orb.idl" + #pragma prefix "omg.org" module IOP @@ -43,9 +46,10 @@ module IOP }; typedef sequence<TaggedComponent> MultipleComponentProfile; typedef sequence<TaggedComponent> TaggedComponentList; + typedef sequence<TaggedComponent> TaggedComponentSeq; // @@ All security related tags are located in the Security Service - // @@ related IDL files, in accordance with the Security Service 1.7 + // @@ related IDL files, in accordance with the Security Service 1.8 // @@ specification. const ComponentId TAG_ORB_TYPE = 0; @@ -92,6 +96,32 @@ module IOP const ServiceId FT_GROUP_VERSION = 12; const ServiceId FT_REQUEST = 13; + local interface Codec { + exception InvalidTypeForEncoding {}; + exception FormatMismatch {}; + exception TypeMismatch {}; + + CORBA::OctetSeq encode (in any data) raises (InvalidTypeForEncoding); + any decode (in CORBA::OctetSeq data) raises (FormatMismatch); + CORBA::OctetSeq encode_value (in any data) raises (InvalidTypeForEncoding); + any decode_value (in CORBA::OctetSeq data, in CORBA::TypeCode tc) + raises (FormatMismatch, TypeMismatch); + }; + + typedef short EncodingFormat; + const EncodingFormat ENCODING_CDR_ENCAPS = 0; + + struct Encoding { + EncodingFormat format; + octet major_version; + octet minor_version; + }; + + local interface CodecFactory { + exception UnknownEncoding {}; + + Codec create_codec (in Encoding enc) raises (UnknownEncoding); + }; }; #pragma prefix "" diff --git a/TAO/tao/IOPC.cpp b/TAO/tao/IOPC.cpp index ce7089e44d5..90f2f55f550 100644 --- a/TAO/tao/IOPC.cpp +++ b/TAO/tao/IOPC.cpp @@ -8,7 +8,7 @@ // Washington University // St. Louis, MO // USA -// http://www.cs.wustl.edu/~schmidt/doc-group.html +// http://www.cs.wustl.edu/~schmidt/doc-center.html // and // Distributed Object Computing Laboratory // University of California at Irvine @@ -21,12 +21,15 @@ #include "IOPC.h" +#if defined (__BORLANDC__) +#pragma option -w-rvl -w-rch -w-ccc -w-aus +#endif /* __BORLANDC__ */ + #if !defined (__ACE_INLINE__) #include "IOPC.i" #endif /* !defined INLINE */ -#include "tao/Any.h" -#include "tao/Typecode.h" +#include "Typecode.h" static const CORBA::Long _oc_IOP_ProfileId[] = { @@ -647,6 +650,142 @@ TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr) TAO_NAMESPACE_BEGIN (IOP) TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_TaggedComponentList, &_tc_TAO_tc_IOP_TaggedComponentList) TAO_NAMESPACE_END + +#if !defined (TAO_USE_SEQUENCE_TEMPLATES) + +#if !defined (__TAO_UNBOUNDED_SEQUENCE_IOP_TAGGEDCOMPONENTSEQ_CS_) +#define __TAO_UNBOUNDED_SEQUENCE_IOP_TAGGEDCOMPONENTSEQ_CS_ + + void + IOP::_TAO_Unbounded_Sequence_IOP_TaggedComponentSeq::_allocate_buffer (CORBA::ULong length) + { + IOP::TaggedComponent* tmp = 0; + tmp = _TAO_Unbounded_Sequence_IOP_TaggedComponentSeq::allocbuf (length); + + if (this->buffer_ != 0) + { + IOP::TaggedComponent *old = ACE_reinterpret_cast (IOP::TaggedComponent *,this->buffer_); + + for (CORBA::ULong i = 0; i < this->length_; ++i) + tmp[i] = old[i]; + + if (this->release_) + _TAO_Unbounded_Sequence_IOP_TaggedComponentSeq::freebuf (old); + + } + this->buffer_ = tmp; + } + + void + IOP::_TAO_Unbounded_Sequence_IOP_TaggedComponentSeq::_deallocate_buffer (void) + { + if (this->buffer_ == 0 || this->release_ == 0) + return; + + IOP::TaggedComponent *tmp = ACE_reinterpret_cast (IOP::TaggedComponent *,this->buffer_); + + _TAO_Unbounded_Sequence_IOP_TaggedComponentSeq::freebuf (tmp); + this->buffer_ = 0; + } + + IOP::_TAO_Unbounded_Sequence_IOP_TaggedComponentSeq::~_TAO_Unbounded_Sequence_IOP_TaggedComponentSeq (void) // Dtor. + { + this->_deallocate_buffer (); + } + + +#endif /* end #if !defined */ + + +#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ + +#if !defined (_IOP_TAGGEDCOMPONENTSEQ_CS_) +#define _IOP_TAGGEDCOMPONENTSEQ_CS_ + +// ************************************************************* +// IOP::TaggedComponentSeq +// ************************************************************* + +IOP::TaggedComponentSeq::TaggedComponentSeq (void) +{} +IOP::TaggedComponentSeq::TaggedComponentSeq (CORBA::ULong max) // uses max size + : +#if !defined (TAO_USE_SEQUENCE_TEMPLATES) + _TAO_Unbounded_Sequence_IOP_TaggedComponentSeq +#else /* TAO_USE_SEQUENCE_TEMPLATES */ + TAO_Unbounded_Sequence<IOP::TaggedComponent> +#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ + (max) +{} +IOP::TaggedComponentSeq::TaggedComponentSeq (CORBA::ULong max, CORBA::ULong length, IOP::TaggedComponent *buffer, CORBA::Boolean release) + : +#if !defined (TAO_USE_SEQUENCE_TEMPLATES) + _TAO_Unbounded_Sequence_IOP_TaggedComponentSeq +#else /* TAO_USE_SEQUENCE_TEMPLATES */ + TAO_Unbounded_Sequence<IOP::TaggedComponent> +#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ + (max, length, buffer, release) +{} +IOP::TaggedComponentSeq::TaggedComponentSeq (const TaggedComponentSeq &seq) // copy ctor + : +#if !defined (TAO_USE_SEQUENCE_TEMPLATES) + _TAO_Unbounded_Sequence_IOP_TaggedComponentSeq +#else /* TAO_USE_SEQUENCE_TEMPLATES */ + TAO_Unbounded_Sequence<IOP::TaggedComponent> +#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ + (seq) +{} +IOP::TaggedComponentSeq::~TaggedComponentSeq (void) // dtor +{} +void IOP::TaggedComponentSeq::_tao_any_destructor (void *x) +{ + TaggedComponentSeq *tmp = ACE_static_cast (TaggedComponentSeq*,x); + delete tmp; +} + + +#endif /* end #if !defined */ + +static const CORBA::Long _oc_IOP_TaggedComponentSeq[] = +{ + TAO_ENCAP_BYTE_ORDER, // byte order + 39, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x494f502f), ACE_NTOHL (0x54616767), ACE_NTOHL (0x6564436f), ACE_NTOHL (0x6d706f6e), ACE_NTOHL (0x656e7453), ACE_NTOHL (0x65713a31), ACE_NTOHL (0x2e300000), // repository ID = IDL:omg.org/IOP/TaggedComponentSeq:1.0 + 19, ACE_NTOHL (0x54616767), ACE_NTOHL (0x6564436f), ACE_NTOHL (0x6d706f6e), ACE_NTOHL (0x656e7453), ACE_NTOHL (0x65710000), // name = TaggedComponentSeq + CORBA::tk_sequence, // typecode kind + 200, // encapsulation length + TAO_ENCAP_BYTE_ORDER, // byte order + CORBA::tk_struct, // typecode kind + 184, // encapsulation length + TAO_ENCAP_BYTE_ORDER, // byte order + 36, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x494f502f), ACE_NTOHL (0x54616767), ACE_NTOHL (0x6564436f), ACE_NTOHL (0x6d706f6e), ACE_NTOHL (0x656e743a), ACE_NTOHL (0x312e3000), // repository ID = IDL:omg.org/IOP/TaggedComponent:1.0 + 16, ACE_NTOHL (0x54616767), ACE_NTOHL (0x6564436f), ACE_NTOHL (0x6d706f6e), ACE_NTOHL (0x656e7400), // name = TaggedComponent + 2, // member count + 4, ACE_NTOHL (0x74616700), // name = tag + CORBA::tk_alias, // typecode kind for typedefs + 60, // encapsulation length + TAO_ENCAP_BYTE_ORDER, // byte order + 32, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x494f502f), ACE_NTOHL (0x436f6d70), ACE_NTOHL (0x6f6e656e), ACE_NTOHL (0x7449643a), ACE_NTOHL (0x312e3000), // repository ID = IDL:omg.org/IOP/ComponentId:1.0 + 12, ACE_NTOHL (0x436f6d70), ACE_NTOHL (0x6f6e656e), ACE_NTOHL (0x74496400), // name = ComponentId + CORBA::tk_ulong, + + + 15, ACE_NTOHL (0x636f6d70), ACE_NTOHL (0x6f6e656e), ACE_NTOHL (0x745f6461), ACE_NTOHL (0x74610000), // name = component_data + CORBA::tk_sequence, // typecode kind + 12, // encapsulation length + TAO_ENCAP_BYTE_ORDER, // byte order + CORBA::tk_octet, + + 0U, + + + 0U, + +}; +static CORBA::TypeCode _tc_TAO_tc_IOP_TaggedComponentSeq (CORBA::tk_alias, sizeof (_oc_IOP_TaggedComponentSeq), (char *) &_oc_IOP_TaggedComponentSeq, 0, sizeof (IOP::TaggedComponentSeq)); +TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr) +TAO_NAMESPACE_BEGIN (IOP) +TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_TaggedComponentSeq, &_tc_TAO_tc_IOP_TaggedComponentSeq) +TAO_NAMESPACE_END TAO_NAMESPACE_TYPE (const CORBA::ULong) TAO_NAMESPACE_BEGIN (IOP) TAO_NAMESPACE_DEFINE (const CORBA::ULong, TAG_ORB_TYPE, 0U) @@ -983,6 +1122,466 @@ TAO_NAMESPACE_TYPE (const CORBA::ULong) TAO_NAMESPACE_BEGIN (IOP) TAO_NAMESPACE_DEFINE (const CORBA::ULong, FT_REQUEST, 13U) TAO_NAMESPACE_END + +// default constructor +IOP::Codec::Codec () +{ + } + +// destructor +IOP::Codec::~Codec (void) +{} + +IOP::Codec_ptr IOP::Codec::_narrow ( + CORBA::Object_ptr obj, + CORBA::Environment &ACE_TRY_ENV + ) +{ + return Codec::_unchecked_narrow (obj, ACE_TRY_ENV); +} + +IOP::Codec_ptr IOP::Codec::_unchecked_narrow ( + CORBA::Object_ptr obj, + CORBA::Environment & + ) +{ + if (CORBA::is_nil (obj)) + return Codec::_nil (); + return + ACE_reinterpret_cast + ( + Codec_ptr, + obj->_tao_QueryInterface + ( + ACE_reinterpret_cast + ( + ptr_arith_t, + &Codec::_narrow + ) + ) + ); +} + +IOP::Codec_ptr +IOP::Codec::_duplicate (Codec_ptr obj) +{ + if (!CORBA::is_nil (obj)) + obj->_add_ref (); + return obj; +} + +void *IOP::Codec::_tao_QueryInterface (ptr_arith_t type) +{ + void *retv = 0; + if (type == ACE_reinterpret_cast + (ptr_arith_t, + &ACE_NESTED_CLASS (::IOP, Codec)::_narrow)) + retv = ACE_reinterpret_cast (void*, this); + else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_narrow)) + retv = ACE_reinterpret_cast (void *, + ACE_static_cast (CORBA::Object_ptr, this)); + + if (retv) + this->_add_ref (); + return retv; +} + +const char* IOP::Codec::_interface_repository_id (void) const +{ + return "IDL:omg.org/IOP/Codec:1.0"; +} + +// Default constructor. +IOP::Codec::InvalidTypeForEncoding::InvalidTypeForEncoding (void) + : CORBA_UserException ("IDL:omg.org/IOP/Codec/InvalidTypeForEncoding:1.0") +{ +} + +// Destructor - all members are of self managing types. +IOP::Codec::InvalidTypeForEncoding::~InvalidTypeForEncoding (void) +{ +} + +// Copy constructor. +IOP::Codec::InvalidTypeForEncoding::InvalidTypeForEncoding (const ::IOP::Codec::InvalidTypeForEncoding &_tao_excp) + : CORBA_UserException (_tao_excp._id ()) +{ +} + +// Assignment operator. +IOP::Codec::InvalidTypeForEncoding& +IOP::Codec::InvalidTypeForEncoding::operator= (const ::IOP::Codec::InvalidTypeForEncoding &_tao_excp) +{ + this->CORBA_UserException::operator= (_tao_excp); + return *this; +} + +// Narrow. +IOP::Codec::InvalidTypeForEncoding * +IOP::Codec::InvalidTypeForEncoding::_downcast (CORBA::Exception *exc) +{ + if (!ACE_OS::strcmp ("IDL:omg.org/IOP/Codec/InvalidTypeForEncoding:1.0", exc->_id ())) + { + return ACE_dynamic_cast (InvalidTypeForEncoding *, exc); + } + else + { + return 0; + } +} + +void IOP::Codec::InvalidTypeForEncoding::_raise () +{ + TAO_RAISE (*this); +} + +void IOP::Codec::InvalidTypeForEncoding::_tao_encode ( + TAO_OutputCDR &, + CORBA::Environment &ACE_TRY_ENV + ) const +{ + ACE_THROW (CORBA::MARSHAL ()); +} + +void IOP::Codec::InvalidTypeForEncoding::_tao_decode ( + TAO_InputCDR &, + CORBA::Environment &ACE_TRY_ENV + ) +{ + ACE_THROW (CORBA::MARSHAL ()); +} + +// TAO extension - the _alloc method. +CORBA::Exception *IOP::Codec::InvalidTypeForEncoding::_alloc (void) +{ + CORBA::Exception *retval = 0; + ACE_NEW_RETURN (retval, ::IOP::Codec::InvalidTypeForEncoding, 0); + return retval; +} + +// Default constructor. +IOP::Codec::FormatMismatch::FormatMismatch (void) + : CORBA_UserException ("IDL:omg.org/IOP/Codec/FormatMismatch:1.0") +{ +} + +// Destructor - all members are of self managing types. +IOP::Codec::FormatMismatch::~FormatMismatch (void) +{ +} + +// Copy constructor. +IOP::Codec::FormatMismatch::FormatMismatch (const ::IOP::Codec::FormatMismatch &_tao_excp) + : CORBA_UserException (_tao_excp._id ()) +{ +} + +// Assignment operator. +IOP::Codec::FormatMismatch& +IOP::Codec::FormatMismatch::operator= (const ::IOP::Codec::FormatMismatch &_tao_excp) +{ + this->CORBA_UserException::operator= (_tao_excp); + return *this; +} + +// Narrow. +IOP::Codec::FormatMismatch * +IOP::Codec::FormatMismatch::_downcast (CORBA::Exception *exc) +{ + if (!ACE_OS::strcmp ("IDL:omg.org/IOP/Codec/FormatMismatch:1.0", exc->_id ())) + { + return ACE_dynamic_cast (FormatMismatch *, exc); + } + else + { + return 0; + } +} + +void IOP::Codec::FormatMismatch::_raise () +{ + TAO_RAISE (*this); +} + +void IOP::Codec::FormatMismatch::_tao_encode ( + TAO_OutputCDR &, + CORBA::Environment &ACE_TRY_ENV + ) const +{ + ACE_THROW (CORBA::MARSHAL ()); +} + +void IOP::Codec::FormatMismatch::_tao_decode ( + TAO_InputCDR &, + CORBA::Environment &ACE_TRY_ENV + ) +{ + ACE_THROW (CORBA::MARSHAL ()); +} + +// TAO extension - the _alloc method. +CORBA::Exception *IOP::Codec::FormatMismatch::_alloc (void) +{ + CORBA::Exception *retval = 0; + ACE_NEW_RETURN (retval, ::IOP::Codec::FormatMismatch, 0); + return retval; +} + +// Default constructor. +IOP::Codec::TypeMismatch::TypeMismatch (void) + : CORBA_UserException ("IDL:omg.org/IOP/Codec/TypeMismatch:1.0") +{ +} + +// Destructor - all members are of self managing types. +IOP::Codec::TypeMismatch::~TypeMismatch (void) +{ +} + +// Copy constructor. +IOP::Codec::TypeMismatch::TypeMismatch (const ::IOP::Codec::TypeMismatch &_tao_excp) + : CORBA_UserException (_tao_excp._id ()) +{ +} + +// Assignment operator. +IOP::Codec::TypeMismatch& +IOP::Codec::TypeMismatch::operator= (const ::IOP::Codec::TypeMismatch &_tao_excp) +{ + this->CORBA_UserException::operator= (_tao_excp); + return *this; +} + +// Narrow. +IOP::Codec::TypeMismatch * +IOP::Codec::TypeMismatch::_downcast (CORBA::Exception *exc) +{ + if (!ACE_OS::strcmp ("IDL:omg.org/IOP/Codec/TypeMismatch:1.0", exc->_id ())) + { + return ACE_dynamic_cast (TypeMismatch *, exc); + } + else + { + return 0; + } +} + +void IOP::Codec::TypeMismatch::_raise () +{ + TAO_RAISE (*this); +} + +void IOP::Codec::TypeMismatch::_tao_encode ( + TAO_OutputCDR &, + CORBA::Environment &ACE_TRY_ENV + ) const +{ + ACE_THROW (CORBA::MARSHAL ()); +} + +void IOP::Codec::TypeMismatch::_tao_decode ( + TAO_InputCDR &, + CORBA::Environment &ACE_TRY_ENV + ) +{ + ACE_THROW (CORBA::MARSHAL ()); +} + +// TAO extension - the _alloc method. +CORBA::Exception *IOP::Codec::TypeMismatch::_alloc (void) +{ + CORBA::Exception *retval = 0; + ACE_NEW_RETURN (retval, ::IOP::Codec::TypeMismatch, 0); + return retval; +} + +static const CORBA::Long _oc_IOP_EncodingFormat[] = +{ + TAO_ENCAP_BYTE_ORDER, // byte order + 35, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x494f502f), ACE_NTOHL (0x456e636f), ACE_NTOHL (0x64696e67), ACE_NTOHL (0x466f726d), ACE_NTOHL (0x61743a31), ACE_NTOHL (0x2e300000), // repository ID = IDL:omg.org/IOP/EncodingFormat:1.0 + 15, ACE_NTOHL (0x456e636f), ACE_NTOHL (0x64696e67), ACE_NTOHL (0x466f726d), ACE_NTOHL (0x61740000), // name = EncodingFormat + CORBA::tk_short, + +}; +static CORBA::TypeCode _tc_TAO_tc_IOP_EncodingFormat (CORBA::tk_alias, sizeof (_oc_IOP_EncodingFormat), (char *) &_oc_IOP_EncodingFormat, 0, sizeof (IOP::EncodingFormat)); +TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr) +TAO_NAMESPACE_BEGIN (IOP) +TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_EncodingFormat, &_tc_TAO_tc_IOP_EncodingFormat) +TAO_NAMESPACE_END +TAO_NAMESPACE_TYPE (const CORBA::Short) +TAO_NAMESPACE_BEGIN (IOP) +TAO_NAMESPACE_DEFINE (const CORBA::Short, ENCODING_CDR_ENCAPS, 0) +TAO_NAMESPACE_END +static const CORBA::Long _oc_IOP_Encoding[] = +{ + TAO_ENCAP_BYTE_ORDER, // byte order + 29, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x494f502f), ACE_NTOHL (0x456e636f), ACE_NTOHL (0x64696e67), ACE_NTOHL (0x3a312e30), ACE_NTOHL (0x0), // repository ID = IDL:omg.org/IOP/Encoding:1.0 + 9, ACE_NTOHL (0x456e636f), ACE_NTOHL (0x64696e67), ACE_NTOHL (0x0), // name = Encoding + 3, // member count + 7, ACE_NTOHL (0x666f726d), ACE_NTOHL (0x61740000), // name = format + CORBA::tk_alias, // typecode kind for typedefs + 68, // encapsulation length + TAO_ENCAP_BYTE_ORDER, // byte order + 35, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x494f502f), ACE_NTOHL (0x456e636f), ACE_NTOHL (0x64696e67), ACE_NTOHL (0x466f726d), ACE_NTOHL (0x61743a31), ACE_NTOHL (0x2e300000), // repository ID = IDL:omg.org/IOP/EncodingFormat:1.0 + 15, ACE_NTOHL (0x456e636f), ACE_NTOHL (0x64696e67), ACE_NTOHL (0x466f726d), ACE_NTOHL (0x61740000), // name = EncodingFormat + CORBA::tk_short, + + + 14, ACE_NTOHL (0x6d616a6f), ACE_NTOHL (0x725f7665), ACE_NTOHL (0x7273696f), ACE_NTOHL (0x6e000000), // name = major_version + CORBA::tk_octet, + + 14, ACE_NTOHL (0x6d696e6f), ACE_NTOHL (0x725f7665), ACE_NTOHL (0x7273696f), ACE_NTOHL (0x6e000000), // name = minor_version + CORBA::tk_octet, + +}; +static CORBA::TypeCode _tc_TAO_tc_IOP_Encoding (CORBA::tk_struct, sizeof (_oc_IOP_Encoding), (char *) &_oc_IOP_Encoding, 0, sizeof (IOP::Encoding)); +TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr) +TAO_NAMESPACE_BEGIN (IOP) +TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_Encoding, &_tc_TAO_tc_IOP_Encoding) +TAO_NAMESPACE_END +void IOP::Encoding::_tao_any_destructor (void *x) +{ + Encoding *tmp = ACE_static_cast (Encoding*,x); + delete tmp; +} + + +// default constructor +IOP::CodecFactory::CodecFactory () +{ + } + +// destructor +IOP::CodecFactory::~CodecFactory (void) +{} + +IOP::CodecFactory_ptr IOP::CodecFactory::_narrow ( + CORBA::Object_ptr obj, + CORBA::Environment &ACE_TRY_ENV + ) +{ + return CodecFactory::_unchecked_narrow (obj, ACE_TRY_ENV); +} + +IOP::CodecFactory_ptr IOP::CodecFactory::_unchecked_narrow ( + CORBA::Object_ptr obj, + CORBA::Environment & + ) +{ + if (CORBA::is_nil (obj)) + return CodecFactory::_nil (); + return + ACE_reinterpret_cast + ( + CodecFactory_ptr, + obj->_tao_QueryInterface + ( + ACE_reinterpret_cast + ( + ptr_arith_t, + &CodecFactory::_narrow + ) + ) + ); +} + +IOP::CodecFactory_ptr +IOP::CodecFactory::_duplicate (CodecFactory_ptr obj) +{ + if (!CORBA::is_nil (obj)) + obj->_add_ref (); + return obj; +} + +void *IOP::CodecFactory::_tao_QueryInterface (ptr_arith_t type) +{ + void *retv = 0; + if (type == ACE_reinterpret_cast + (ptr_arith_t, + &ACE_NESTED_CLASS (::IOP, CodecFactory)::_narrow)) + retv = ACE_reinterpret_cast (void*, this); + else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_narrow)) + retv = ACE_reinterpret_cast (void *, + ACE_static_cast (CORBA::Object_ptr, this)); + + if (retv) + this->_add_ref (); + return retv; +} + +const char* IOP::CodecFactory::_interface_repository_id (void) const +{ + return "IDL:omg.org/IOP/CodecFactory:1.0"; +} + +// Default constructor. +IOP::CodecFactory::UnknownEncoding::UnknownEncoding (void) + : CORBA_UserException ("IDL:omg.org/IOP/CodecFactory/UnknownEncoding:1.0") +{ +} + +// Destructor - all members are of self managing types. +IOP::CodecFactory::UnknownEncoding::~UnknownEncoding (void) +{ +} + +// Copy constructor. +IOP::CodecFactory::UnknownEncoding::UnknownEncoding (const ::IOP::CodecFactory::UnknownEncoding &_tao_excp) + : CORBA_UserException (_tao_excp._id ()) +{ +} + +// Assignment operator. +IOP::CodecFactory::UnknownEncoding& +IOP::CodecFactory::UnknownEncoding::operator= (const ::IOP::CodecFactory::UnknownEncoding &_tao_excp) +{ + this->CORBA_UserException::operator= (_tao_excp); + return *this; +} + +// Narrow. +IOP::CodecFactory::UnknownEncoding * +IOP::CodecFactory::UnknownEncoding::_downcast (CORBA::Exception *exc) +{ + if (!ACE_OS::strcmp ("IDL:omg.org/IOP/CodecFactory/UnknownEncoding:1.0", exc->_id ())) + { + return ACE_dynamic_cast (UnknownEncoding *, exc); + } + else + { + return 0; + } +} + +void IOP::CodecFactory::UnknownEncoding::_raise () +{ + TAO_RAISE (*this); +} + +void IOP::CodecFactory::UnknownEncoding::_tao_encode ( + TAO_OutputCDR &, + CORBA::Environment &ACE_TRY_ENV + ) const +{ + ACE_THROW (CORBA::MARSHAL ()); +} + +void IOP::CodecFactory::UnknownEncoding::_tao_decode ( + TAO_InputCDR &, + CORBA::Environment &ACE_TRY_ENV + ) +{ + ACE_THROW (CORBA::MARSHAL ()); +} + +// TAO extension - the _alloc method. +CORBA::Exception *IOP::CodecFactory::UnknownEncoding::_alloc (void) +{ + CORBA::Exception *retval = 0; + ACE_NEW_RETURN (retval, ::IOP::CodecFactory::UnknownEncoding, 0); + return retval; +} + void operator<<= (CORBA::Any &_tao_any, const IOP::TaggedProfile &_tao_elem) // copying { TAO_OutputCDR stream; @@ -1404,6 +2003,95 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const IOP::TaggedCompone return 0; } +void operator<<= ( + CORBA::Any &_tao_any, + const IOP::TaggedComponentSeq &_tao_elem + ) // copying +{ + TAO_OutputCDR stream; + if (stream << _tao_elem) + { + _tao_any._tao_replace ( + IOP::_tc_TaggedComponentSeq, + TAO_ENCAP_BYTE_ORDER, + stream.begin () + ); + } +} + +void operator<<= (CORBA::Any &_tao_any, IOP::TaggedComponentSeq *_tao_elem) // non copying +{ + TAO_OutputCDR stream; + stream << *_tao_elem; + _tao_any._tao_replace ( + IOP::_tc_TaggedComponentSeq, + TAO_ENCAP_BYTE_ORDER, + stream.begin (), + 1, + _tao_elem, + IOP::TaggedComponentSeq::_tao_any_destructor + ); +} + +CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, IOP::TaggedComponentSeq *&_tao_elem) +{ + return _tao_any >>= ACE_const_cast( + const IOP::TaggedComponentSeq*&, + _tao_elem + ); +} + +CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const IOP::TaggedComponentSeq *&_tao_elem) +{ + _tao_elem = 0; + ACE_TRY_NEW_ENV + { + CORBA::TypeCode_var type = _tao_any.type (); + if (!type->equivalent (IOP::_tc_TaggedComponentSeq, ACE_TRY_ENV)) // not equal + { + return 0; + } + ACE_TRY_CHECK; + if (_tao_any.any_owns_data ()) + { + _tao_elem = ACE_static_cast( + const IOP::TaggedComponentSeq*, + _tao_any.value () + ); + return 1; + } + else + { + IOP::TaggedComponentSeq *tmp; + ACE_NEW_RETURN (tmp, IOP::TaggedComponentSeq, 0); + TAO_InputCDR stream ( + _tao_any._tao_get_cdr (), + _tao_any._tao_byte_order () + ); + if (stream >> *tmp) + { + ((CORBA::Any *)&_tao_any)->_tao_replace ( + IOP::_tc_TaggedComponentSeq, + 1, + ACE_static_cast (void *, tmp), + IOP::TaggedComponentSeq::_tao_any_destructor + ); + _tao_elem = tmp; + return 1; + } + else + { + delete tmp; + } + } + } + ACE_CATCHANY + { + } + ACE_ENDTRY; + return 0; +} + void operator<<= (CORBA::Any &_tao_any, const IOP::ServiceContext &_tao_elem) // copying { TAO_OutputCDR stream; @@ -1574,6 +2262,101 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const IOP::ServiceContex return 0; } +#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ + defined (ACE_HAS_GNU_REPO) + template class TAO_Object_Manager<IOP::Codec,IOP::Codec_var>; + #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) + # pragma instantiate TAO_Object_Manager<IOP::Codec,IOP::Codec_var> +#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ + +void operator<<= (CORBA::Any &_tao_any, const IOP::Encoding &_tao_elem) // copying +{ + TAO_OutputCDR stream; + stream << _tao_elem; + _tao_any._tao_replace ( + IOP::_tc_Encoding, + TAO_ENCAP_BYTE_ORDER, + stream.begin () + ); +} + +void operator<<= (CORBA::Any &_tao_any, IOP::Encoding *_tao_elem) // non copying +{ + TAO_OutputCDR stream; + stream << *_tao_elem; + _tao_any._tao_replace ( + IOP::_tc_Encoding, + TAO_ENCAP_BYTE_ORDER, + stream.begin (), + 1, + _tao_elem, + IOP::Encoding::_tao_any_destructor + ); +} + +CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, IOP::Encoding *&_tao_elem) +{ + return _tao_any >>= ACE_const_cast(const IOP::Encoding*&,_tao_elem); +} + +CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const IOP::Encoding *&_tao_elem) +{ + _tao_elem = 0; + ACE_TRY_NEW_ENV + { + CORBA::TypeCode_var type = _tao_any.type (); + if (!type->equivalent (IOP::_tc_Encoding, ACE_TRY_ENV)) // not equal + { + return 0; + } + ACE_TRY_CHECK; + if (_tao_any.any_owns_data ()) + { + _tao_elem = ACE_static_cast( + const IOP::Encoding*, + _tao_any.value () + ); + return 1; + } + else + { + IOP::Encoding *tmp; + ACE_NEW_RETURN (tmp, IOP::Encoding, 0); + TAO_InputCDR stream ( + _tao_any._tao_get_cdr (), + _tao_any._tao_byte_order () + ); + if (stream >> *tmp) + { + ((CORBA::Any *)&_tao_any)->_tao_replace ( + IOP::_tc_Encoding, + 1, + ACE_static_cast (void *, tmp), + IOP::Encoding::_tao_any_destructor + ); + _tao_elem = tmp; + return 1; + } + else + { + delete tmp; + } + } + } + ACE_CATCHANY + { + } + ACE_ENDTRY; + return 0; +} + +#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ + defined (ACE_HAS_GNU_REPO) + template class TAO_Object_Manager<IOP::CodecFactory,IOP::CodecFactory_var>; + #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) + # pragma instantiate TAO_Object_Manager<IOP::CodecFactory,IOP::CodecFactory_var> +#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ + #if !defined _TAO_CDR_OP_IOP_TaggedProfile__tao_seq_Octet_CPP_ #define _TAO_CDR_OP_IOP_TaggedProfile__tao_seq_Octet_CPP_ @@ -1844,6 +2627,48 @@ CORBA::Boolean operator>> ( return 0; // error } +CORBA::Boolean operator<< ( + TAO_OutputCDR &strm, + const IOP::TaggedComponentSeq &_tao_sequence + ) +{ + if (strm << _tao_sequence.length ()) + { + // encode all elements + CORBA::Boolean _tao_marshal_flag = 1; + for (CORBA::ULong i = 0; i < _tao_sequence.length () && _tao_marshal_flag; i++) + { + _tao_marshal_flag = (strm << _tao_sequence[i]); + } + return _tao_marshal_flag; + } + return 0; // error +} + +CORBA::Boolean operator>> ( + TAO_InputCDR &strm, + IOP::TaggedComponentSeq &_tao_sequence + ) +{ + CORBA::ULong _tao_seq_len; + if (strm >> _tao_seq_len) + { + // set the length of the sequence + _tao_sequence.length (_tao_seq_len); + // If length is 0 we return true. + if (0 >= _tao_seq_len) + return 1; + // retrieve all the elements + CORBA::Boolean _tao_marshal_flag = 1; + for (CORBA::ULong i = 0; i < _tao_sequence.length () && _tao_marshal_flag; i++) + { + _tao_marshal_flag = (strm >> _tao_sequence[i]); + } + return _tao_marshal_flag; + } + return 0; // error +} + #if !defined _TAO_CDR_OP_IOP_ServiceContext__tao_seq_Octet_CPP_ #define _TAO_CDR_OP_IOP_ServiceContext__tao_seq_Octet_CPP_ diff --git a/TAO/tao/IOPC.h b/TAO/tao/IOPC.h index c7d6b1edf6d..b9a4cfbdbef 100644 --- a/TAO/tao/IOPC.h +++ b/TAO/tao/IOPC.h @@ -8,7 +8,7 @@ // Washington University // St. Louis, MO // USA -// http://www.cs.wustl.edu/~schmidt/doc-group.html +// http://www.cs.wustl.edu/~schmidt/doc-center.html // and // Distributed Object Computing Laboratory // University of California at Irvine @@ -23,14 +23,18 @@ #define _TAO_IDL_IOPC_H_ #include "ace/pre.h" -#include "tao/TAO_Export.h" + +#include "TAO_Export.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#include "tao/CDR.h" -#include "tao/Sequence.h" +#include "Any.h" +#include "Object.h" +#include "Exception.h" +#include "CDR.h" +#include "Sequence.h" #if defined (TAO_EXPORT_MACRO) #undef TAO_EXPORT_MACRO @@ -51,6 +55,10 @@ #pragma warning(disable:4250) #endif /* _MSC_VER */ +#if defined (__BORLANDC__) +#pragma option push -w-rvl -w-rch -w-ccc -w-inl +#endif /* __BORLANDC__ */ + TAO_NAMESPACE IOP { typedef CORBA::ULong ProfileId; @@ -99,7 +107,7 @@ TAO_NAMESPACE IOP CORBA::ULong max, CORBA::ULong length, CORBA::Octet *buffer, - CORBA::Boolean release=0 + CORBA::Boolean release = 0 ); _tao_seq_Octet (const _tao_seq_Octet &); // copy ctor ~_tao_seq_Octet (void); @@ -149,7 +157,9 @@ TAO_NAMESPACE IOP operator _tao_seq_Octet &(); operator _tao_seq_Octet &() const; - CORBA::Octet &operator[] (CORBA::ULong index); + CORBA::Octet & operator[] (CORBA::ULong index); + const CORBA::Octet & operator[] (CORBA::ULong index) const; + // in, inout, out, _retn const _tao_seq_Octet &in (void) const; _tao_seq_Octet &inout (void); @@ -179,7 +189,7 @@ TAO_NAMESPACE IOP operator _tao_seq_Octet *&(); _tao_seq_Octet *&ptr (void); _tao_seq_Octet *operator-> (void); - CORBA::Octet &operator[] (CORBA::ULong index); + CORBA::Octet & operator[] (CORBA::ULong index); private: _tao_seq_Octet *&ptr_; @@ -326,7 +336,7 @@ TAO_NAMESPACE IOP CORBA::ULong max, CORBA::ULong length, ACE_NESTED_CLASS (IOP, TaggedProfile) *buffer, - CORBA::Boolean release=0 + CORBA::Boolean release = 0 ); _tao_seq_TaggedProfile (const _tao_seq_TaggedProfile &); // copy ctor ~_tao_seq_TaggedProfile (void); @@ -366,7 +376,9 @@ TAO_NAMESPACE IOP operator _tao_seq_TaggedProfile &() const; operator _tao_seq_TaggedProfile *&(); // variable-size base types only - ACE_NESTED_CLASS (IOP, TaggedProfile) &operator[] (CORBA::ULong index); + ACE_NESTED_CLASS (IOP, TaggedProfile) & operator[] (CORBA::ULong index); + const ACE_NESTED_CLASS (IOP, TaggedProfile) & operator[] (CORBA::ULong index) const; + // in, inout, out, _retn const _tao_seq_TaggedProfile &in (void) const; _tao_seq_TaggedProfile &inout (void); @@ -396,7 +408,7 @@ TAO_NAMESPACE IOP operator _tao_seq_TaggedProfile *&(); _tao_seq_TaggedProfile *&ptr (void); _tao_seq_TaggedProfile *operator-> (void); - ACE_NESTED_CLASS (IOP, TaggedProfile) &operator[] (CORBA::ULong index); + ACE_NESTED_CLASS (IOP, TaggedProfile) & operator[] (CORBA::ULong index); private: _tao_seq_TaggedProfile *&ptr_; @@ -505,7 +517,7 @@ TAO_NAMESPACE IOP CORBA::ULong max, CORBA::ULong length, CORBA::Octet *buffer, - CORBA::Boolean release=0 + CORBA::Boolean release = 0 ); _tao_seq_Octet (const _tao_seq_Octet &); // copy ctor ~_tao_seq_Octet (void); @@ -555,7 +567,9 @@ TAO_NAMESPACE IOP operator _tao_seq_Octet &(); operator _tao_seq_Octet &() const; - CORBA::Octet &operator[] (CORBA::ULong index); + CORBA::Octet & operator[] (CORBA::ULong index); + const CORBA::Octet & operator[] (CORBA::ULong index) const; + // in, inout, out, _retn const _tao_seq_Octet &in (void) const; _tao_seq_Octet &inout (void); @@ -585,7 +599,7 @@ TAO_NAMESPACE IOP operator _tao_seq_Octet *&(); _tao_seq_Octet *&ptr (void); _tao_seq_Octet *operator-> (void); - CORBA::Octet &operator[] (CORBA::ULong index); + CORBA::Octet & operator[] (CORBA::ULong index); private: _tao_seq_Octet *&ptr_; @@ -719,7 +733,7 @@ TAO_NAMESPACE IOP CORBA::ULong max, CORBA::ULong length, TaggedComponent *buffer, - CORBA::Boolean release=0 + CORBA::Boolean release = 0 ); MultipleComponentProfile (const MultipleComponentProfile &); // copy ctor ~MultipleComponentProfile (void); @@ -759,7 +773,9 @@ TAO_NAMESPACE IOP operator MultipleComponentProfile &() const; operator MultipleComponentProfile *&(); // variable-size base types only - TaggedComponent &operator[] (CORBA::ULong index); + TaggedComponent & operator[] (CORBA::ULong index); + const TaggedComponent & operator[] (CORBA::ULong index) const; + // in, inout, out, _retn const MultipleComponentProfile &in (void) const; MultipleComponentProfile &inout (void); @@ -789,7 +805,7 @@ TAO_NAMESPACE IOP operator MultipleComponentProfile *&(); MultipleComponentProfile *&ptr (void); MultipleComponentProfile *operator-> (void); - TaggedComponent &operator[] (CORBA::ULong index); + TaggedComponent & operator[] (CORBA::ULong index); private: MultipleComponentProfile *&ptr_; @@ -869,7 +885,7 @@ TAO_NAMESPACE IOP CORBA::ULong max, CORBA::ULong length, TaggedComponent *buffer, - CORBA::Boolean release=0 + CORBA::Boolean release = 0 ); TaggedComponentList (const TaggedComponentList &); // copy ctor ~TaggedComponentList (void); @@ -909,7 +925,9 @@ TAO_NAMESPACE IOP operator TaggedComponentList &() const; operator TaggedComponentList *&(); // variable-size base types only - TaggedComponent &operator[] (CORBA::ULong index); + TaggedComponent & operator[] (CORBA::ULong index); + const TaggedComponent & operator[] (CORBA::ULong index) const; + // in, inout, out, _retn const TaggedComponentList &in (void) const; TaggedComponentList &inout (void); @@ -939,7 +957,7 @@ TAO_NAMESPACE IOP operator TaggedComponentList *&(); TaggedComponentList *&ptr (void); TaggedComponentList *operator-> (void); - TaggedComponent &operator[] (CORBA::ULong index); + TaggedComponent & operator[] (CORBA::ULong index); private: TaggedComponentList *&ptr_; @@ -952,6 +970,158 @@ TAO_NAMESPACE IOP TAO_NAMESPACE_STORAGE_CLASS CORBA::TypeCode_ptr _tc_TaggedComponentList; + +#if !defined (TAO_USE_SEQUENCE_TEMPLATES) + +#if !defined (__TAO_UNBOUNDED_SEQUENCE_IOP_TAGGEDCOMPONENTSEQ_CH_) +#define __TAO_UNBOUNDED_SEQUENCE_IOP_TAGGEDCOMPONENTSEQ_CH_ + + class TAO_EXPORT_NESTED_MACRO _TAO_Unbounded_Sequence_IOP_TaggedComponentSeq : public TAO_Unbounded_Base_Sequence + { + public: + // = Initialization and termination methods. + + _TAO_Unbounded_Sequence_IOP_TaggedComponentSeq (void); // Default constructor. + _TAO_Unbounded_Sequence_IOP_TaggedComponentSeq (CORBA::ULong maximum); + _TAO_Unbounded_Sequence_IOP_TaggedComponentSeq (CORBA::ULong maximum, + CORBA::ULong length, + TaggedComponent *data, + CORBA::Boolean release = 0); + _TAO_Unbounded_Sequence_IOP_TaggedComponentSeq (const _TAO_Unbounded_Sequence_IOP_TaggedComponentSeq &rhs); + _TAO_Unbounded_Sequence_IOP_TaggedComponentSeq &operator= (const _TAO_Unbounded_Sequence_IOP_TaggedComponentSeq &rhs); + virtual ~_TAO_Unbounded_Sequence_IOP_TaggedComponentSeq (void); // Dtor. + // = Accessors. + TaggedComponent &operator[] (CORBA::ULong i); + const TaggedComponent &operator[] (CORBA::ULong i) const; + // = Static operations. + static TaggedComponent *allocbuf (CORBA::ULong size); + static void freebuf (TaggedComponent *buffer); + virtual void _allocate_buffer (CORBA::ULong length); + virtual void _deallocate_buffer (void); + // Implement the TAO_Base_Sequence methods (see Sequence.h) + + TaggedComponent *get_buffer (CORBA::Boolean orphan = 0); + const TaggedComponent *get_buffer (void) const; + void replace (CORBA::ULong max, + CORBA::ULong length, + TaggedComponent *data, + CORBA::Boolean release); + }; + +#endif /* end #if !defined */ + + +#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ + +#if !defined (_IOP_TAGGEDCOMPONENTSEQ_CH_) +#define _IOP_TAGGEDCOMPONENTSEQ_CH_ + + class TaggedComponentSeq; + class TaggedComponentSeq_var; + + // ************************************************************* + // TaggedComponentSeq + // ************************************************************* + + class TAO_Export TaggedComponentSeq : public +#if !defined (TAO_USE_SEQUENCE_TEMPLATES) + _TAO_Unbounded_Sequence_IOP_TaggedComponentSeq +#else /* TAO_USE_SEQUENCE_TEMPLATES */ + TAO_Unbounded_Sequence<TaggedComponent> +#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ + { + public: + TaggedComponentSeq (void); // default ctor + TaggedComponentSeq (CORBA::ULong max); // uses max size + TaggedComponentSeq ( + CORBA::ULong max, + CORBA::ULong length, + TaggedComponent *buffer, + CORBA::Boolean release = 0 + ); + TaggedComponentSeq (const TaggedComponentSeq &); // copy ctor + ~TaggedComponentSeq (void); + static void _tao_any_destructor (void*); + +#if !defined(__GNUC__) || !defined (ACE_HAS_GNUG_PRE_2_8) + typedef TaggedComponentSeq_var _var_type; +#endif /* ! __GNUC__ || g++ >= 2.8 */ + + }; + +#endif /* end #if !defined */ + + +#if !defined (_IOP_TAGGEDCOMPONENTSEQ___VAR_CH_) +#define _IOP_TAGGEDCOMPONENTSEQ___VAR_CH_ + + // ************************************************************* + // class IOP::TaggedComponentSeq_var + // ************************************************************* + + class TAO_Export TaggedComponentSeq_var + { + public: + TaggedComponentSeq_var (void); // default constructor + TaggedComponentSeq_var (TaggedComponentSeq *); + TaggedComponentSeq_var (const TaggedComponentSeq_var &); // copy constructor + ~TaggedComponentSeq_var (void); // destructor + + TaggedComponentSeq_var &operator= (TaggedComponentSeq *); + TaggedComponentSeq_var &operator= (const TaggedComponentSeq_var &); + TaggedComponentSeq *operator-> (void); + const TaggedComponentSeq *operator-> (void) const; + + operator const TaggedComponentSeq &() const; + operator TaggedComponentSeq &(); + operator TaggedComponentSeq &() const; + operator TaggedComponentSeq *&(); // variable-size base types only + + TaggedComponent & operator[] (CORBA::ULong index); + const TaggedComponent & operator[] (CORBA::ULong index) const; + + // in, inout, out, _retn + const TaggedComponentSeq &in (void) const; + TaggedComponentSeq &inout (void); + TaggedComponentSeq *&out (void); + TaggedComponentSeq *_retn (void); + TaggedComponentSeq *ptr (void) const; + + private: + TaggedComponentSeq *ptr_; + }; + + +#endif /* end #if !defined */ + + +#if !defined (_IOP_TAGGEDCOMPONENTSEQ___OUT_CH_) +#define _IOP_TAGGEDCOMPONENTSEQ___OUT_CH_ + + class TAO_Export TaggedComponentSeq_out + { + public: + TaggedComponentSeq_out (TaggedComponentSeq *&); + TaggedComponentSeq_out (TaggedComponentSeq_var &); + TaggedComponentSeq_out (const TaggedComponentSeq_out &); + TaggedComponentSeq_out &operator= (const TaggedComponentSeq_out &); + TaggedComponentSeq_out &operator= (TaggedComponentSeq *); + operator TaggedComponentSeq *&(); + TaggedComponentSeq *&ptr (void); + TaggedComponentSeq *operator-> (void); + TaggedComponent & operator[] (CORBA::ULong index); + + private: + TaggedComponentSeq *&ptr_; + // assignment from T_var not allowed + void operator= (const TaggedComponentSeq_var &); + }; + + +#endif /* end #if !defined */ + + TAO_NAMESPACE_STORAGE_CLASS CORBA::TypeCode_ptr _tc_TaggedComponentSeq; + TAO_NAMESPACE_STORAGE_CLASS const CORBA::ULong TAG_ORB_TYPE; TAO_NAMESPACE_STORAGE_CLASS const CORBA::ULong TAG_CODE_SETS; @@ -1014,7 +1184,7 @@ TAO_NAMESPACE IOP CORBA::ULong max, CORBA::ULong length, CORBA::Octet *buffer, - CORBA::Boolean release=0 + CORBA::Boolean release = 0 ); _tao_seq_Octet (const _tao_seq_Octet &); // copy ctor ~_tao_seq_Octet (void); @@ -1064,7 +1234,9 @@ TAO_NAMESPACE IOP operator _tao_seq_Octet &(); operator _tao_seq_Octet &() const; - CORBA::Octet &operator[] (CORBA::ULong index); + CORBA::Octet & operator[] (CORBA::ULong index); + const CORBA::Octet & operator[] (CORBA::ULong index) const; + // in, inout, out, _retn const _tao_seq_Octet &in (void) const; _tao_seq_Octet &inout (void); @@ -1094,7 +1266,7 @@ TAO_NAMESPACE IOP operator _tao_seq_Octet *&(); _tao_seq_Octet *&ptr (void); _tao_seq_Octet *operator-> (void); - CORBA::Octet &operator[] (CORBA::ULong index); + CORBA::Octet & operator[] (CORBA::ULong index); private: _tao_seq_Octet *&ptr_; @@ -1228,7 +1400,7 @@ TAO_NAMESPACE IOP CORBA::ULong max, CORBA::ULong length, ServiceContext *buffer, - CORBA::Boolean release=0 + CORBA::Boolean release = 0 ); ServiceContextList (const ServiceContextList &); // copy ctor ~ServiceContextList (void); @@ -1268,7 +1440,9 @@ TAO_NAMESPACE IOP operator ServiceContextList &() const; operator ServiceContextList *&(); // variable-size base types only - ServiceContext &operator[] (CORBA::ULong index); + ServiceContext & operator[] (CORBA::ULong index); + const ServiceContext & operator[] (CORBA::ULong index) const; + // in, inout, out, _retn const ServiceContextList &in (void) const; ServiceContextList &inout (void); @@ -1298,7 +1472,7 @@ TAO_NAMESPACE IOP operator ServiceContextList *&(); ServiceContextList *&ptr (void); ServiceContextList *operator-> (void); - ServiceContext &operator[] (CORBA::ULong index); + ServiceContext & operator[] (CORBA::ULong index); private: ServiceContextList *&ptr_; @@ -1344,9 +1518,510 @@ TAO_NAMESPACE IOP TAO_NAMESPACE_STORAGE_CLASS const CORBA::ULong FT_REQUEST; +#if !defined (_IOP_CODEC___PTR_CH_) +#define _IOP_CODEC___PTR_CH_ + + class Codec; + typedef Codec *Codec_ptr; + +#endif /* end #if !defined */ + + +#if !defined (_IOP_CODEC___VAR_CH_) +#define _IOP_CODEC___VAR_CH_ + + class TAO_Export Codec_var : public TAO_Base_var + { + public: + Codec_var (void); // default constructor + Codec_var (Codec_ptr p) : ptr_ (p) {} + Codec_var (const Codec_var &); // copy constructor + ~Codec_var (void); // destructor + + Codec_var &operator= (Codec_ptr); + Codec_var &operator= (const Codec_var &); + Codec_ptr operator-> (void) const; + + operator const Codec_ptr &() const; + operator Codec_ptr &(); + // in, inout, out, _retn + Codec_ptr in (void) const; + Codec_ptr &inout (void); + Codec_ptr &out (void); + Codec_ptr _retn (void); + Codec_ptr ptr (void) const; + + private: + Codec_ptr ptr_; + // Unimplemented - prevents widening assignment. + Codec_var (const TAO_Base_var &rhs); + Codec_var &operator= (const TAO_Base_var &rhs); + }; + + +#endif /* end #if !defined */ + + +#if !defined (_IOP_CODEC___OUT_CH_) +#define _IOP_CODEC___OUT_CH_ + + class TAO_Export Codec_out + { + public: + Codec_out (Codec_ptr &); + Codec_out (Codec_var &); + Codec_out (const Codec_out &); + Codec_out &operator= (const Codec_out &); + Codec_out &operator= (const Codec_var &); + Codec_out &operator= (Codec_ptr); + operator Codec_ptr &(); + Codec_ptr &ptr (void); + Codec_ptr operator-> (void); + + private: + Codec_ptr &ptr_; + }; + + +#endif /* end #if !defined */ + + +#if !defined (_IOP_CODEC_CH_) +#define _IOP_CODEC_CH_ + +class TAO_Export Codec : public virtual CORBA_Object + { + public: + #if !defined(__GNUC__) || !defined (ACE_HAS_GNUG_PRE_2_8) + typedef Codec_ptr _ptr_type; + typedef Codec_var _var_type; + #endif /* ! __GNUC__ || g++ >= 2.8 */ + + // the static operations + static Codec_ptr _duplicate (Codec_ptr obj); + static Codec_ptr _narrow ( + CORBA::Object_ptr obj, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ); + static Codec_ptr _unchecked_narrow ( + CORBA::Object_ptr obj, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ); + static Codec_ptr _nil (void) + { + return (Codec_ptr)0; + } + + +#if !defined (_IOP_CODEC_INVALIDTYPEFORENCODING_CH_) +#define _IOP_CODEC_INVALIDTYPEFORENCODING_CH_ + + class TAO_Export InvalidTypeForEncoding : public CORBA::UserException + { + public: + + InvalidTypeForEncoding (void); + // Default constructor. + + InvalidTypeForEncoding (const InvalidTypeForEncoding &); + // Copy constructor. + + ~InvalidTypeForEncoding (void); + // Destructor. + + InvalidTypeForEncoding &operator= (const InvalidTypeForEncoding &); + + virtual void _raise (void); + + virtual void _tao_encode ( + TAO_OutputCDR &, + CORBA::Environment & + ) const; + + virtual void _tao_decode ( + TAO_InputCDR &, + CORBA::Environment & + ); + + static InvalidTypeForEncoding *_downcast (CORBA::Exception *); + + + // = TAO extension. + static CORBA::Exception *_alloc (void); + }; // Exception IOP::Codec::InvalidTypeForEncoding. + + +#endif /* end #if !defined */ + + +#if !defined (_IOP_CODEC_FORMATMISMATCH_CH_) +#define _IOP_CODEC_FORMATMISMATCH_CH_ + + class TAO_Export FormatMismatch : public CORBA::UserException + { + public: + + FormatMismatch (void); + // Default constructor. + + FormatMismatch (const FormatMismatch &); + // Copy constructor. + + ~FormatMismatch (void); + // Destructor. + + FormatMismatch &operator= (const FormatMismatch &); + + virtual void _raise (void); + + virtual void _tao_encode ( + TAO_OutputCDR &, + CORBA::Environment & + ) const; + + virtual void _tao_decode ( + TAO_InputCDR &, + CORBA::Environment & + ); + + static FormatMismatch *_downcast (CORBA::Exception *); + + + // = TAO extension. + static CORBA::Exception *_alloc (void); + }; // Exception IOP::Codec::FormatMismatch. + + +#endif /* end #if !defined */ + + +#if !defined (_IOP_CODEC_TYPEMISMATCH_CH_) +#define _IOP_CODEC_TYPEMISMATCH_CH_ + + class TAO_Export TypeMismatch : public CORBA::UserException + { + public: + + TypeMismatch (void); + // Default constructor. + + TypeMismatch (const TypeMismatch &); + // Copy constructor. + + ~TypeMismatch (void); + // Destructor. + + TypeMismatch &operator= (const TypeMismatch &); + + virtual void _raise (void); + + virtual void _tao_encode ( + TAO_OutputCDR &, + CORBA::Environment & + ) const; + + virtual void _tao_decode ( + TAO_InputCDR &, + CORBA::Environment & + ); + + static TypeMismatch *_downcast (CORBA::Exception *); + + + // = TAO extension. + static CORBA::Exception *_alloc (void); + }; // Exception IOP::Codec::TypeMismatch. + + +#endif /* end #if !defined */ + + virtual CORBA::OctetSeq * encode ( + const CORBA::Any & data, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + IOP::Codec::InvalidTypeForEncoding + )) = 0; + + virtual CORBA::Any * decode ( + const CORBA::OctetSeq & data, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + IOP::Codec::FormatMismatch + )) = 0; + + virtual CORBA::OctetSeq * encode_value ( + const CORBA::Any & data, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + IOP::Codec::InvalidTypeForEncoding + )) = 0; + + virtual CORBA::Any * decode_value ( + const CORBA::OctetSeq & data, + CORBA::TypeCode_ptr tc, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + IOP::Codec::FormatMismatch, + IOP::Codec::TypeMismatch + )) = 0; + + virtual void *_tao_QueryInterface (ptr_arith_t type); + + virtual const char* _interface_repository_id (void) const; + + protected: + Codec (); + + virtual ~Codec (void); + private: + Codec (const Codec &); + void operator= (const Codec &); + }; + + +#endif /* end #if !defined */ + + typedef CORBA::Short EncodingFormat; + typedef CORBA::Short_out EncodingFormat_out; + TAO_NAMESPACE_STORAGE_CLASS CORBA::TypeCode_ptr _tc_EncodingFormat; + + TAO_NAMESPACE_STORAGE_CLASS const CORBA::Short ENCODING_CDR_ENCAPS; + + struct Encoding; + class Encoding_var; + + struct TAO_Export Encoding + { + +#if !defined(__GNUC__) || !defined (ACE_HAS_GNUG_PRE_2_8) + typedef Encoding_var _var_type; +#endif /* ! __GNUC__ || g++ >= 2.8 */ + + static void _tao_any_destructor (void*); + + ACE_NESTED_CLASS (IOP, EncodingFormat) format; + CORBA::Octet major_version; + CORBA::Octet minor_version; + }; + + class TAO_Export Encoding_var + { + public: + Encoding_var (void); // default constructor + Encoding_var (Encoding *); + Encoding_var (const Encoding_var &); // copy constructor + Encoding_var (const Encoding &); // fixed-size types only + ~Encoding_var (void); // destructor + + Encoding_var &operator= (Encoding *); + Encoding_var &operator= (const Encoding_var &); + Encoding_var &operator= (const Encoding &); // fixed-size types only + Encoding *operator-> (void); + const Encoding *operator-> (void) const; + + operator const Encoding &() const; + operator Encoding &(); + operator Encoding &() const; + + // in, inout, out, _retn + const Encoding &in (void) const; + Encoding &inout (void); + Encoding &out (void); + Encoding _retn (void); + Encoding *ptr (void) const; + + private: + Encoding *ptr_; + }; + + typedef Encoding &Encoding_out; + + TAO_NAMESPACE_STORAGE_CLASS CORBA::TypeCode_ptr _tc_Encoding; + + +#if !defined (_IOP_CODECFACTORY___PTR_CH_) +#define _IOP_CODECFACTORY___PTR_CH_ + + class CodecFactory; + typedef CodecFactory *CodecFactory_ptr; + +#endif /* end #if !defined */ + + +#if !defined (_IOP_CODECFACTORY___VAR_CH_) +#define _IOP_CODECFACTORY___VAR_CH_ + + class TAO_Export CodecFactory_var : public TAO_Base_var + { + public: + CodecFactory_var (void); // default constructor + CodecFactory_var (CodecFactory_ptr p) : ptr_ (p) {} + CodecFactory_var (const CodecFactory_var &); // copy constructor + ~CodecFactory_var (void); // destructor + + CodecFactory_var &operator= (CodecFactory_ptr); + CodecFactory_var &operator= (const CodecFactory_var &); + CodecFactory_ptr operator-> (void) const; + + operator const CodecFactory_ptr &() const; + operator CodecFactory_ptr &(); + // in, inout, out, _retn + CodecFactory_ptr in (void) const; + CodecFactory_ptr &inout (void); + CodecFactory_ptr &out (void); + CodecFactory_ptr _retn (void); + CodecFactory_ptr ptr (void) const; + + private: + CodecFactory_ptr ptr_; + // Unimplemented - prevents widening assignment. + CodecFactory_var (const TAO_Base_var &rhs); + CodecFactory_var &operator= (const TAO_Base_var &rhs); + }; + + +#endif /* end #if !defined */ + + +#if !defined (_IOP_CODECFACTORY___OUT_CH_) +#define _IOP_CODECFACTORY___OUT_CH_ + + class TAO_Export CodecFactory_out + { + public: + CodecFactory_out (CodecFactory_ptr &); + CodecFactory_out (CodecFactory_var &); + CodecFactory_out (const CodecFactory_out &); + CodecFactory_out &operator= (const CodecFactory_out &); + CodecFactory_out &operator= (const CodecFactory_var &); + CodecFactory_out &operator= (CodecFactory_ptr); + operator CodecFactory_ptr &(); + CodecFactory_ptr &ptr (void); + CodecFactory_ptr operator-> (void); + + private: + CodecFactory_ptr &ptr_; + }; + + +#endif /* end #if !defined */ + + +#if !defined (_IOP_CODECFACTORY_CH_) +#define _IOP_CODECFACTORY_CH_ + +class TAO_Export CodecFactory : public virtual CORBA_Object + { + public: + #if !defined(__GNUC__) || !defined (ACE_HAS_GNUG_PRE_2_8) + typedef CodecFactory_ptr _ptr_type; + typedef CodecFactory_var _var_type; + #endif /* ! __GNUC__ || g++ >= 2.8 */ + + // the static operations + static CodecFactory_ptr _duplicate (CodecFactory_ptr obj); + static CodecFactory_ptr _narrow ( + CORBA::Object_ptr obj, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ); + static CodecFactory_ptr _unchecked_narrow ( + CORBA::Object_ptr obj, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ); + static CodecFactory_ptr _nil (void) + { + return (CodecFactory_ptr)0; + } + + +#if !defined (_IOP_CODECFACTORY_UNKNOWNENCODING_CH_) +#define _IOP_CODECFACTORY_UNKNOWNENCODING_CH_ + + class TAO_Export UnknownEncoding : public CORBA::UserException + { + public: + + UnknownEncoding (void); + // Default constructor. + + UnknownEncoding (const UnknownEncoding &); + // Copy constructor. + + ~UnknownEncoding (void); + // Destructor. + + UnknownEncoding &operator= (const UnknownEncoding &); + + virtual void _raise (void); + + virtual void _tao_encode ( + TAO_OutputCDR &, + CORBA::Environment & + ) const; + + virtual void _tao_decode ( + TAO_InputCDR &, + CORBA::Environment & + ); + + static UnknownEncoding *_downcast (CORBA::Exception *); + + + // = TAO extension. + static CORBA::Exception *_alloc (void); + }; // Exception IOP::CodecFactory::UnknownEncoding. + + +#endif /* end #if !defined */ + + virtual IOP::Codec_ptr create_codec ( + const IOP::Encoding & enc, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException, + IOP::CodecFactory::UnknownEncoding + )) = 0; + + virtual void *_tao_QueryInterface (ptr_arith_t type); + + virtual const char* _interface_repository_id (void) const; + + protected: + CodecFactory (); + + virtual ~CodecFactory (void); + private: + CodecFactory (const CodecFactory &); + void operator= (const CodecFactory &); + }; + + +#endif /* end #if !defined */ + + } TAO_NAMESPACE_CLOSE // module IOP +// Proxy Broker Factory function pointer declarations. + TAO_Export void operator<<= (CORBA::Any &, const IOP::TaggedProfile &); // copying version TAO_Export void operator<<= (CORBA::Any &, IOP::TaggedProfile*); // noncopying version TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, IOP::TaggedProfile *&); // deprecated @@ -1367,6 +2042,10 @@ TAO_Export void operator<<= (CORBA::Any &, const IOP::TaggedComponentList &); // TAO_Export void operator<<= (CORBA::Any &, IOP::TaggedComponentList*); // noncopying version TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, IOP::TaggedComponentList *&); // deprecated TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const IOP::TaggedComponentList *&); +TAO_Export void operator<<= (CORBA::Any &, const IOP::TaggedComponentSeq &); // copying version +TAO_Export void operator<<= (CORBA::Any &, IOP::TaggedComponentSeq*); // noncopying version +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, IOP::TaggedComponentSeq *&); // deprecated +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const IOP::TaggedComponentSeq *&); TAO_Export void operator<<= (CORBA::Any &, const IOP::ServiceContext &); // copying version TAO_Export void operator<<= (CORBA::Any &, IOP::ServiceContext*); // noncopying version TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, IOP::ServiceContext *&); // deprecated @@ -1375,6 +2054,10 @@ TAO_Export void operator<<= (CORBA::Any &, const IOP::ServiceContextList &); // TAO_Export void operator<<= (CORBA::Any &, IOP::ServiceContextList*); // noncopying version TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, IOP::ServiceContextList *&); // deprecated TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const IOP::ServiceContextList *&); +TAO_Export void operator<<= (CORBA::Any &, const IOP::Encoding &); // copying version +TAO_Export void operator<<= (CORBA::Any &, IOP::Encoding*); // noncopying version +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, IOP::Encoding *&); // deprecated +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const IOP::Encoding *&); #ifndef __ACE_INLINE__ @@ -1459,6 +2142,21 @@ TAO_Export CORBA::Boolean operator>> ( #endif /* _TAO_CDR_OP_IOP_TaggedComponentList_H_ */ + +#if !defined _TAO_CDR_OP_IOP_TaggedComponentSeq_H_ +#define _TAO_CDR_OP_IOP_TaggedComponentSeq_H_ + +TAO_Export CORBA::Boolean operator<< ( + TAO_OutputCDR &, + const IOP::TaggedComponentSeq & + ); +TAO_Export CORBA::Boolean operator>> ( + TAO_InputCDR &, + IOP::TaggedComponentSeq & + ); + +#endif /* _TAO_CDR_OP_IOP_TaggedComponentSeq_H_ */ + TAO_Export CORBA::Boolean operator<< (TAO_OutputCDR &, const IOP::ServiceContext &); TAO_Export CORBA::Boolean operator>> (TAO_InputCDR &, IOP::ServiceContext &); @@ -1491,6 +2189,8 @@ TAO_Export CORBA::Boolean operator>> ( #endif /* _TAO_CDR_OP_IOP_ServiceContextList_H_ */ +TAO_Export CORBA::Boolean operator<< (TAO_OutputCDR &, const IOP::Encoding &); +TAO_Export CORBA::Boolean operator>> (TAO_InputCDR &, IOP::Encoding &); #endif /* __ACE_INLINE__ */ @@ -1503,5 +2203,9 @@ TAO_Export CORBA::Boolean operator>> ( #pragma warning(pop) #endif /* _MSC_VER */ +#if defined (__BORLANDC__) +#pragma option pop +#endif /* __BORLANDC__ */ + #include "ace/post.h" #endif /* ifndef */ diff --git a/TAO/tao/IOPC.i b/TAO/tao/IOPC.i index 2881a39a3f6..aba1dad1014 100644 --- a/TAO/tao/IOPC.i +++ b/TAO/tao/IOPC.i @@ -8,7 +8,7 @@ // Washington University // St. Louis, MO // USA -// http://www.cs.wustl.edu/~schmidt/doc-group.html +// http://www.cs.wustl.edu/~schmidt/doc-center.html // and // Distributed Object Computing Laboratory // University of California at Irvine @@ -68,12 +68,12 @@ IOP::TaggedProfile_var::operator= (const ::IOP::TaggedProfile_var &p) } else { - IOP::TaggedProfile *deep_copy = - new IOP::TaggedProfile (*p.ptr_); + TaggedProfile *deep_copy = + new TaggedProfile (*p.ptr_); if (deep_copy != 0) { - IOP::TaggedProfile *tmp = deep_copy; + TaggedProfile *tmp = deep_copy; deep_copy = this->ptr_; this->ptr_ = tmp; delete deep_copy; @@ -260,8 +260,8 @@ IOP::TaggedProfile::_tao_seq_Octet_var::operator= (_tao_seq_Octet *p) return *this; } -ACE_INLINE IOP::TaggedProfile::_tao_seq_Octet_var & -IOP::TaggedProfile::_tao_seq_Octet_var::operator= (const ::IOP::TaggedProfile::_tao_seq_Octet_var &p) // deep copy +ACE_INLINE ::IOP::TaggedProfile::_tao_seq_Octet_var & +IOP::TaggedProfile::_tao_seq_Octet_var::operator= (const ::IOP::TaggedProfile::_tao_seq_Octet_var &p) { if (this != &p) { @@ -272,12 +272,12 @@ IOP::TaggedProfile::_tao_seq_Octet_var::operator= (const ::IOP::TaggedProfile::_ } else { - IOP::TaggedProfile::_tao_seq_Octet *deep_copy = - new IOP::TaggedProfile::_tao_seq_Octet (*p.ptr_); + _tao_seq_Octet *deep_copy = + new _tao_seq_Octet (*p.ptr_); if (deep_copy != 0) { - IOP::TaggedProfile::_tao_seq_Octet *tmp = deep_copy; + _tao_seq_Octet *tmp = deep_copy; deep_copy = this->ptr_; this->ptr_ = tmp; delete deep_copy; @@ -336,6 +336,12 @@ IOP::TaggedProfile::_tao_seq_Octet_var::operator[] (CORBA::ULong index) return this->ptr_->operator[] (index); } +ACE_INLINE const CORBA::Octet & +IOP::TaggedProfile::_tao_seq_Octet_var::operator[] (CORBA::ULong index) const +{ + return ACE_const_cast (const CORBA::Octet &, this->ptr_->operator[] (index)); +} + ACE_INLINE const ::IOP::TaggedProfile::_tao_seq_Octet & IOP::TaggedProfile::_tao_seq_Octet_var::in (void) const { @@ -485,12 +491,12 @@ IOP::IOR_var::operator= (const ::IOP::IOR_var &p) } else { - IOP::IOR *deep_copy = - new IOP::IOR (*p.ptr_); + IOR *deep_copy = + new IOR (*p.ptr_); if (deep_copy != 0) { - IOP::IOR *tmp = deep_copy; + IOR *tmp = deep_copy; deep_copy = this->ptr_; this->ptr_ = tmp; delete deep_copy; @@ -846,8 +852,8 @@ IOP::IOR::_tao_seq_TaggedProfile_var::operator= (_tao_seq_TaggedProfile *p) return *this; } -ACE_INLINE IOP::IOR::_tao_seq_TaggedProfile_var & -IOP::IOR::_tao_seq_TaggedProfile_var::operator= (const ::IOP::IOR::_tao_seq_TaggedProfile_var &p) // deep copy +ACE_INLINE ::IOP::IOR::_tao_seq_TaggedProfile_var & +IOP::IOR::_tao_seq_TaggedProfile_var::operator= (const ::IOP::IOR::_tao_seq_TaggedProfile_var &p) { if (this != &p) { @@ -858,12 +864,12 @@ IOP::IOR::_tao_seq_TaggedProfile_var::operator= (const ::IOP::IOR::_tao_seq_Tagg } else { - IOP::IOR::_tao_seq_TaggedProfile *deep_copy = - new IOP::IOR::_tao_seq_TaggedProfile (*p.ptr_); + _tao_seq_TaggedProfile *deep_copy = + new _tao_seq_TaggedProfile (*p.ptr_); if (deep_copy != 0) { - IOP::IOR::_tao_seq_TaggedProfile *tmp = deep_copy; + _tao_seq_TaggedProfile *tmp = deep_copy; deep_copy = this->ptr_; this->ptr_ = tmp; delete deep_copy; @@ -917,6 +923,12 @@ IOP::IOR::_tao_seq_TaggedProfile_var::operator[] (CORBA::ULong index) return this->ptr_->operator[] (index); } +ACE_INLINE const IOP::TaggedProfile & +IOP::IOR::_tao_seq_TaggedProfile_var::operator[] (CORBA::ULong index) const +{ + return ACE_const_cast (const IOP::TaggedProfile &, this->ptr_->operator[] (index)); +} + ACE_INLINE const ::IOP::IOR::_tao_seq_TaggedProfile & IOP::IOR::_tao_seq_TaggedProfile_var::in (void) const { @@ -1066,12 +1078,12 @@ IOP::TaggedComponent_var::operator= (const ::IOP::TaggedComponent_var &p) } else { - IOP::TaggedComponent *deep_copy = - new IOP::TaggedComponent (*p.ptr_); + TaggedComponent *deep_copy = + new TaggedComponent (*p.ptr_); if (deep_copy != 0) { - IOP::TaggedComponent *tmp = deep_copy; + TaggedComponent *tmp = deep_copy; deep_copy = this->ptr_; this->ptr_ = tmp; delete deep_copy; @@ -1258,8 +1270,8 @@ IOP::TaggedComponent::_tao_seq_Octet_var::operator= (_tao_seq_Octet *p) return *this; } -ACE_INLINE IOP::TaggedComponent::_tao_seq_Octet_var & -IOP::TaggedComponent::_tao_seq_Octet_var::operator= (const ::IOP::TaggedComponent::_tao_seq_Octet_var &p) // deep copy +ACE_INLINE ::IOP::TaggedComponent::_tao_seq_Octet_var & +IOP::TaggedComponent::_tao_seq_Octet_var::operator= (const ::IOP::TaggedComponent::_tao_seq_Octet_var &p) { if (this != &p) { @@ -1270,12 +1282,12 @@ IOP::TaggedComponent::_tao_seq_Octet_var::operator= (const ::IOP::TaggedComponen } else { - IOP::TaggedComponent::_tao_seq_Octet *deep_copy = - new IOP::TaggedComponent::_tao_seq_Octet (*p.ptr_); + _tao_seq_Octet *deep_copy = + new _tao_seq_Octet (*p.ptr_); if (deep_copy != 0) { - IOP::TaggedComponent::_tao_seq_Octet *tmp = deep_copy; + _tao_seq_Octet *tmp = deep_copy; deep_copy = this->ptr_; this->ptr_ = tmp; delete deep_copy; @@ -1334,6 +1346,12 @@ IOP::TaggedComponent::_tao_seq_Octet_var::operator[] (CORBA::ULong index) return this->ptr_->operator[] (index); } +ACE_INLINE const CORBA::Octet & +IOP::TaggedComponent::_tao_seq_Octet_var::operator[] (CORBA::ULong index) const +{ + return ACE_const_cast (const CORBA::Octet &, this->ptr_->operator[] (index)); +} + ACE_INLINE const ::IOP::TaggedComponent::_tao_seq_Octet & IOP::TaggedComponent::_tao_seq_Octet_var::in (void) const { @@ -1651,8 +1669,8 @@ IOP::MultipleComponentProfile_var::operator= (MultipleComponentProfile *p) return *this; } -ACE_INLINE IOP::MultipleComponentProfile_var & -IOP::MultipleComponentProfile_var::operator= (const ::IOP::MultipleComponentProfile_var &p) // deep copy +ACE_INLINE ::IOP::MultipleComponentProfile_var & +IOP::MultipleComponentProfile_var::operator= (const ::IOP::MultipleComponentProfile_var &p) { if (this != &p) { @@ -1663,12 +1681,12 @@ IOP::MultipleComponentProfile_var::operator= (const ::IOP::MultipleComponentProf } else { - IOP::MultipleComponentProfile *deep_copy = - new IOP::MultipleComponentProfile (*p.ptr_); + MultipleComponentProfile *deep_copy = + new MultipleComponentProfile (*p.ptr_); if (deep_copy != 0) { - IOP::MultipleComponentProfile *tmp = deep_copy; + MultipleComponentProfile *tmp = deep_copy; deep_copy = this->ptr_; this->ptr_ = tmp; delete deep_copy; @@ -1722,6 +1740,12 @@ IOP::MultipleComponentProfile_var::operator[] (CORBA::ULong index) return this->ptr_->operator[] (index); } +ACE_INLINE const IOP::TaggedComponent & +IOP::MultipleComponentProfile_var::operator[] (CORBA::ULong index) const +{ + return ACE_const_cast (const IOP::TaggedComponent &, this->ptr_->operator[] (index)); +} + ACE_INLINE const ::IOP::MultipleComponentProfile & IOP::MultipleComponentProfile_var::in (void) const { @@ -2039,8 +2063,8 @@ IOP::TaggedComponentList_var::operator= (TaggedComponentList *p) return *this; } -ACE_INLINE IOP::TaggedComponentList_var & -IOP::TaggedComponentList_var::operator= (const ::IOP::TaggedComponentList_var &p) // deep copy +ACE_INLINE ::IOP::TaggedComponentList_var & +IOP::TaggedComponentList_var::operator= (const ::IOP::TaggedComponentList_var &p) { if (this != &p) { @@ -2051,12 +2075,12 @@ IOP::TaggedComponentList_var::operator= (const ::IOP::TaggedComponentList_var &p } else { - IOP::TaggedComponentList *deep_copy = - new IOP::TaggedComponentList (*p.ptr_); + TaggedComponentList *deep_copy = + new TaggedComponentList (*p.ptr_); if (deep_copy != 0) { - IOP::TaggedComponentList *tmp = deep_copy; + TaggedComponentList *tmp = deep_copy; deep_copy = this->ptr_; this->ptr_ = tmp; delete deep_copy; @@ -2110,6 +2134,12 @@ IOP::TaggedComponentList_var::operator[] (CORBA::ULong index) return this->ptr_->operator[] (index); } +ACE_INLINE const IOP::TaggedComponent & +IOP::TaggedComponentList_var::operator[] (CORBA::ULong index) const +{ + return ACE_const_cast (const IOP::TaggedComponent &, this->ptr_->operator[] (index)); +} + ACE_INLINE const ::IOP::TaggedComponentList & IOP::TaggedComponentList_var::in (void) const { @@ -2210,6 +2240,400 @@ IOP::TaggedComponentList_out::operator[] (CORBA::ULong index) #endif /* end #if !defined */ + +#if !defined (TAO_USE_SEQUENCE_TEMPLATES) + +#if !defined (__TAO_UNBOUNDED_SEQUENCE_IOP_TAGGEDCOMPONENTSEQ_CI_) +#define __TAO_UNBOUNDED_SEQUENCE_IOP_TAGGEDCOMPONENTSEQ_CI_ + + // = Static operations. + ACE_INLINE IOP::TaggedComponent * + IOP::_TAO_Unbounded_Sequence_IOP_TaggedComponentSeq::allocbuf (CORBA::ULong size) + // Allocate storage for the sequence. + { + IOP::TaggedComponent *retval = 0; + ACE_NEW_RETURN (retval, IOP::TaggedComponent[size], 0); + return retval; + } + + ACE_INLINE void IOP::_TAO_Unbounded_Sequence_IOP_TaggedComponentSeq::freebuf (IOP::TaggedComponent *buffer) + // Free the sequence. + { + delete [] buffer; + } + + ACE_INLINE + IOP::_TAO_Unbounded_Sequence_IOP_TaggedComponentSeq::_TAO_Unbounded_Sequence_IOP_TaggedComponentSeq (void) // Default constructor. + { + } + + ACE_INLINE + IOP::_TAO_Unbounded_Sequence_IOP_TaggedComponentSeq::_TAO_Unbounded_Sequence_IOP_TaggedComponentSeq (CORBA::ULong maximum) // Constructor using a maximum length value. + : TAO_Unbounded_Base_Sequence (maximum, _TAO_Unbounded_Sequence_IOP_TaggedComponentSeq::allocbuf (maximum)) + { + } + + ACE_INLINE + IOP::_TAO_Unbounded_Sequence_IOP_TaggedComponentSeq::_TAO_Unbounded_Sequence_IOP_TaggedComponentSeq (CORBA::ULong maximum, + CORBA::ULong length, + IOP::TaggedComponent *data, + CORBA::Boolean release) + : TAO_Unbounded_Base_Sequence (maximum, length, data, release) + { + } + + ACE_INLINE + IOP::_TAO_Unbounded_Sequence_IOP_TaggedComponentSeq::_TAO_Unbounded_Sequence_IOP_TaggedComponentSeq (const _TAO_Unbounded_Sequence_IOP_TaggedComponentSeq &rhs) + // Copy constructor. + : TAO_Unbounded_Base_Sequence (rhs) + { + if (rhs.buffer_ != 0) + { + IOP::TaggedComponent *tmp1 = _TAO_Unbounded_Sequence_IOP_TaggedComponentSeq::allocbuf (this->maximum_); + IOP::TaggedComponent * const tmp2 = ACE_reinterpret_cast (IOP::TaggedComponent * ACE_CAST_CONST, rhs.buffer_); + + for (CORBA::ULong i = 0; i < this->length_; ++i) + tmp1[i] = tmp2[i]; + + this->buffer_ = tmp1; + } + else + { + this->buffer_ = 0; + } + } + + ACE_INLINE IOP::_TAO_Unbounded_Sequence_IOP_TaggedComponentSeq & + IOP::_TAO_Unbounded_Sequence_IOP_TaggedComponentSeq::operator= (const _TAO_Unbounded_Sequence_IOP_TaggedComponentSeq &rhs) + // Assignment operator. + { + if (this == &rhs) + return *this; + + if (this->release_) + { + if (this->maximum_ < rhs.maximum_) + { + // free the old buffer + IOP::TaggedComponent *tmp = ACE_reinterpret_cast (IOP::TaggedComponent *, this->buffer_); + _TAO_Unbounded_Sequence_IOP_TaggedComponentSeq::freebuf (tmp); + this->buffer_ = _TAO_Unbounded_Sequence_IOP_TaggedComponentSeq::allocbuf (rhs.maximum_); + } + } + else + this->buffer_ = _TAO_Unbounded_Sequence_IOP_TaggedComponentSeq::allocbuf (rhs.maximum_); + + TAO_Unbounded_Base_Sequence::operator= (rhs); + + IOP::TaggedComponent *tmp1 = ACE_reinterpret_cast (IOP::TaggedComponent *, this->buffer_); + IOP::TaggedComponent * const tmp2 = ACE_reinterpret_cast (IOP::TaggedComponent * ACE_CAST_CONST, rhs.buffer_); + + for (CORBA::ULong i = 0; i < this->length_; ++i) + tmp1[i] = tmp2[i]; + + return *this; + } + + // = Accessors. + ACE_INLINE IOP::TaggedComponent & + IOP::_TAO_Unbounded_Sequence_IOP_TaggedComponentSeq::operator[] (CORBA::ULong i) + // operator [] + { + ACE_ASSERT (i < this->maximum_); + IOP::TaggedComponent* tmp = ACE_reinterpret_cast(IOP::TaggedComponent*,this->buffer_); + return tmp[i]; + } + + ACE_INLINE const IOP::TaggedComponent & + IOP::_TAO_Unbounded_Sequence_IOP_TaggedComponentSeq::operator[] (CORBA::ULong i) const + // operator [] + { + ACE_ASSERT (i < this->maximum_); + IOP::TaggedComponent * const tmp = ACE_reinterpret_cast (IOP::TaggedComponent* ACE_CAST_CONST, this->buffer_); + return tmp[i]; + } + + // Implement the TAO_Base_Sequence methods (see Sequence.h) + + ACE_INLINE IOP::TaggedComponent * + IOP::_TAO_Unbounded_Sequence_IOP_TaggedComponentSeq::get_buffer (CORBA::Boolean orphan) + { + IOP::TaggedComponent *result = 0; + if (orphan == 0) + { + // We retain ownership. + if (this->buffer_ == 0) + { + result = _TAO_Unbounded_Sequence_IOP_TaggedComponentSeq::allocbuf (this->length_); + this->buffer_ = result; + this->release_ = 1; + } + else + { + result = ACE_reinterpret_cast (IOP::TaggedComponent*, this->buffer_); + } + } + else // if (orphan == 1) + { + if (this->release_ != 0) + { + // We set the state back to default and relinquish + // ownership. + result = ACE_reinterpret_cast(IOP::TaggedComponent*,this->buffer_); + this->maximum_ = 0; + this->length_ = 0; + this->buffer_ = 0; + this->release_ = 0; + } + } + return result; + } + + ACE_INLINE const IOP::TaggedComponent * + IOP::_TAO_Unbounded_Sequence_IOP_TaggedComponentSeq::get_buffer (void) const + { + return ACE_reinterpret_cast(const IOP::TaggedComponent * ACE_CAST_CONST, this->buffer_); + } + + ACE_INLINE void + IOP::_TAO_Unbounded_Sequence_IOP_TaggedComponentSeq::replace (CORBA::ULong max, + CORBA::ULong length, + IOP::TaggedComponent *data, + CORBA::Boolean release) + { + this->maximum_ = max; + this->length_ = length; + if (this->buffer_ && this->release_ == 1) + { + IOP::TaggedComponent *tmp = ACE_reinterpret_cast(IOP::TaggedComponent*,this->buffer_); + _TAO_Unbounded_Sequence_IOP_TaggedComponentSeq::freebuf (tmp); + } + this->buffer_ = data; + this->release_ = release; + } + +#endif /* end #if !defined */ + + +#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ + +#if !defined (_IOP_TAGGEDCOMPONENTSEQ_CI_) +#define _IOP_TAGGEDCOMPONENTSEQ_CI_ + +// ************************************************************* +// Inline operations for class IOP::TaggedComponentSeq_var +// ************************************************************* + +ACE_INLINE +IOP::TaggedComponentSeq_var::TaggedComponentSeq_var (void) // default constructor + : ptr_ (0) +{} + +ACE_INLINE +IOP::TaggedComponentSeq_var::TaggedComponentSeq_var (TaggedComponentSeq *p) + : ptr_ (p) +{} + +ACE_INLINE +IOP::TaggedComponentSeq_var::TaggedComponentSeq_var (const ::IOP::TaggedComponentSeq_var &p) // copy constructor +{ + if (p.ptr_) + ACE_NEW (this->ptr_, ::IOP::TaggedComponentSeq (*p.ptr_)); + else + this->ptr_ = 0; +} + +ACE_INLINE +IOP::TaggedComponentSeq_var::~TaggedComponentSeq_var (void) // destructor +{ + delete this->ptr_; +} + +ACE_INLINE IOP::TaggedComponentSeq_var & +IOP::TaggedComponentSeq_var::operator= (TaggedComponentSeq *p) +{ + delete this->ptr_; + this->ptr_ = p; + return *this; +} + +ACE_INLINE ::IOP::TaggedComponentSeq_var & +IOP::TaggedComponentSeq_var::operator= (const ::IOP::TaggedComponentSeq_var &p) +{ + if (this != &p) + { + if (p.ptr_ == 0) + { + delete this->ptr_; + this->ptr_ = 0; + } + else + { + TaggedComponentSeq *deep_copy = + new TaggedComponentSeq (*p.ptr_); + + if (deep_copy != 0) + { + TaggedComponentSeq *tmp = deep_copy; + deep_copy = this->ptr_; + this->ptr_ = tmp; + delete deep_copy; + } + } + } + + return *this; +} + +ACE_INLINE const ::IOP::TaggedComponentSeq * +IOP::TaggedComponentSeq_var::operator-> (void) const +{ + return this->ptr_; +} + +ACE_INLINE ::IOP::TaggedComponentSeq * +IOP::TaggedComponentSeq_var::operator-> (void) +{ + return this->ptr_; +} + +ACE_INLINE +IOP::TaggedComponentSeq_var::operator const ::IOP::TaggedComponentSeq &() const // cast +{ + return *this->ptr_; +} + +ACE_INLINE +IOP::TaggedComponentSeq_var::operator ::IOP::TaggedComponentSeq &() // cast +{ + return *this->ptr_; +} + +ACE_INLINE +IOP::TaggedComponentSeq_var::operator ::IOP::TaggedComponentSeq &() const // cast +{ + return *this->ptr_; +} + +// variable-size types only +ACE_INLINE +IOP::TaggedComponentSeq_var::operator ::IOP::TaggedComponentSeq *&() // cast +{ + return this->ptr_; +} + +ACE_INLINE IOP::TaggedComponent & +IOP::TaggedComponentSeq_var::operator[] (CORBA::ULong index) +{ + return this->ptr_->operator[] (index); +} + +ACE_INLINE const IOP::TaggedComponent & +IOP::TaggedComponentSeq_var::operator[] (CORBA::ULong index) const +{ + return ACE_const_cast (const IOP::TaggedComponent &, this->ptr_->operator[] (index)); +} + +ACE_INLINE const ::IOP::TaggedComponentSeq & +IOP::TaggedComponentSeq_var::in (void) const +{ + return *this->ptr_; +} + +ACE_INLINE ::IOP::TaggedComponentSeq & +IOP::TaggedComponentSeq_var::inout (void) +{ + return *this->ptr_; +} + +// mapping for variable size +ACE_INLINE ::IOP::TaggedComponentSeq *& +IOP::TaggedComponentSeq_var::out (void) +{ + delete this->ptr_; + this->ptr_ = 0; + return this->ptr_; +} + +ACE_INLINE ::IOP::TaggedComponentSeq * +IOP::TaggedComponentSeq_var::_retn (void) +{ + ::IOP::TaggedComponentSeq *tmp = this->ptr_; + this->ptr_ = 0; + return tmp; +} + +ACE_INLINE ::IOP::TaggedComponentSeq * +IOP::TaggedComponentSeq_var::ptr (void) const +{ + return this->ptr_; +} + +// ************************************************************* +// Inline operations for class IOP::TaggedComponentSeq_out +// ************************************************************* + +ACE_INLINE +IOP::TaggedComponentSeq_out::TaggedComponentSeq_out (TaggedComponentSeq *&p) + : ptr_ (p) +{ + this->ptr_ = 0; +} + +ACE_INLINE +IOP::TaggedComponentSeq_out::TaggedComponentSeq_out (TaggedComponentSeq_var &p) // constructor from _var + : ptr_ (p.out ()) +{ + delete this->ptr_; + this->ptr_ = 0; +} + +ACE_INLINE +IOP::TaggedComponentSeq_out::TaggedComponentSeq_out (const ::IOP::TaggedComponentSeq_out &p) // copy constructor + : ptr_ (ACE_const_cast (TaggedComponentSeq_out&, p).ptr_) +{} + +ACE_INLINE ::IOP::TaggedComponentSeq_out & +IOP::TaggedComponentSeq_out::operator= (const ::IOP::TaggedComponentSeq_out &p) +{ + this->ptr_ = ACE_const_cast (TaggedComponentSeq_out&, p).ptr_; + return *this; +} + +ACE_INLINE ::IOP::TaggedComponentSeq_out & +IOP::TaggedComponentSeq_out::operator= (TaggedComponentSeq *p) +{ + this->ptr_ = p; + return *this; +} + +ACE_INLINE +IOP::TaggedComponentSeq_out::operator ::IOP::TaggedComponentSeq *&() // cast +{ + return this->ptr_; +} + +ACE_INLINE ::IOP::TaggedComponentSeq *& +IOP::TaggedComponentSeq_out::ptr (void) // ptr +{ + return this->ptr_; +} + +ACE_INLINE ::IOP::TaggedComponentSeq * +IOP::TaggedComponentSeq_out::operator-> (void) +{ + return this->ptr_; +} + +ACE_INLINE IOP::TaggedComponent & +IOP::TaggedComponentSeq_out::operator[] (CORBA::ULong index) +{ + return this->ptr_->operator[] (index); +} + + +#endif /* end #if !defined */ + // ************************************************************* // Inline operations for class IOP::ServiceContext_var // ************************************************************* @@ -2259,12 +2683,12 @@ IOP::ServiceContext_var::operator= (const ::IOP::ServiceContext_var &p) } else { - IOP::ServiceContext *deep_copy = - new IOP::ServiceContext (*p.ptr_); + ServiceContext *deep_copy = + new ServiceContext (*p.ptr_); if (deep_copy != 0) { - IOP::ServiceContext *tmp = deep_copy; + ServiceContext *tmp = deep_copy; deep_copy = this->ptr_; this->ptr_ = tmp; delete deep_copy; @@ -2451,8 +2875,8 @@ IOP::ServiceContext::_tao_seq_Octet_var::operator= (_tao_seq_Octet *p) return *this; } -ACE_INLINE IOP::ServiceContext::_tao_seq_Octet_var & -IOP::ServiceContext::_tao_seq_Octet_var::operator= (const ::IOP::ServiceContext::_tao_seq_Octet_var &p) // deep copy +ACE_INLINE ::IOP::ServiceContext::_tao_seq_Octet_var & +IOP::ServiceContext::_tao_seq_Octet_var::operator= (const ::IOP::ServiceContext::_tao_seq_Octet_var &p) { if (this != &p) { @@ -2463,12 +2887,12 @@ IOP::ServiceContext::_tao_seq_Octet_var::operator= (const ::IOP::ServiceContext: } else { - IOP::ServiceContext::_tao_seq_Octet *deep_copy = - new IOP::ServiceContext::_tao_seq_Octet (*p.ptr_); + _tao_seq_Octet *deep_copy = + new _tao_seq_Octet (*p.ptr_); if (deep_copy != 0) { - IOP::ServiceContext::_tao_seq_Octet *tmp = deep_copy; + _tao_seq_Octet *tmp = deep_copy; deep_copy = this->ptr_; this->ptr_ = tmp; delete deep_copy; @@ -2527,6 +2951,12 @@ IOP::ServiceContext::_tao_seq_Octet_var::operator[] (CORBA::ULong index) return this->ptr_->operator[] (index); } +ACE_INLINE const CORBA::Octet & +IOP::ServiceContext::_tao_seq_Octet_var::operator[] (CORBA::ULong index) const +{ + return ACE_const_cast (const CORBA::Octet &, this->ptr_->operator[] (index)); +} + ACE_INLINE const ::IOP::ServiceContext::_tao_seq_Octet & IOP::ServiceContext::_tao_seq_Octet_var::in (void) const { @@ -2844,8 +3274,8 @@ IOP::ServiceContextList_var::operator= (ServiceContextList *p) return *this; } -ACE_INLINE IOP::ServiceContextList_var & -IOP::ServiceContextList_var::operator= (const ::IOP::ServiceContextList_var &p) // deep copy +ACE_INLINE ::IOP::ServiceContextList_var & +IOP::ServiceContextList_var::operator= (const ::IOP::ServiceContextList_var &p) { if (this != &p) { @@ -2856,12 +3286,12 @@ IOP::ServiceContextList_var::operator= (const ::IOP::ServiceContextList_var &p) } else { - IOP::ServiceContextList *deep_copy = - new IOP::ServiceContextList (*p.ptr_); + ServiceContextList *deep_copy = + new ServiceContextList (*p.ptr_); if (deep_copy != 0) { - IOP::ServiceContextList *tmp = deep_copy; + ServiceContextList *tmp = deep_copy; deep_copy = this->ptr_; this->ptr_ = tmp; delete deep_copy; @@ -2915,6 +3345,12 @@ IOP::ServiceContextList_var::operator[] (CORBA::ULong index) return this->ptr_->operator[] (index); } +ACE_INLINE const IOP::ServiceContext & +IOP::ServiceContextList_var::operator[] (CORBA::ULong index) const +{ + return ACE_const_cast (const IOP::ServiceContext &, this->ptr_->operator[] (index)); +} + ACE_INLINE const ::IOP::ServiceContextList & IOP::ServiceContextList_var::in (void) const { @@ -3015,6 +3451,507 @@ IOP::ServiceContextList_out::operator[] (CORBA::ULong index) #endif /* end #if !defined */ +// ************************************************************* +// Inline operations for exception IOP::Codec::InvalidTypeForEncoding +// ************************************************************* + +// ************************************************************* +// Inline operations for exception IOP::Codec::FormatMismatch +// ************************************************************* + +// ************************************************************* +// Inline operations for exception IOP::Codec::TypeMismatch +// ************************************************************* + + +#if !defined (_IOP_CODEC___VAR_CI_) +#define _IOP_CODEC___VAR_CI_ + +// ************************************************************* +// Inline operations for class IOP::Codec_var +// ************************************************************* + +ACE_INLINE +IOP::Codec_var::Codec_var (void) // default constructor + : ptr_ (Codec::_nil ()) +{} + +ACE_INLINE ::IOP::Codec_ptr +IOP::Codec_var::ptr (void) const +{ + return this->ptr_; +} + +ACE_INLINE +IOP::Codec_var::Codec_var (const ::IOP::Codec_var &p) // copy constructor + : TAO_Base_var (), + ptr_ (Codec::_duplicate (p.ptr ())) +{} + +ACE_INLINE +IOP::Codec_var::~Codec_var (void) // destructor +{ + CORBA::release (this->ptr_); +} + +ACE_INLINE IOP::Codec_var & +IOP::Codec_var::operator= (Codec_ptr p) +{ + CORBA::release (this->ptr_); + this->ptr_ = p; + return *this; +} + +ACE_INLINE IOP::Codec_var & +IOP::Codec_var::operator= (const ::IOP::Codec_var &p) +{ + if (this != &p) + { + CORBA::release (this->ptr_); + this->ptr_ = ::IOP::Codec::_duplicate (p.ptr ()); + } + return *this; +} + +ACE_INLINE +IOP::Codec_var::operator const ::IOP::Codec_ptr &() const // cast +{ + return this->ptr_; +} + +ACE_INLINE +IOP::Codec_var::operator ::IOP::Codec_ptr &() // cast +{ + return this->ptr_; +} + +ACE_INLINE ::IOP::Codec_ptr +IOP::Codec_var::operator-> (void) const +{ + return this->ptr_; +} + +ACE_INLINE ::IOP::Codec_ptr +IOP::Codec_var::in (void) const +{ + return this->ptr_; +} + +ACE_INLINE ::IOP::Codec_ptr & +IOP::Codec_var::inout (void) +{ + return this->ptr_; +} + +ACE_INLINE ::IOP::Codec_ptr & +IOP::Codec_var::out (void) +{ + CORBA::release (this->ptr_); + this->ptr_ = ::IOP::Codec::_nil (); + return this->ptr_; +} + +ACE_INLINE ::IOP::Codec_ptr +IOP::Codec_var::_retn (void) +{ + // yield ownership of managed obj reference + ::IOP::Codec_ptr val = this->ptr_; + this->ptr_ = ::IOP::Codec::_nil (); + return val; +} + + +#endif /* end #if !defined */ + + +#if !defined (_IOP_CODEC___OUT_CI_) +#define _IOP_CODEC___OUT_CI_ + +// ************************************************************* +// Inline operations for class IOP::Codec_out +// ************************************************************* + +ACE_INLINE +IOP::Codec_out::Codec_out (Codec_ptr &p) + : ptr_ (p) +{ + this->ptr_ = ::IOP::Codec::_nil (); +} + +ACE_INLINE +IOP::Codec_out::Codec_out (Codec_var &p) // constructor from _var + : ptr_ (p.out ()) +{ + CORBA::release (this->ptr_); + this->ptr_ = ::IOP::Codec::_nil (); +} + +ACE_INLINE +IOP::Codec_out::Codec_out (const ::IOP::Codec_out &p) // copy constructor + : ptr_ (ACE_const_cast (Codec_out &, p).ptr_) +{} + +ACE_INLINE ::IOP::Codec_out & +IOP::Codec_out::operator= (const ::IOP::Codec_out &p) +{ + this->ptr_ = ACE_const_cast (Codec_out&, p).ptr_; + return *this; +} + +ACE_INLINE IOP::Codec_out & +IOP::Codec_out::operator= (const ::IOP::Codec_var &p) +{ + this->ptr_ = ::IOP::Codec::_duplicate (p.ptr ()); + return *this; +} + +ACE_INLINE IOP::Codec_out & +IOP::Codec_out::operator= (Codec_ptr p) +{ + this->ptr_ = p; + return *this; +} + +ACE_INLINE +IOP::Codec_out::operator ::IOP::Codec_ptr &() // cast +{ + return this->ptr_; +} + +ACE_INLINE ::IOP::Codec_ptr & +IOP::Codec_out::ptr (void) // ptr +{ + return this->ptr_; +} + +ACE_INLINE ::IOP::Codec_ptr +IOP::Codec_out::operator-> (void) +{ + return this->ptr_; +} + + +#endif /* end #if !defined */ + +// ************************************************************* +// Inline operations for class IOP::Encoding_var +// ************************************************************* + +ACE_INLINE +IOP::Encoding_var::Encoding_var (void) // default constructor + : ptr_ (0) +{} + +ACE_INLINE +IOP::Encoding_var::Encoding_var (Encoding *p) + : ptr_ (p) +{} + +ACE_INLINE +IOP::Encoding_var::Encoding_var (const ::IOP::Encoding_var &p) // copy constructor +{ + if (p.ptr_) + ACE_NEW (this->ptr_, ::IOP::Encoding (*p.ptr_)); + else + this->ptr_ = 0; +} + +// fixed-size types only +ACE_INLINE +IOP::Encoding_var::Encoding_var (const ::IOP::Encoding &p) +{ + ACE_NEW (this->ptr_, ::IOP::Encoding (p)); +} + +ACE_INLINE +IOP::Encoding_var::~Encoding_var (void) // destructor +{ + delete this->ptr_; +} + +ACE_INLINE IOP::Encoding_var & +IOP::Encoding_var::operator= (Encoding *p) +{ + delete this->ptr_; + this->ptr_ = p; + return *this; +} + +ACE_INLINE ::IOP::Encoding_var & +IOP::Encoding_var::operator= (const ::IOP::Encoding_var &p) +{ + if (this != &p) + { + if (p.ptr_ == 0) + { + delete this->ptr_; + this->ptr_ = 0; + } + else + { + Encoding *deep_copy = + new Encoding (*p.ptr_); + + if (deep_copy != 0) + { + Encoding *tmp = deep_copy; + deep_copy = this->ptr_; + this->ptr_ = tmp; + delete deep_copy; + } + } + } + + return *this; +} + +// fixed-size types only +ACE_INLINE IOP::Encoding_var & +IOP::Encoding_var::operator= (const ::IOP::Encoding &p) +{ + if (this->ptr_ != &p) + { + delete this->ptr_; + ACE_NEW_RETURN (this->ptr_, ::IOP::Encoding (p), *this); + } + return *this; +} + +ACE_INLINE const ::IOP::Encoding * +IOP::Encoding_var::operator-> (void) const +{ + return this->ptr_; +} + +ACE_INLINE ::IOP::Encoding * +IOP::Encoding_var::operator-> (void) +{ + return this->ptr_; +} + +ACE_INLINE +IOP::Encoding_var::operator const ::IOP::Encoding &() const // cast +{ + return *this->ptr_; +} + +ACE_INLINE +IOP::Encoding_var::operator ::IOP::Encoding &() // cast +{ + return *this->ptr_; +} + +ACE_INLINE +IOP::Encoding_var::operator ::IOP::Encoding &() const // cast +{ + return *this->ptr_; +} + +ACE_INLINE const ::IOP::Encoding & +IOP::Encoding_var::in (void) const +{ + return *this->ptr_; +} + +ACE_INLINE ::IOP::Encoding & +IOP::Encoding_var::inout (void) +{ + return *this->ptr_; +} + +// mapping for fixed size +ACE_INLINE ::IOP::Encoding & +IOP::Encoding_var::out (void) +{ + return *this->ptr_; +} + +ACE_INLINE ::IOP::Encoding +IOP::Encoding_var::_retn (void) +{ + return *this->ptr_; +} + +ACE_INLINE ::IOP::Encoding * +IOP::Encoding_var::ptr (void) const +{ + return this->ptr_; +} + +// ************************************************************* +// Inline operations for exception IOP::CodecFactory::UnknownEncoding +// ************************************************************* + + +#if !defined (_IOP_CODECFACTORY___VAR_CI_) +#define _IOP_CODECFACTORY___VAR_CI_ + +// ************************************************************* +// Inline operations for class IOP::CodecFactory_var +// ************************************************************* + +ACE_INLINE +IOP::CodecFactory_var::CodecFactory_var (void) // default constructor + : ptr_ (CodecFactory::_nil ()) +{} + +ACE_INLINE ::IOP::CodecFactory_ptr +IOP::CodecFactory_var::ptr (void) const +{ + return this->ptr_; +} + +ACE_INLINE +IOP::CodecFactory_var::CodecFactory_var (const ::IOP::CodecFactory_var &p) // copy constructor + : TAO_Base_var (), + ptr_ (CodecFactory::_duplicate (p.ptr ())) +{} + +ACE_INLINE +IOP::CodecFactory_var::~CodecFactory_var (void) // destructor +{ + CORBA::release (this->ptr_); +} + +ACE_INLINE IOP::CodecFactory_var & +IOP::CodecFactory_var::operator= (CodecFactory_ptr p) +{ + CORBA::release (this->ptr_); + this->ptr_ = p; + return *this; +} + +ACE_INLINE IOP::CodecFactory_var & +IOP::CodecFactory_var::operator= (const ::IOP::CodecFactory_var &p) +{ + if (this != &p) + { + CORBA::release (this->ptr_); + this->ptr_ = ::IOP::CodecFactory::_duplicate (p.ptr ()); + } + return *this; +} + +ACE_INLINE +IOP::CodecFactory_var::operator const ::IOP::CodecFactory_ptr &() const // cast +{ + return this->ptr_; +} + +ACE_INLINE +IOP::CodecFactory_var::operator ::IOP::CodecFactory_ptr &() // cast +{ + return this->ptr_; +} + +ACE_INLINE ::IOP::CodecFactory_ptr +IOP::CodecFactory_var::operator-> (void) const +{ + return this->ptr_; +} + +ACE_INLINE ::IOP::CodecFactory_ptr +IOP::CodecFactory_var::in (void) const +{ + return this->ptr_; +} + +ACE_INLINE ::IOP::CodecFactory_ptr & +IOP::CodecFactory_var::inout (void) +{ + return this->ptr_; +} + +ACE_INLINE ::IOP::CodecFactory_ptr & +IOP::CodecFactory_var::out (void) +{ + CORBA::release (this->ptr_); + this->ptr_ = ::IOP::CodecFactory::_nil (); + return this->ptr_; +} + +ACE_INLINE ::IOP::CodecFactory_ptr +IOP::CodecFactory_var::_retn (void) +{ + // yield ownership of managed obj reference + ::IOP::CodecFactory_ptr val = this->ptr_; + this->ptr_ = ::IOP::CodecFactory::_nil (); + return val; +} + + +#endif /* end #if !defined */ + + +#if !defined (_IOP_CODECFACTORY___OUT_CI_) +#define _IOP_CODECFACTORY___OUT_CI_ + +// ************************************************************* +// Inline operations for class IOP::CodecFactory_out +// ************************************************************* + +ACE_INLINE +IOP::CodecFactory_out::CodecFactory_out (CodecFactory_ptr &p) + : ptr_ (p) +{ + this->ptr_ = ::IOP::CodecFactory::_nil (); +} + +ACE_INLINE +IOP::CodecFactory_out::CodecFactory_out (CodecFactory_var &p) // constructor from _var + : ptr_ (p.out ()) +{ + CORBA::release (this->ptr_); + this->ptr_ = ::IOP::CodecFactory::_nil (); +} + +ACE_INLINE +IOP::CodecFactory_out::CodecFactory_out (const ::IOP::CodecFactory_out &p) // copy constructor + : ptr_ (ACE_const_cast (CodecFactory_out &, p).ptr_) +{} + +ACE_INLINE ::IOP::CodecFactory_out & +IOP::CodecFactory_out::operator= (const ::IOP::CodecFactory_out &p) +{ + this->ptr_ = ACE_const_cast (CodecFactory_out&, p).ptr_; + return *this; +} + +ACE_INLINE IOP::CodecFactory_out & +IOP::CodecFactory_out::operator= (const ::IOP::CodecFactory_var &p) +{ + this->ptr_ = ::IOP::CodecFactory::_duplicate (p.ptr ()); + return *this; +} + +ACE_INLINE IOP::CodecFactory_out & +IOP::CodecFactory_out::operator= (CodecFactory_ptr p) +{ + this->ptr_ = p; + return *this; +} + +ACE_INLINE +IOP::CodecFactory_out::operator ::IOP::CodecFactory_ptr &() // cast +{ + return this->ptr_; +} + +ACE_INLINE ::IOP::CodecFactory_ptr & +IOP::CodecFactory_out::ptr (void) // ptr +{ + return this->ptr_; +} + +ACE_INLINE ::IOP::CodecFactory_ptr +IOP::CodecFactory_out::operator-> (void) +{ + return this->ptr_; +} + + +#endif /* end #if !defined */ + #if !defined _TAO_CDR_OP_IOP_TaggedProfile__tao_seq_Octet_I_ #define _TAO_CDR_OP_IOP_TaggedProfile__tao_seq_Octet_I_ @@ -3163,6 +4100,21 @@ CORBA::Boolean TAO_Export operator>> ( #endif /* _TAO_CDR_OP_IOP_TaggedComponentList_I_ */ +#if !defined _TAO_CDR_OP_IOP_TaggedComponentSeq_I_ +#define _TAO_CDR_OP_IOP_TaggedComponentSeq_I_ + +CORBA::Boolean TAO_Export operator<< ( + TAO_OutputCDR &, + const IOP::TaggedComponentSeq & + ); +CORBA::Boolean TAO_Export operator>> ( + TAO_InputCDR &, + IOP::TaggedComponentSeq & + ); + +#endif /* _TAO_CDR_OP_IOP_TaggedComponentSeq_I_ */ + + #if !defined _TAO_CDR_OP_IOP_ServiceContext__tao_seq_Octet_I_ #define _TAO_CDR_OP_IOP_ServiceContext__tao_seq_Octet_I_ @@ -3216,3 +4168,29 @@ CORBA::Boolean TAO_Export operator>> ( #endif /* _TAO_CDR_OP_IOP_ServiceContextList_I_ */ +ACE_INLINE CORBA::Boolean operator<< (TAO_OutputCDR &strm, const IOP::Encoding &_tao_aggregate) +{ + if ( + (strm << _tao_aggregate.format) && + (strm << CORBA::Any::from_octet (_tao_aggregate.major_version)) && + (strm << CORBA::Any::from_octet (_tao_aggregate.minor_version)) + ) + return 1; + else + return 0; + +} + +ACE_INLINE CORBA::Boolean operator>> (TAO_InputCDR &strm, IOP::Encoding &_tao_aggregate) +{ + if ( + (strm >> _tao_aggregate.format) && + (strm >> CORBA::Any::to_octet (_tao_aggregate.major_version)) && + (strm >> CORBA::Any::to_octet (_tao_aggregate.minor_version)) + ) + return 1; + else + return 0; + +} + diff --git a/TAO/tao/Makefile b/TAO/tao/Makefile index dab74498cbb..0c1d1a85fe6 100644 --- a/TAO/tao/Makefile +++ b/TAO/tao/Makefile @@ -240,7 +240,10 @@ ORB_CORE_FILES = \ BiDirPolicyC \ BiDir_ORBInitializer \ BiDir_PolicyFactory \ - BiDir_Policy_i + BiDir_Policy_i \ + CodecFactory \ + CodecFactory_ORBInitializer \ + CDR_Encaps_Codec DYNAMIC_ANY_FILES = diff --git a/TAO/tao/Makefile.bor b/TAO/tao/Makefile.bor index e6ac5174d04..19e7d0c1db0 100644 --- a/TAO/tao/Makefile.bor +++ b/TAO/tao/Makefile.bor @@ -34,10 +34,13 @@ OBJFILES = \ $(OBJDIR)\Buffering_Constraint_Policy.obj \ $(OBJDIR)\Cache_Entries.obj \ $(OBJDIR)\CDR.obj \ + $(OBJDIR)\CDR_Encaps_Codec.obj \ $(OBJDIR)\Cleanup_Func_Registry.obj \ $(OBJDIR)\Client_Priority_Policy.obj \ $(OBJDIR)\Client_Strategy_Factory.obj \ $(OBJDIR)\ClientRequestInfo.obj \ + $(OBJDIR)\CodecFactory.obj \ + $(OBJDIR)\CodecFactory_ORBInitializer.obj \ $(OBJDIR)\Connection_Cache_Manager.obj \ $(OBJDIR)\Connection_Descriptor_Interface.obj \ $(OBJDIR)\Connection_handler.obj \ diff --git a/TAO/tao/ORB.cpp b/TAO/tao/ORB.cpp index ac05067a99a..0e513109b96 100644 --- a/TAO/tao/ORB.cpp +++ b/TAO/tao/ORB.cpp @@ -22,8 +22,10 @@ #include "Priority_Mapping_Manager.h" #include "RT_Current.h" -# include "ORBInitInfo.h" -# include "ORBInitializer_Registry.h" +#include "ORBInitInfo.h" +#include "ORBInitializer_Registry.h" + +#include "CodecFactory_ORBInitializer.h" #if TAO_HAS_RT_CORBA == 1 # include "RT_ORBInitializer.h" /* @@ This should go away! */ @@ -1040,6 +1042,23 @@ CORBA_ORB::init_orb_globals (CORBA::Environment &ACE_TRY_ENV) ACE_THROW (CORBA::INITIALIZE ()); } + // Register the CodecFactory ORBInitializer. + PortableInterceptor::ORBInitializer_ptr tmp_cf_initializer; + ACE_NEW_THROW_EX (tmp_cf_initializer, + TAO_CodecFactory_ORBInitializer, + CORBA::NO_MEMORY ( + CORBA_SystemException::_tao_minor_code ( + TAO_DEFAULT_MINOR_CODE, + ENOMEM), + CORBA::COMPLETED_NO)); + ACE_CHECK; + PortableInterceptor::ORBInitializer_var cf_initializer = + tmp_cf_initializer; + + PortableInterceptor::register_orb_initializer (cf_initializer.in (), + ACE_TRY_ENV); + ACE_CHECK; + // ------------------------------------------------------------- // @@ These ORB initializer instantiations should go away. They // should be registered via the service configurator, for diff --git a/TAO/tao/ORBInitInfo.cpp b/TAO/tao/ORBInitInfo.cpp index 326a5f1a90c..53986960f1d 100644 --- a/TAO/tao/ORBInitInfo.cpp +++ b/TAO/tao/ORBInitInfo.cpp @@ -5,8 +5,11 @@ #include "ORBInitInfo.h" #include "ORB_Core.h" #include "StringSeqC.h" +#include "CodecFactory.h" -ACE_RCSID(tao, ORBInitInfo, "$Id$") +ACE_RCSID (TAO, + ORBInitInfo, + "$Id$") TAO_ORBInitInfo::TAO_ORBInitInfo (TAO_ORB_Core *orb_core, @@ -14,7 +17,8 @@ TAO_ORBInitInfo::TAO_ORBInitInfo (TAO_ORB_Core *orb_core, char *argv[]) : orb_core_ (orb_core), argc_ (argc), - argv_ (argv) + argv_ (argv), + codec_factory_ () { } @@ -65,6 +69,16 @@ TAO_ORBInitInfo::orb_id (CORBA::Environment &ACE_TRY_ENV) return CORBA::string_dup (this->orb_core_->orbid ()); } +IOP::CodecFactory_ptr +TAO_ORBInitInfo::codec_factory (CORBA::Environment &ACE_TRY_ENV) + ACE_THROW_SPEC ((CORBA::SystemException)) +{ + this->check_validity (ACE_TRY_ENV); + ACE_CHECK_RETURN (IOP::CodecFactory::_nil ()); + + return &(this->codec_factory_); +} + void TAO_ORBInitInfo::register_initial_reference ( const char * id, @@ -136,7 +150,11 @@ TAO_ORBInitInfo::add_client_request_interceptor ( ACE_TRY_ENV); #else ACE_UNUSED_ARG (interceptor); - ACE_THROW (CORBA::NO_IMPLEMENT ()); + ACE_THROW (CORBA::NO_IMPLEMENT ( + CORBA_SystemException::_tao_minor_code ( + TAO_DEFAULT_MINOR_CODE, + ENOTSUP), + CORBA::COMPLETED_NO)); #endif /* TAO_HAS_INTERCEPTORS == 1 */ } @@ -156,7 +174,11 @@ TAO_ORBInitInfo::add_server_request_interceptor ( #else ACE_UNUSED_ARG (interceptor); - ACE_THROW (CORBA::NO_IMPLEMENT ()); + ACE_THROW (CORBA::NO_IMPLEMENT ( + CORBA_SystemException::_tao_minor_code ( + TAO_DEFAULT_MINOR_CODE, + ENOTSUP), + CORBA::COMPLETED_NO)); #endif /* TAO_HAS_INTERCEPTORS == 1 */ } diff --git a/TAO/tao/ORBInitInfo.h b/TAO/tao/ORBInitInfo.h index 0f5e413b29e..c5a3fa99b18 100644 --- a/TAO/tao/ORBInitInfo.h +++ b/TAO/tao/ORBInitInfo.h @@ -24,6 +24,7 @@ #include "PortableInterceptorC.h" #include "LocalObject.h" #include "StringSeqC.h" +#include "CodecFactory.h" // This is to remove "inherits via dominance" warnings from MSVC. // MSVC is being a little too paranoid. @@ -80,6 +81,12 @@ public: CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) ACE_THROW_SPEC ((CORBA::SystemException)); + /// Return the CodecFactory for the ORB currently being + /// initialized. + virtual IOP::CodecFactory_ptr codec_factory ( + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()) + ACE_THROW_SPEC ((CORBA::SystemException)); + /// Register a mapping between a string and a corresponding object /// reference with the ORB being initialized. This is particularly /// useful for registering references to local @@ -212,6 +219,9 @@ private: /// The argument vector passed to CORBA::ORB_init(). char **argv_; + /// Instance of the IOP::CodecFactory. Returned by + /// ORBInitInfo::codec_factory (). + TAO_CodecFactory codec_factory_; }; #if defined(_MSC_VER) && (_MSC_VER >= 1200) diff --git a/TAO/tao/ORB_Core.cpp b/TAO/tao/ORB_Core.cpp index 62f0019ad55..5238a1b710b 100644 --- a/TAO/tao/ORB_Core.cpp +++ b/TAO/tao/ORB_Core.cpp @@ -1991,10 +1991,51 @@ TAO_ORB_Core::destroy (CORBA_Environment &ACE_TRY_ENV) *ACE_Static_Object_Lock::instance ())); TAO_ORB_Table::instance ()->unbind (this->orbid_); } + + // Invoke Interceptor::destroy() on all registered interceptors. + this->destroy_interceptors (ACE_TRY_ENV); + ACE_CHECK; } -// Set up listening endpoints. +void +TAO_ORB_Core::destroy_interceptors (CORBA::Environment &ACE_TRY_ENV) +{ + size_t len = 0; + +#if TAO_HAS_INTERCEPTORS == 1 + TAO_ClientRequestInterceptor_List::TYPE &client_interceptors = + this->client_request_interceptors_.interceptors (); + + len = client_interceptors.size (); + for (size_t i = 0; i < len; ++i) + { + client_interceptors[i]->destroy (TAO_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + } + + TAO_ServerRequestInterceptor_List::TYPE &server_interceptors = + this->server_request_interceptors_.interceptors (); + + len = server_interceptors.size (); + for (size_t j = 0; j < len; ++j) + { + server_interceptors[j]->destroy (TAO_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + } +#endif /* TAO_HAS_INTERCEPTORS == 1 */ + + TAO_IORInterceptor_List::TYPE &ior_interceptors = + this->ior_interceptors_.interceptors (); + len = ior_interceptors.size (); + for (size_t k = 0; k < len; ++k) + { + ior_interceptors[k]->destroy (TAO_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + } +} + +// Set up listening endpoints. int TAO_ORB_Core::open (CORBA::Environment &ACE_TRY_ENV) { @@ -2213,7 +2254,7 @@ TAO_ORB_Core::resolve_rir (const char *name, return CORBA::Object::_nil (); } -CORBA_ORB_ObjectIdList_ptr +CORBA::ORB::ObjectIdList_ptr TAO_ORB_Core::list_initial_references (CORBA::Environment &ACE_TRY_ENV) { // Unsupported initial services should NOT be included in the below list! @@ -2225,16 +2266,18 @@ TAO_ORB_Core::list_initial_references (CORBA::Environment &ACE_TRY_ENV) sizeof (initial_services) / sizeof (initial_services[0]); const size_t total_size = - initial_services_size + this->init_ref_map_.current_size (); + initial_services_size + + this->init_ref_map_.current_size (); +// + this->object_ref_table_.current_size (); - CORBA_ORB_ObjectIdList_ptr tmp = 0; + CORBA::ORB::ObjectIdList_ptr tmp = 0; ACE_NEW_THROW_EX (tmp, CORBA_ORB_ObjectIdList (total_size), CORBA::NO_MEMORY ()); ACE_CHECK_RETURN (0); - CORBA_ORB_ObjectIdList_var list = tmp; + CORBA::ORB::ObjectIdList_var list = tmp; list->length (total_size); CORBA::ULong index = 0; @@ -2246,12 +2289,23 @@ TAO_ORB_Core::list_initial_references (CORBA::Environment &ACE_TRY_ENV) // Now iterate over the initial references created by the user and // add them to the sequence. - InitRefMap::iterator end = this->init_ref_map_.end (); - for (InitRefMap::iterator i =this-> init_ref_map_.begin (); - i != end; - ++i, ++index) - list[index] = (*i).int_id_.c_str (); +// // References registered via +// // ORBInitInfo::register_initial_reference(). +// TAO_Object_Ref_Table::Iterator end = this->object_ref_table_.end (); + +// for (TAO_Object_Ref_Table::Iterator i = this-> object_ref_table_.begin (); +// i != end; +// ++i, ++index) +// list[index] = (*i).int_id_; + + // References registered via INS. + InitRefMap::iterator end = this->init_ref_map_.end (); + + for (InitRefMap::iterator j = this-> init_ref_map_.begin (); + j != end; + ++j, ++index) + list[index] = (*j).int_id_.c_str (); return list._retn (); } diff --git a/TAO/tao/ORB_Core.h b/TAO/tao/ORB_Core.h index 59d657b4865..c5e9f44182f 100644 --- a/TAO/tao/ORB_Core.h +++ b/TAO/tao/ORB_Core.h @@ -906,6 +906,10 @@ protected: /// callbacks which can be dynamically loaded. void services_callbacks_init (void); + /// Helper method that invokes Interceptor::destroy() on all + /// registered interceptors when ORB::destroy() is called. + void destroy_interceptors (CORBA::Environment &ACE_TRY_ENV); + private: /// The ORB Core should not be copied. diff --git a/TAO/tao/OctetSeq.pidl b/TAO/tao/OctetSeq.pidl index 8259c45604d..751255dc14b 100644 --- a/TAO/tao/OctetSeq.pidl +++ b/TAO/tao/OctetSeq.pidl @@ -8,11 +8,11 @@ // The command used to generate code is: // // tao_idl -// -Ge 1 \ -// -Wb,export_macro=TAO_Export \ -// -Wb,export_include="tao/corbafwd.h" \ -// -Wb,pre_include="ace/pre.h" \ -// -Wb,post_include="ace/post.h" \ +// -Ge 1 +// -Wb,export_macro=TAO_Export +// -Wb,export_include="corbafwd.h" +// -Wb,pre_include="ace/pre.h" +// -Wb,post_include="ace/post.h" // OctetSeq.pidl // // Patches for changes to the generated code are available in the @@ -20,13 +20,16 @@ // ================================================================ -#ifndef TAO_OCTET_SEQ_IDL -#define TAO_OCTET_SEQ_IDL +#ifndef TAO_CORBA_OCTET_SEQ_IDL +#define TAO_CORBA_OCTET_SEQ_IDL #pragma prefix "omg.org" -typedef sequence<octet> OctetSeq; +module CORBA +{ + typedef sequence<octet> OctetSeq; +}; #pragma prefix "" -#endif /* TAO_OCTET_SEQ_IDL */ +#endif /* TAO_CORBA_OCTET_SEQ_IDL */ diff --git a/TAO/tao/OctetSeqC.cpp b/TAO/tao/OctetSeqC.cpp index a5c7169a382..38ceb9b7eac 100644 --- a/TAO/tao/OctetSeqC.cpp +++ b/TAO/tao/OctetSeqC.cpp @@ -21,17 +21,23 @@ #include "OctetSeqC.h" +#if defined (__BORLANDC__) +#pragma option -w-rvl -w-rch -w-ccc -w-aus +#endif /* __BORLANDC__ */ + #if !defined (__ACE_INLINE__) #include "OctetSeqC.i" #endif /* !defined INLINE */ -#include "tao/Any.h" +#include "Any.h" +#include "CDR.h" +#include "TypeCode.h" -#if !defined (TAO_OCTETSEQ_CS) -#define TAO_OCTETSEQ_CS +#if !defined (_CORBA_OCTETSEQ_CS_) +#define _CORBA_OCTETSEQ_CS_ // ************************************************************* -// CORBA_OctetSeq +// CORBA::OctetSeq // ************************************************************* CORBA_OctetSeq::CORBA_OctetSeq (void) @@ -77,8 +83,8 @@ void CORBA_OctetSeq::_tao_any_destructor (void *x) static const CORBA::Long _oc_CORBA_OctetSeq[] = { TAO_ENCAP_BYTE_ORDER, // byte order - 17, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x4f637465), ACE_NTOHL (0x74536571), ACE_NTOHL (0x3a312e30), ACE_NTOHL (0x0), // repository ID = IDL:CORBA_OctetSeq:1.0 - 9, ACE_NTOHL (0x4f637465), ACE_NTOHL (0x74536571), ACE_NTOHL (0x0), // name = CORBA_OctetSeq + 31, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x434f5242), ACE_NTOHL (0x412f4f63), ACE_NTOHL (0x74657453), ACE_NTOHL (0x65713a31), ACE_NTOHL (0x2e300000), // repository ID = IDL:omg.org/CORBA/OctetSeq:1.0 + 9, ACE_NTOHL (0x4f637465), ACE_NTOHL (0x74536571), ACE_NTOHL (0x0), // name = OctetSeq CORBA::tk_sequence, // typecode kind 12, // encapsulation length TAO_ENCAP_BYTE_ORDER, // byte order @@ -89,7 +95,6 @@ static const CORBA::Long _oc_CORBA_OctetSeq[] = }; static CORBA::TypeCode _tc_TAO_tc_CORBA_OctetSeq (CORBA::tk_alias, sizeof (_oc_CORBA_OctetSeq), (char *) &_oc_CORBA_OctetSeq, 0, sizeof (CORBA_OctetSeq)); CORBA::TypeCode_ptr _tc_CORBA_OctetSeq = &_tc_TAO_tc_CORBA_OctetSeq; - void operator<<= ( CORBA::Any &_tao_any, const CORBA_OctetSeq &_tao_elem diff --git a/TAO/tao/OctetSeqC.h b/TAO/tao/OctetSeqC.h index 6fb751c2d8f..9fd9bb78107 100644 --- a/TAO/tao/OctetSeqC.h +++ b/TAO/tao/OctetSeqC.h @@ -19,18 +19,17 @@ // Information about TAO is available at: // http://www.cs.wustl.edu/~schmidt/TAO.html -#ifndef _TAO_IDL_OCTETSEQC_H_ -#define _TAO_IDL_OCTETSEQC_H_ +#ifndef _TAO_IDL_CORBA_OCTETSEQC_H_ +#define _TAO_IDL_CORBA_OCTETSEQC_H_ #include "ace/pre.h" - -#include "tao/corbafwd.h" +#include "corbafwd.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#include "tao/Sequence.h" +#include "Sequence.h" #if defined (TAO_EXPORT_MACRO) #undef TAO_EXPORT_MACRO @@ -51,125 +50,131 @@ #pragma warning(disable:4250) #endif /* _MSC_VER */ - -#if !defined (TAO_OCTETSEQ_CH) -#define TAO_OCTETSEQ_CH - -class CORBA_OctetSeq; -class CORBA_OctetSeq_var; - -// ************************************************************* -// CORBA_OctetSeq -// ************************************************************* - -class TAO_Export CORBA_OctetSeq : public +#if defined (__BORLANDC__) +#pragma option push -w-rvl -w-rch -w-ccc -w-inl +#endif /* __BORLANDC__ */ + +#if !defined (_CORBA_OCTETSEQ_CH_) +#define _CORBA_OCTETSEQ_CH_ + + class CORBA_OctetSeq; + class CORBA_OctetSeq_var; + + // ************************************************************* + // CORBA::OctetSeq + // ************************************************************* + + class TAO_Export CORBA_OctetSeq : public #if !defined (TAO_USE_SEQUENCE_TEMPLATES) - TAO_Unbounded_Sequence<CORBA::Octet> + TAO_Unbounded_Sequence<CORBA::Octet> #else /* TAO_USE_SEQUENCE_TEMPLATES */ - TAO_Unbounded_Sequence<CORBA::Octet> -#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ -{ -public: - CORBA_OctetSeq (void); // default ctor - CORBA_OctetSeq (CORBA::ULong max); // uses max size - CORBA_OctetSeq ( - CORBA::ULong max, - CORBA::ULong length, - CORBA::Octet *buffer, - CORBA::Boolean release = 0 - ); - CORBA_OctetSeq (const CORBA_OctetSeq &); // copy ctor - ~CORBA_OctetSeq (void); - static void _tao_any_destructor (void*); + TAO_Unbounded_Sequence<CORBA::Octet> +#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ + { + public: + CORBA_OctetSeq (void); // default ctor + CORBA_OctetSeq (CORBA::ULong max); // uses max size + CORBA_OctetSeq ( + CORBA::ULong max, + CORBA::ULong length, + CORBA::Octet *buffer, + CORBA::Boolean release = 0 + ); + CORBA_OctetSeq (const CORBA_OctetSeq &); // copy ctor + ~CORBA_OctetSeq (void); + static void _tao_any_destructor (void*); #if !defined(__GNUC__) || !defined (ACE_HAS_GNUG_PRE_2_8) - typedef CORBA_OctetSeq_var _var_type; + typedef CORBA_OctetSeq_var _var_type; #endif /* ! __GNUC__ || g++ >= 2.8 */ #if (TAO_NO_COPY_OCTET_SEQUENCES == 1) - CORBA_OctetSeq ( - CORBA::ULong length, - const ACE_Message_Block* mb - ) - : TAO_Unbounded_Sequence<CORBA::Octet> (length, mb) {} + CORBA_OctetSeq ( + CORBA::ULong length, + const ACE_Message_Block* mb + ) + : TAO_Unbounded_Sequence<CORBA::Octet> (length, mb) {} #endif /* TAO_NO_COPY_OCTET_SEQUENCE == 1 */ -}; - + }; + #endif /* end #if !defined */ -#if !defined (TAO_OCTETSEQ___VAR_CH) -#define TAO_OCTETSEQ___VAR_CH - -// ************************************************************* -// class CORBA_OctetSeq_var -// ************************************************************* - -class TAO_Export CORBA_OctetSeq_var -{ -public: - CORBA_OctetSeq_var (void); // default constructor - CORBA_OctetSeq_var (CORBA_OctetSeq *); - CORBA_OctetSeq_var (const CORBA_OctetSeq_var &); // copy constructor - CORBA_OctetSeq_var (const CORBA_OctetSeq &); // fixed-size base types only - ~CORBA_OctetSeq_var (void); // destructor - - CORBA_OctetSeq_var &operator= (CORBA_OctetSeq *); - CORBA_OctetSeq_var &operator= (const CORBA_OctetSeq_var &); - CORBA_OctetSeq_var &operator= (const CORBA_OctetSeq &); // fixed-size base types only - CORBA_OctetSeq *operator-> (void); - const CORBA_OctetSeq *operator-> (void) const; - - operator const CORBA_OctetSeq &() const; - operator CORBA_OctetSeq &(); - operator CORBA_OctetSeq &() const; - - CORBA::Octet & operator[] (CORBA::ULong index); - const CORBA::Octet & operator[] (CORBA::ULong index) const; - - // in, inout, out, _retn - const CORBA_OctetSeq &in (void) const; - CORBA_OctetSeq &inout (void); - CORBA_OctetSeq *&out (void); - CORBA_OctetSeq *_retn (void); - CORBA_OctetSeq *ptr (void) const; - -private: - CORBA_OctetSeq *ptr_; -}; +#if !defined (_CORBA_OCTETSEQ___VAR_CH_) +#define _CORBA_OCTETSEQ___VAR_CH_ + + // ************************************************************* + // class CORBA::OctetSeq_var + // ************************************************************* + + class TAO_Export CORBA_OctetSeq_var + { + public: + CORBA_OctetSeq_var (void); // default constructor + CORBA_OctetSeq_var (CORBA_OctetSeq *); + CORBA_OctetSeq_var (const CORBA_OctetSeq_var &); // copy constructor + CORBA_OctetSeq_var (const CORBA_OctetSeq &); // fixed-size base types only + ~CORBA_OctetSeq_var (void); // destructor + + CORBA_OctetSeq_var &operator= (CORBA_OctetSeq *); + CORBA_OctetSeq_var &operator= (const CORBA_OctetSeq_var &); + CORBA_OctetSeq_var &operator= (const CORBA_OctetSeq &); // fixed-size base types only + CORBA_OctetSeq *operator-> (void); + const CORBA_OctetSeq *operator-> (void) const; + + operator const CORBA_OctetSeq &() const; + operator CORBA_OctetSeq &(); + operator CORBA_OctetSeq &() const; + + CORBA::Octet & operator[] (CORBA::ULong index); + const CORBA::Octet & operator[] (CORBA::ULong index) const; + + // in, inout, out, _retn + const CORBA_OctetSeq &in (void) const; + CORBA_OctetSeq &inout (void); + CORBA_OctetSeq *&out (void); + CORBA_OctetSeq *_retn (void); + CORBA_OctetSeq *ptr (void) const; + + private: + CORBA_OctetSeq *ptr_; + }; #endif /* end #if !defined */ -#if !defined (TAO_OCTETSEQ___OUT_CH) -#define TAO_OCTETSEQ___OUT_CH +#if !defined (_CORBA_OCTETSEQ___OUT_CH_) +#define _CORBA_OCTETSEQ___OUT_CH_ + + class TAO_Export CORBA_OctetSeq_out + { + public: + CORBA_OctetSeq_out (CORBA_OctetSeq *&); + CORBA_OctetSeq_out (CORBA_OctetSeq_var &); + CORBA_OctetSeq_out (const CORBA_OctetSeq_out &); + CORBA_OctetSeq_out &operator= (const CORBA_OctetSeq_out &); + CORBA_OctetSeq_out &operator= (CORBA_OctetSeq *); + operator CORBA_OctetSeq *&(); + CORBA_OctetSeq *&ptr (void); + CORBA_OctetSeq *operator-> (void); + CORBA::Octet & operator[] (CORBA::ULong index); + + private: + CORBA_OctetSeq *&ptr_; + // assignment from T_var not allowed + void operator= (const CORBA_OctetSeq_var &); + }; -class TAO_Export CORBA_OctetSeq_out -{ -public: - CORBA_OctetSeq_out (CORBA_OctetSeq *&); - CORBA_OctetSeq_out (CORBA_OctetSeq_var &); - CORBA_OctetSeq_out (const CORBA_OctetSeq_out &); - CORBA_OctetSeq_out &operator= (const CORBA_OctetSeq_out &); - CORBA_OctetSeq_out &operator= (CORBA_OctetSeq *); - operator CORBA_OctetSeq *&(); - CORBA_OctetSeq *&ptr (void); - CORBA_OctetSeq *operator-> (void); - CORBA::Octet & operator[] (CORBA::ULong index); -private: - CORBA_OctetSeq *&ptr_; - // assignment from T_var not allowed - void operator= (const CORBA_OctetSeq_var &); -}; +#endif /* end #if !defined */ + TAO_NAMESPACE_STORAGE_CLASS CORBA::TypeCode_ptr _tc_CORBA_OctetSeq; -#endif /* end #if !defined */ -extern TAO_Export CORBA::TypeCode_ptr _tc_CORBA_OctetSeq; +// Proxy Broker Factory function pointer declarations. TAO_Export void operator<<= (CORBA::Any &, const CORBA_OctetSeq &); // copying version TAO_Export void operator<<= (CORBA::Any &, CORBA_OctetSeq*); // noncopying version @@ -179,8 +184,8 @@ TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const CORBA_OctetSeq #ifndef __ACE_INLINE__ -#if !defined TAO_TAO_CDR_OP_CORBA_OctetSeq_H -#define TAO_TAO_CDR_OP_CORBA_OctetSeq_H +#if !defined _TAO_CDR_OP_CORBA_OctetSeq_H_ +#define _TAO_CDR_OP_CORBA_OctetSeq_H_ TAO_Export CORBA::Boolean operator<< ( TAO_OutputCDR &, @@ -191,7 +196,7 @@ TAO_Export CORBA::Boolean operator>> ( CORBA_OctetSeq & ); -#endif /* TAO_TAO_CDR_OP_CORBA_OctetSeq_H */ +#endif /* _TAO_CDR_OP_CORBA_OctetSeq_H_ */ #endif /* __ACE_INLINE__ */ @@ -205,5 +210,9 @@ TAO_Export CORBA::Boolean operator>> ( #pragma warning(pop) #endif /* _MSC_VER */ +#if defined (__BORLANDC__) +#pragma option pop +#endif /* __BORLANDC__ */ + #include "ace/post.h" #endif /* ifndef */ diff --git a/TAO/tao/OctetSeqC.i b/TAO/tao/OctetSeqC.i index 67f4514fe1d..01ffb2d3fba 100644 --- a/TAO/tao/OctetSeqC.i +++ b/TAO/tao/OctetSeqC.i @@ -20,11 +20,11 @@ // http://www.cs.wustl.edu/~schmidt/TAO.html -#if !defined (TAO_OCTETSEQ_CI) -#define TAO_OCTETSEQ_CI +#if !defined (_CORBA_OCTETSEQ_CI_) +#define _CORBA_OCTETSEQ_CI_ // ************************************************************* -// Inline operations for class CORBA_OctetSeq_var +// Inline operations for class CORBA::OctetSeq_var // ************************************************************* ACE_INLINE @@ -67,8 +67,8 @@ CORBA_OctetSeq_var::operator= (CORBA_OctetSeq *p) return *this; } -ACE_INLINE CORBA_OctetSeq_var & -CORBA_OctetSeq_var::operator= (const ::CORBA_OctetSeq_var &p) // deep copy +ACE_INLINE ::CORBA_OctetSeq_var & +CORBA_OctetSeq_var::operator= (const ::CORBA_OctetSeq_var &p) { if (this != &p) { @@ -79,7 +79,8 @@ CORBA_OctetSeq_var::operator= (const ::CORBA_OctetSeq_var &p) // deep copy } else { - CORBA_OctetSeq *deep_copy = new CORBA_OctetSeq (*p.ptr_); + CORBA_OctetSeq *deep_copy = + new CORBA_OctetSeq (*p.ptr_); if (deep_copy != 0) { @@ -249,8 +250,8 @@ CORBA_OctetSeq_out::operator[] (CORBA::ULong index) #endif /* end #if !defined */ -#if !defined TAO_TAO_CDR_OP_CORBA_OctetSeq_I -#define TAO_TAO_CDR_OP_CORBA_OctetSeq_I +#if !defined _TAO_CDR_OP_CORBA_OctetSeq_I_ +#define _TAO_CDR_OP_CORBA_OctetSeq_I_ CORBA::Boolean TAO_Export operator<< ( TAO_OutputCDR &, @@ -261,5 +262,5 @@ CORBA::Boolean TAO_Export operator>> ( CORBA_OctetSeq & ); -#endif /* TAO_TAO_CDR_OP_CORBA_OctetSeq_I */ +#endif /* _TAO_CDR_OP_CORBA_OctetSeq_I_ */ diff --git a/TAO/tao/PortableInterceptor.cpp b/TAO/tao/PortableInterceptor.cpp index fc50eedcd2d..dae3c247a40 100644 --- a/TAO/tao/PortableInterceptor.cpp +++ b/TAO/tao/PortableInterceptor.cpp @@ -11,14 +11,14 @@ #endif /* TAO_HAS_INTERCEPTORS == 1 */ -// Followings are the defualt no-op implementation of client-side and -// server-side interceptors. The sole purpose to to let user -// overwrite only the interception operations they are interested in -// without providing others. +TAO_ClientRequestInterceptor_Adapter:: +~TAO_ClientRequestInterceptor_Adapter (void) +{ +} -// ** Users should always provide a name by dupping a string. -// char * POA_PortableInterceptor:: -// Interceptor::name (CORBA::Environment &) -// { -// return CORBA::string_dup ("TAO default"); -// } +// ------------------------------------------------------------------- + +TAO_ServerRequestInterceptor_Adapter:: +~TAO_ServerRequestInterceptor_Adapter (void) +{ +} diff --git a/TAO/tao/PortableInterceptor.i b/TAO/tao/PortableInterceptor.i index 7b8613ea68c..83b10444fef 100644 --- a/TAO/tao/PortableInterceptor.i +++ b/TAO/tao/PortableInterceptor.i @@ -12,12 +12,6 @@ TAO_ClientRequestInterceptor_Adapter::TAO_ClientRequestInterceptor_Adapter this->len_ = interceptors.size (); } -ACE_INLINE -TAO_ClientRequestInterceptor_Adapter:: -~TAO_ClientRequestInterceptor_Adapter (void) -{ -} - ACE_INLINE void TAO_ClientRequestInterceptor_Adapter:: send_request (PortableInterceptor::ClientRequestInfo_ptr ri, @@ -147,12 +141,6 @@ TAO_ServerRequestInterceptor_Adapter::TAO_ServerRequestInterceptor_Adapter this->len_ = interceptors.size (); } -ACE_INLINE -TAO_ServerRequestInterceptor_Adapter:: -~TAO_ServerRequestInterceptor_Adapter (void) -{ -} - ACE_INLINE void TAO_ServerRequestInterceptor_Adapter:: receive_request_service_contexts ( diff --git a/TAO/tao/PortableInterceptor.pidl b/TAO/tao/PortableInterceptor.pidl index 766e604acae..a36b8d0b4e5 100644 --- a/TAO/tao/PortableInterceptor.pidl +++ b/TAO/tao/PortableInterceptor.pidl @@ -24,7 +24,12 @@ // This file contains the interface definitions for "Portable" // Interceptor support. // The following is from orbos/99-12-02 Portable Interceptors spec, -// the full IDL is downloadable from orbos/99-12-02 +// the full IDL is downloadable from orbos/99-12-02. +// +// Additional updates from ptc/00-08-05 are also included. Changes +// include: +// - addition of the Interceptor::destroy() method +// - move of CodecFactory and Codec interfaces to the IOP module // File: PortableInterceptor.idl #ifndef _PORTABLE_INTERCEPTOR_IDL_ @@ -47,6 +52,7 @@ module PortableInterceptor { local interface Interceptor { readonly attribute string name; + void destroy (); }; exception ForwardRequest { @@ -97,10 +103,7 @@ module PortableInterceptor { readonly attribute any received_exception; readonly attribute CORBA::RepositoryId received_exception_id; IOP::TaggedComponent get_effective_component (in IOP::ComponentId id); - - // Removed it for starters - // IOP_N::TaggedComponentSeq get_effective_components (in IOP::ComponentId id); - + IOP::TaggedComponentSeq get_effective_components (in IOP::ComponentId id); CORBA::Policy get_request_policy (in CORBA::PolicyType type); void add_request_service_context ( in IOP::ServiceContext service_context, @@ -163,9 +166,7 @@ module PortableInterceptor { readonly attribute CORBA::StringSeq arguments; readonly attribute string orb_id; - - // Shall not need this for starters - // readonly attribute IOP_N::CodecFactory codec_factory; + readonly attribute IOP::CodecFactory codec_factory; void register_initial_reference (in ObjectId id, in Object obj) raises (InvalidName); diff --git a/TAO/tao/PortableInterceptorC.cpp b/TAO/tao/PortableInterceptorC.cpp index 0355ed31545..4a9f05edc20 100644 --- a/TAO/tao/PortableInterceptorC.cpp +++ b/TAO/tao/PortableInterceptorC.cpp @@ -21,15 +21,20 @@ #include "PortableInterceptorC.h" +#if defined (__BORLANDC__) +#pragma option -w-rvl -w-rch -w-ccc -w-aus +#endif /* __BORLANDC__ */ + #if !defined (__ACE_INLINE__) #include "PortableInterceptorC.i" #endif /* !defined INLINE */ -#include "tao/CORBA_String.h" +#include "CORBA_String.h" // default constructor -PortableInterceptor::Interceptor::Interceptor (void) -{} +PortableInterceptor::Interceptor::Interceptor () +{ + } // destructor PortableInterceptor::Interceptor::~Interceptor (void) @@ -83,7 +88,7 @@ void *PortableInterceptor::Interceptor::_tao_QueryInterface (ptr_arith_t type) else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_narrow)) retv = ACE_reinterpret_cast (void *, ACE_static_cast (CORBA::Object_ptr, this)); - + if (retv) this->_add_ref (); return retv; @@ -157,7 +162,7 @@ void PortableInterceptor::ForwardRequest::_tao_encode ( { return; } - + ACE_THROW (CORBA::MARSHAL ()); } @@ -170,7 +175,7 @@ void PortableInterceptor::ForwardRequest::_tao_decode ( { return; } - + ACE_THROW (CORBA::MARSHAL ()); } @@ -330,7 +335,7 @@ void PortableInterceptor::InvalidSlot::_tao_encode ( { return; } - + ACE_THROW (CORBA::MARSHAL ()); } @@ -343,7 +348,7 @@ void PortableInterceptor::InvalidSlot::_tao_decode ( { return; } - + ACE_THROW (CORBA::MARSHAL ()); } @@ -376,8 +381,9 @@ CORBA::TypeCode_ptr PortableInterceptor::InvalidSlot::_type (void) const // default constructor -PortableInterceptor::Current::Current (void) -{} +PortableInterceptor::Current::Current () +{ + } // destructor PortableInterceptor::Current::~Current (void) @@ -443,7 +449,7 @@ void *PortableInterceptor::Current::_tao_QueryInterface (ptr_arith_t type) else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_narrow)) retv = ACE_reinterpret_cast (void *, ACE_static_cast (CORBA::Object_ptr, this)); - + if (retv) this->_add_ref (); return retv; @@ -456,8 +462,9 @@ const char* PortableInterceptor::Current::_interface_repository_id (void) const // default constructor -PortableInterceptor::RequestInfo::RequestInfo (void) -{} +PortableInterceptor::RequestInfo::RequestInfo () +{ + } // destructor PortableInterceptor::RequestInfo::~RequestInfo (void) @@ -511,7 +518,7 @@ void *PortableInterceptor::RequestInfo::_tao_QueryInterface (ptr_arith_t type) else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_narrow)) retv = ACE_reinterpret_cast (void *, ACE_static_cast (CORBA::Object_ptr, this)); - + if (retv) this->_add_ref (); return retv; @@ -524,8 +531,9 @@ const char* PortableInterceptor::RequestInfo::_interface_repository_id (void) co // default constructor -PortableInterceptor::ClientRequestInfo::ClientRequestInfo (void) -{} +PortableInterceptor::ClientRequestInfo::ClientRequestInfo () +{ + } // destructor PortableInterceptor::ClientRequestInfo::~ClientRequestInfo (void) @@ -591,7 +599,7 @@ void *PortableInterceptor::ClientRequestInfo::_tao_QueryInterface (ptr_arith_t t else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_narrow)) retv = ACE_reinterpret_cast (void *, ACE_static_cast (CORBA::Object_ptr, this)); - + if (retv) this->_add_ref (); return retv; @@ -604,8 +612,9 @@ const char* PortableInterceptor::ClientRequestInfo::_interface_repository_id (vo // default constructor -PortableInterceptor::ServerRequestInfo::ServerRequestInfo (void) -{} +PortableInterceptor::ServerRequestInfo::ServerRequestInfo () +{ + } // destructor PortableInterceptor::ServerRequestInfo::~ServerRequestInfo (void) @@ -671,7 +680,7 @@ void *PortableInterceptor::ServerRequestInfo::_tao_QueryInterface (ptr_arith_t t else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_narrow)) retv = ACE_reinterpret_cast (void *, ACE_static_cast (CORBA::Object_ptr, this)); - + if (retv) this->_add_ref (); return retv; @@ -684,8 +693,9 @@ const char* PortableInterceptor::ServerRequestInfo::_interface_repository_id (vo // default constructor -PortableInterceptor::ClientRequestInterceptor::ClientRequestInterceptor (void) -{} +PortableInterceptor::ClientRequestInterceptor::ClientRequestInterceptor () +{ + } // destructor PortableInterceptor::ClientRequestInterceptor::~ClientRequestInterceptor (void) @@ -751,7 +761,7 @@ void *PortableInterceptor::ClientRequestInterceptor::_tao_QueryInterface (ptr_ar else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_narrow)) retv = ACE_reinterpret_cast (void *, ACE_static_cast (CORBA::Object_ptr, this)); - + if (retv) this->_add_ref (); return retv; @@ -764,8 +774,9 @@ const char* PortableInterceptor::ClientRequestInterceptor::_interface_repository // default constructor -PortableInterceptor::ServerRequestInterceptor::ServerRequestInterceptor (void) -{} +PortableInterceptor::ServerRequestInterceptor::ServerRequestInterceptor () +{ + } // destructor PortableInterceptor::ServerRequestInterceptor::~ServerRequestInterceptor (void) @@ -831,7 +842,7 @@ void *PortableInterceptor::ServerRequestInterceptor::_tao_QueryInterface (ptr_ar else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_narrow)) retv = ACE_reinterpret_cast (void *, ACE_static_cast (CORBA::Object_ptr, this)); - + if (retv) this->_add_ref (); return retv; @@ -844,8 +855,9 @@ const char* PortableInterceptor::ServerRequestInterceptor::_interface_repository // default constructor -PortableInterceptor::IORInfo::IORInfo (void) -{} +PortableInterceptor::IORInfo::IORInfo () +{ + } // destructor PortableInterceptor::IORInfo::~IORInfo (void) @@ -899,7 +911,7 @@ void *PortableInterceptor::IORInfo::_tao_QueryInterface (ptr_arith_t type) else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_narrow)) retv = ACE_reinterpret_cast (void *, ACE_static_cast (CORBA::Object_ptr, this)); - + if (retv) this->_add_ref (); return retv; @@ -912,8 +924,9 @@ const char* PortableInterceptor::IORInfo::_interface_repository_id (void) const // default constructor -PortableInterceptor::IORInterceptor::IORInterceptor (void) -{} +PortableInterceptor::IORInterceptor::IORInterceptor () +{ + } // destructor PortableInterceptor::IORInterceptor::~IORInterceptor (void) @@ -979,7 +992,7 @@ void *PortableInterceptor::IORInterceptor::_tao_QueryInterface (ptr_arith_t type else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_narrow)) retv = ACE_reinterpret_cast (void *, ACE_static_cast (CORBA::Object_ptr, this)); - + if (retv) this->_add_ref (); return retv; @@ -992,8 +1005,9 @@ const char* PortableInterceptor::IORInterceptor::_interface_repository_id (void) // default constructor -PortableInterceptor::PolicyFactory::PolicyFactory (void) -{} +PortableInterceptor::PolicyFactory::PolicyFactory () +{ + } // destructor PortableInterceptor::PolicyFactory::~PolicyFactory (void) @@ -1047,7 +1061,7 @@ void *PortableInterceptor::PolicyFactory::_tao_QueryInterface (ptr_arith_t type) else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_narrow)) retv = ACE_reinterpret_cast (void *, ACE_static_cast (CORBA::Object_ptr, this)); - + if (retv) this->_add_ref (); return retv; @@ -1060,8 +1074,9 @@ const char* PortableInterceptor::PolicyFactory::_interface_repository_id (void) // default constructor -PortableInterceptor::ORBInitInfo::ORBInitInfo (void) -{} +PortableInterceptor::ORBInitInfo::ORBInitInfo () +{ + } // destructor PortableInterceptor::ORBInitInfo::~ORBInitInfo (void) @@ -1115,7 +1130,7 @@ void *PortableInterceptor::ORBInitInfo::_tao_QueryInterface (ptr_arith_t type) else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_narrow)) retv = ACE_reinterpret_cast (void *, ACE_static_cast (CORBA::Object_ptr, this)); - + if (retv) this->_add_ref (); return retv; @@ -1274,8 +1289,9 @@ CORBA::Exception *PortableInterceptor::ORBInitInfo::InvalidName::_alloc (void) // default constructor -PortableInterceptor::ORBInitializer::ORBInitializer (void) -{} +PortableInterceptor::ORBInitializer::ORBInitializer () +{ + } // destructor PortableInterceptor::ORBInitializer::~ORBInitializer (void) @@ -1329,7 +1345,7 @@ void *PortableInterceptor::ORBInitializer::_tao_QueryInterface (ptr_arith_t type else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_narrow)) retv = ACE_reinterpret_cast (void *, ACE_static_cast (CORBA::Object_ptr, this)); - + if (retv) this->_add_ref (); return retv; @@ -1599,3 +1615,4 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const PortableIntercepto #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) # pragma instantiate TAO_Object_Manager<PortableInterceptor::ORBInitializer,PortableInterceptor::ORBInitializer_var> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ + diff --git a/TAO/tao/PortableInterceptorC.h b/TAO/tao/PortableInterceptorC.h index 4a424a219f4..40701acc557 100644 --- a/TAO/tao/PortableInterceptorC.h +++ b/TAO/tao/PortableInterceptorC.h @@ -23,7 +23,8 @@ #define _TAO_IDL_PORTABLEINTERCEPTORC_H_ #include "ace/pre.h" -#include "tao/corbafwd.h" + +#include "corbafwd.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once @@ -53,6 +54,10 @@ #pragma warning(disable:4250) #endif /* _MSC_VER */ +#if defined (__BORLANDC__) +#pragma option push -w-rvl -w-rch -w-ccc -w-inl +#endif /* __BORLANDC__ */ + TAO_NAMESPACE PortableInterceptor { @@ -61,7 +66,7 @@ TAO_NAMESPACE PortableInterceptor class Interceptor; typedef Interceptor *Interceptor_ptr; - + #endif /* end #if !defined */ @@ -72,17 +77,17 @@ TAO_NAMESPACE PortableInterceptor { public: Interceptor_var (void); // default constructor - Interceptor_var (Interceptor_ptr p) : ptr_ (p) {} + Interceptor_var (Interceptor_ptr p) : ptr_ (p) {} Interceptor_var (const Interceptor_var &); // copy constructor ~Interceptor_var (void); // destructor - + Interceptor_var &operator= (Interceptor_ptr); Interceptor_var &operator= (const Interceptor_var &); Interceptor_ptr operator-> (void) const; - + operator const Interceptor_ptr &() const; operator Interceptor_ptr &(); - // in, inout, out, _retn + // in, inout, out, _retn Interceptor_ptr in (void) const; Interceptor_ptr &inout (void); Interceptor_ptr &out (void); @@ -115,7 +120,7 @@ TAO_NAMESPACE PortableInterceptor operator Interceptor_ptr &(); Interceptor_ptr &ptr (void); Interceptor_ptr operator-> (void); - + private: Interceptor_ptr &ptr_; }; @@ -139,12 +144,12 @@ class TAO_Export Interceptor : public virtual CORBA_Object static Interceptor_ptr _duplicate (Interceptor_ptr obj); static Interceptor_ptr _narrow ( CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); static Interceptor_ptr _unchecked_narrow ( CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); static Interceptor_ptr _nil (void) @@ -159,12 +164,20 @@ class TAO_Export Interceptor : public virtual CORBA_Object CORBA::SystemException )) = 0; - virtual void *_tao_QueryInterface (ptr_arith_t type); + virtual void destroy ( + TAO_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )) = 0; + virtual void *_tao_QueryInterface (ptr_arith_t type); + virtual const char* _interface_repository_id (void) const; protected: - Interceptor (void); + Interceptor (); + virtual ~Interceptor (void); private: Interceptor (const Interceptor &); @@ -186,36 +199,36 @@ class TAO_Export Interceptor : public virtual CORBA_Object ForwardRequest (void); // Default constructor. - + ForwardRequest (const ForwardRequest &); // Copy constructor. - + ~ForwardRequest (void); // Destructor. - + static void _tao_any_destructor (void*); - + ForwardRequest &operator= (const ForwardRequest &); - + virtual void _raise (void); virtual void _tao_encode ( TAO_OutputCDR &, CORBA::Environment & ) const; - + virtual void _tao_decode ( TAO_InputCDR &, CORBA::Environment & ); - + static ForwardRequest *_downcast (CORBA::Exception *); ForwardRequest ( const CORBA::Object_ptr _tao_forward, CORBA::Boolean _tao_permanent ); - + // = TAO extension. static CORBA::Exception *_alloc (void); virtual CORBA::TypeCode_ptr _type (void) const; @@ -256,29 +269,29 @@ class TAO_Export Interceptor : public virtual CORBA_Object InvalidSlot (void); // Default constructor. - + InvalidSlot (const InvalidSlot &); // Copy constructor. - + ~InvalidSlot (void); // Destructor. - + static void _tao_any_destructor (void*); - + InvalidSlot &operator= (const InvalidSlot &); - + virtual void _raise (void); virtual void _tao_encode ( TAO_OutputCDR &, CORBA::Environment & ) const; - + virtual void _tao_decode ( TAO_InputCDR &, CORBA::Environment & ); - + static InvalidSlot *_downcast (CORBA::Exception *); @@ -298,7 +311,7 @@ class TAO_Export Interceptor : public virtual CORBA_Object class Current; typedef Current *Current_ptr; - + #endif /* end #if !defined */ @@ -309,17 +322,17 @@ class TAO_Export Interceptor : public virtual CORBA_Object { public: Current_var (void); // default constructor - Current_var (Current_ptr p) : ptr_ (p) {} + Current_var (Current_ptr p) : ptr_ (p) {} Current_var (const Current_var &); // copy constructor ~Current_var (void); // destructor - + Current_var &operator= (Current_ptr); Current_var &operator= (const Current_var &); Current_ptr operator-> (void) const; - + operator const Current_ptr &() const; operator Current_ptr &(); - // in, inout, out, _retn + // in, inout, out, _retn Current_ptr in (void) const; Current_ptr &inout (void); Current_ptr &out (void); @@ -352,7 +365,7 @@ class TAO_Export Interceptor : public virtual CORBA_Object operator Current_ptr &(); Current_ptr &ptr (void); Current_ptr operator-> (void); - + private: Current_ptr &ptr_; }; @@ -376,12 +389,12 @@ class TAO_Export Current: public virtual CORBA::Current static Current_ptr _duplicate (Current_ptr obj); static Current_ptr _narrow ( CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); static Current_ptr _unchecked_narrow ( CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); static Current_ptr _nil (void) @@ -391,7 +404,7 @@ class TAO_Export Current: public virtual CORBA::Current virtual CORBA::Any * get_slot ( PortableInterceptor::SlotId id, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -402,7 +415,7 @@ class TAO_Export Current: public virtual CORBA::Current virtual void set_slot ( PortableInterceptor::SlotId id, const CORBA::Any & data, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -411,11 +424,12 @@ class TAO_Export Current: public virtual CORBA::Current )) = 0; virtual void *_tao_QueryInterface (ptr_arith_t type); - + virtual const char* _interface_repository_id (void) const; protected: - Current (void); + Current (); + virtual ~Current (void); private: Current (const Current &); @@ -431,7 +445,7 @@ class TAO_Export Current: public virtual CORBA::Current class RequestInfo; typedef RequestInfo *RequestInfo_ptr; - + #endif /* end #if !defined */ @@ -442,17 +456,17 @@ class TAO_Export Current: public virtual CORBA::Current { public: RequestInfo_var (void); // default constructor - RequestInfo_var (RequestInfo_ptr p) : ptr_ (p) {} + RequestInfo_var (RequestInfo_ptr p) : ptr_ (p) {} RequestInfo_var (const RequestInfo_var &); // copy constructor ~RequestInfo_var (void); // destructor - + RequestInfo_var &operator= (RequestInfo_ptr); RequestInfo_var &operator= (const RequestInfo_var &); RequestInfo_ptr operator-> (void) const; - + operator const RequestInfo_ptr &() const; operator RequestInfo_ptr &(); - // in, inout, out, _retn + // in, inout, out, _retn RequestInfo_ptr in (void) const; RequestInfo_ptr &inout (void); RequestInfo_ptr &out (void); @@ -485,7 +499,7 @@ class TAO_Export Current: public virtual CORBA::Current operator RequestInfo_ptr &(); RequestInfo_ptr &ptr (void); RequestInfo_ptr operator-> (void); - + private: RequestInfo_ptr &ptr_; }; @@ -509,12 +523,12 @@ class TAO_Export RequestInfo : public virtual CORBA_Object static RequestInfo_ptr _duplicate (RequestInfo_ptr obj); static RequestInfo_ptr _narrow ( CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); static RequestInfo_ptr _unchecked_narrow ( CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); static RequestInfo_ptr _nil (void) @@ -523,7 +537,7 @@ class TAO_Export RequestInfo : public virtual CORBA_Object } virtual CORBA::ULong request_id ( - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -531,7 +545,7 @@ class TAO_Export RequestInfo : public virtual CORBA_Object )) = 0; virtual char * operation ( - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -539,7 +553,7 @@ class TAO_Export RequestInfo : public virtual CORBA_Object )) = 0; virtual Dynamic::ParameterList * arguments ( - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -547,7 +561,7 @@ class TAO_Export RequestInfo : public virtual CORBA_Object )) = 0; virtual Dynamic::ExceptionList * exceptions ( - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -555,7 +569,7 @@ class TAO_Export RequestInfo : public virtual CORBA_Object )) = 0; virtual Dynamic::ContextList * contexts ( - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -563,7 +577,7 @@ class TAO_Export RequestInfo : public virtual CORBA_Object )) = 0; virtual Dynamic::RequestContext * operation_context ( - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -571,7 +585,7 @@ class TAO_Export RequestInfo : public virtual CORBA_Object )) = 0; virtual CORBA::Any * result ( - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -579,27 +593,23 @@ class TAO_Export RequestInfo : public virtual CORBA_Object )) = 0; virtual CORBA::Boolean response_expected ( - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( CORBA::SystemException )) = 0; -#if (TAO_HAS_CORBA_MESSAGING == 1) - virtual Messaging::SyncScope sync_scope ( - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( CORBA::SystemException )) = 0; -#endif /* TAO_HAS_CORBA_MESSAGING == 1 */ - virtual PortableInterceptor::ReplyStatus reply_status ( - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -607,7 +617,7 @@ class TAO_Export RequestInfo : public virtual CORBA_Object )) = 0; virtual CORBA::Object_ptr forward_reference ( - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -616,7 +626,7 @@ class TAO_Export RequestInfo : public virtual CORBA_Object virtual CORBA::Any * get_slot ( PortableInterceptor::SlotId id, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -626,7 +636,7 @@ class TAO_Export RequestInfo : public virtual CORBA_Object virtual IOP::ServiceContext * get_request_service_context ( IOP::ServiceId id, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -635,7 +645,7 @@ class TAO_Export RequestInfo : public virtual CORBA_Object virtual IOP::ServiceContext * get_reply_service_context ( IOP::ServiceId id, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -643,11 +653,12 @@ class TAO_Export RequestInfo : public virtual CORBA_Object )) = 0; virtual void *_tao_QueryInterface (ptr_arith_t type); - + virtual const char* _interface_repository_id (void) const; protected: - RequestInfo (void); + RequestInfo (); + virtual ~RequestInfo (void); private: RequestInfo (const RequestInfo &); @@ -663,7 +674,7 @@ class TAO_Export RequestInfo : public virtual CORBA_Object class ClientRequestInfo; typedef ClientRequestInfo *ClientRequestInfo_ptr; - + #endif /* end #if !defined */ @@ -674,17 +685,17 @@ class TAO_Export RequestInfo : public virtual CORBA_Object { public: ClientRequestInfo_var (void); // default constructor - ClientRequestInfo_var (ClientRequestInfo_ptr p) : ptr_ (p) {} + ClientRequestInfo_var (ClientRequestInfo_ptr p) : ptr_ (p) {} ClientRequestInfo_var (const ClientRequestInfo_var &); // copy constructor ~ClientRequestInfo_var (void); // destructor - + ClientRequestInfo_var &operator= (ClientRequestInfo_ptr); ClientRequestInfo_var &operator= (const ClientRequestInfo_var &); ClientRequestInfo_ptr operator-> (void) const; - + operator const ClientRequestInfo_ptr &() const; operator ClientRequestInfo_ptr &(); - // in, inout, out, _retn + // in, inout, out, _retn ClientRequestInfo_ptr in (void) const; ClientRequestInfo_ptr &inout (void); ClientRequestInfo_ptr &out (void); @@ -717,7 +728,7 @@ class TAO_Export RequestInfo : public virtual CORBA_Object operator ClientRequestInfo_ptr &(); ClientRequestInfo_ptr &ptr (void); ClientRequestInfo_ptr operator-> (void); - + private: ClientRequestInfo_ptr &ptr_; }; @@ -741,12 +752,12 @@ class TAO_Export ClientRequestInfo: public virtual RequestInfo static ClientRequestInfo_ptr _duplicate (ClientRequestInfo_ptr obj); static ClientRequestInfo_ptr _narrow ( CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); static ClientRequestInfo_ptr _unchecked_narrow ( CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); static ClientRequestInfo_ptr _nil (void) @@ -755,7 +766,7 @@ class TAO_Export ClientRequestInfo: public virtual RequestInfo } virtual CORBA::Object_ptr target ( - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -763,7 +774,7 @@ class TAO_Export ClientRequestInfo: public virtual RequestInfo )) = 0; virtual CORBA::Object_ptr effective_target ( - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -771,7 +782,7 @@ class TAO_Export ClientRequestInfo: public virtual RequestInfo )) = 0; virtual IOP::TaggedProfile * effective_profile ( - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -779,7 +790,7 @@ class TAO_Export ClientRequestInfo: public virtual RequestInfo )) = 0; virtual CORBA::Any * received_exception ( - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -787,7 +798,7 @@ class TAO_Export ClientRequestInfo: public virtual RequestInfo )) = 0; virtual char * received_exception_id ( - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -796,7 +807,17 @@ class TAO_Export ClientRequestInfo: public virtual RequestInfo virtual IOP::TaggedComponent * get_effective_component ( IOP::ComponentId id, - CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )) = 0; + + virtual IOP::TaggedComponentSeq * get_effective_components ( + IOP::ComponentId id, + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () ) ACE_THROW_SPEC (( CORBA::SystemException @@ -804,7 +825,8 @@ class TAO_Export ClientRequestInfo: public virtual RequestInfo virtual CORBA::Policy_ptr get_request_policy ( CORBA::PolicyType type, - CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () ) ACE_THROW_SPEC (( CORBA::SystemException @@ -813,18 +835,20 @@ class TAO_Export ClientRequestInfo: public virtual RequestInfo virtual void add_request_service_context ( const IOP::ServiceContext & service_context, CORBA::Boolean replace, - CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () ) ACE_THROW_SPEC (( CORBA::SystemException )) = 0; virtual void *_tao_QueryInterface (ptr_arith_t type); - + virtual const char* _interface_repository_id (void) const; protected: - ClientRequestInfo (void); + ClientRequestInfo (); + virtual ~ClientRequestInfo (void); private: ClientRequestInfo (const ClientRequestInfo &); @@ -840,7 +864,7 @@ class TAO_Export ClientRequestInfo: public virtual RequestInfo class ServerRequestInfo; typedef ServerRequestInfo *ServerRequestInfo_ptr; - + #endif /* end #if !defined */ @@ -851,17 +875,17 @@ class TAO_Export ClientRequestInfo: public virtual RequestInfo { public: ServerRequestInfo_var (void); // default constructor - ServerRequestInfo_var (ServerRequestInfo_ptr p) : ptr_ (p) {} + ServerRequestInfo_var (ServerRequestInfo_ptr p) : ptr_ (p) {} ServerRequestInfo_var (const ServerRequestInfo_var &); // copy constructor ~ServerRequestInfo_var (void); // destructor - + ServerRequestInfo_var &operator= (ServerRequestInfo_ptr); ServerRequestInfo_var &operator= (const ServerRequestInfo_var &); ServerRequestInfo_ptr operator-> (void) const; - + operator const ServerRequestInfo_ptr &() const; operator ServerRequestInfo_ptr &(); - // in, inout, out, _retn + // in, inout, out, _retn ServerRequestInfo_ptr in (void) const; ServerRequestInfo_ptr &inout (void); ServerRequestInfo_ptr &out (void); @@ -894,7 +918,7 @@ class TAO_Export ClientRequestInfo: public virtual RequestInfo operator ServerRequestInfo_ptr &(); ServerRequestInfo_ptr &ptr (void); ServerRequestInfo_ptr operator-> (void); - + private: ServerRequestInfo_ptr &ptr_; }; @@ -918,12 +942,12 @@ class TAO_Export ServerRequestInfo: public virtual RequestInfo static ServerRequestInfo_ptr _duplicate (ServerRequestInfo_ptr obj); static ServerRequestInfo_ptr _narrow ( CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); static ServerRequestInfo_ptr _unchecked_narrow ( CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); static ServerRequestInfo_ptr _nil (void) @@ -932,28 +956,32 @@ class TAO_Export ServerRequestInfo: public virtual RequestInfo } virtual CORBA::Any * sending_exception ( - CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () ) ACE_THROW_SPEC (( CORBA::SystemException )) = 0; virtual CORBA::OctetSeq * object_id ( - CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () ) ACE_THROW_SPEC (( CORBA::SystemException )) = 0; virtual CORBA::OctetSeq * adapter_id ( - CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () ) ACE_THROW_SPEC (( CORBA::SystemException )) = 0; virtual char * target_most_derived_interface ( - CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () ) ACE_THROW_SPEC (( CORBA::SystemException @@ -961,7 +989,8 @@ class TAO_Export ServerRequestInfo: public virtual RequestInfo virtual CORBA::Policy_ptr get_server_policy ( CORBA::PolicyType type, - CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () ) ACE_THROW_SPEC (( CORBA::SystemException @@ -970,8 +999,9 @@ class TAO_Export ServerRequestInfo: public virtual RequestInfo virtual void set_slot ( PortableInterceptor::SlotId id, const CORBA::Any & data, - CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () - ) + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) ACE_THROW_SPEC (( CORBA::SystemException, PortableInterceptor::InvalidSlot @@ -979,7 +1009,8 @@ class TAO_Export ServerRequestInfo: public virtual RequestInfo virtual CORBA::Boolean target_is_a ( const char * id, - CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () ) ACE_THROW_SPEC (( CORBA::SystemException @@ -988,18 +1019,20 @@ class TAO_Export ServerRequestInfo: public virtual RequestInfo virtual void add_reply_service_context ( const IOP::ServiceContext & service_context, CORBA::Boolean replace, - CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () - ) + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) ACE_THROW_SPEC (( CORBA::SystemException )) = 0; virtual void *_tao_QueryInterface (ptr_arith_t type); - + virtual const char* _interface_repository_id (void) const; protected: - ServerRequestInfo (void); + ServerRequestInfo (); + virtual ~ServerRequestInfo (void); private: ServerRequestInfo (const ServerRequestInfo &); @@ -1015,7 +1048,7 @@ class TAO_Export ServerRequestInfo: public virtual RequestInfo class ClientRequestInterceptor; typedef ClientRequestInterceptor *ClientRequestInterceptor_ptr; - + #endif /* end #if !defined */ @@ -1026,17 +1059,17 @@ class TAO_Export ServerRequestInfo: public virtual RequestInfo { public: ClientRequestInterceptor_var (void); // default constructor - ClientRequestInterceptor_var (ClientRequestInterceptor_ptr p) : ptr_ (p) {} + ClientRequestInterceptor_var (ClientRequestInterceptor_ptr p) : ptr_ (p) {} ClientRequestInterceptor_var (const ClientRequestInterceptor_var &); // copy constructor ~ClientRequestInterceptor_var (void); // destructor - + ClientRequestInterceptor_var &operator= (ClientRequestInterceptor_ptr); ClientRequestInterceptor_var &operator= (const ClientRequestInterceptor_var &); ClientRequestInterceptor_ptr operator-> (void) const; - + operator const ClientRequestInterceptor_ptr &() const; operator ClientRequestInterceptor_ptr &(); - // in, inout, out, _retn + // in, inout, out, _retn ClientRequestInterceptor_ptr in (void) const; ClientRequestInterceptor_ptr &inout (void); ClientRequestInterceptor_ptr &out (void); @@ -1069,7 +1102,7 @@ class TAO_Export ServerRequestInfo: public virtual RequestInfo operator ClientRequestInterceptor_ptr &(); ClientRequestInterceptor_ptr &ptr (void); ClientRequestInterceptor_ptr operator-> (void); - + private: ClientRequestInterceptor_ptr &ptr_; }; @@ -1093,12 +1126,12 @@ class TAO_Export ClientRequestInterceptor: public virtual Interceptor static ClientRequestInterceptor_ptr _duplicate (ClientRequestInterceptor_ptr obj); static ClientRequestInterceptor_ptr _narrow ( CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); static ClientRequestInterceptor_ptr _unchecked_narrow ( CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); static ClientRequestInterceptor_ptr _nil (void) @@ -1109,7 +1142,7 @@ class TAO_Export ClientRequestInterceptor: public virtual Interceptor virtual void send_request ( PortableInterceptor::ClientRequestInfo_ptr ri TAO_ENV_ARG_DECL_WITH_DEFAULTS - ) + ) ACE_THROW_SPEC (( CORBA::SystemException, PortableInterceptor::ForwardRequest @@ -1126,7 +1159,7 @@ class TAO_Export ClientRequestInterceptor: public virtual Interceptor virtual void receive_reply ( PortableInterceptor::ClientRequestInfo_ptr ri TAO_ENV_ARG_DECL_WITH_DEFAULTS - ) + ) ACE_THROW_SPEC (( CORBA::SystemException )) = 0; @@ -1134,7 +1167,7 @@ class TAO_Export ClientRequestInterceptor: public virtual Interceptor virtual void receive_exception ( PortableInterceptor::ClientRequestInfo_ptr ri TAO_ENV_ARG_DECL_WITH_DEFAULTS - ) + ) ACE_THROW_SPEC (( CORBA::SystemException, PortableInterceptor::ForwardRequest @@ -1150,11 +1183,12 @@ class TAO_Export ClientRequestInterceptor: public virtual Interceptor )) = 0; virtual void *_tao_QueryInterface (ptr_arith_t type); - + virtual const char* _interface_repository_id (void) const; protected: - ClientRequestInterceptor (void); + ClientRequestInterceptor (); + virtual ~ClientRequestInterceptor (void); private: ClientRequestInterceptor (const ClientRequestInterceptor &); @@ -1170,7 +1204,7 @@ class TAO_Export ClientRequestInterceptor: public virtual Interceptor class ServerRequestInterceptor; typedef ServerRequestInterceptor *ServerRequestInterceptor_ptr; - + #endif /* end #if !defined */ @@ -1181,17 +1215,17 @@ class TAO_Export ClientRequestInterceptor: public virtual Interceptor { public: ServerRequestInterceptor_var (void); // default constructor - ServerRequestInterceptor_var (ServerRequestInterceptor_ptr p) : ptr_ (p) {} + ServerRequestInterceptor_var (ServerRequestInterceptor_ptr p) : ptr_ (p) {} ServerRequestInterceptor_var (const ServerRequestInterceptor_var &); // copy constructor ~ServerRequestInterceptor_var (void); // destructor - + ServerRequestInterceptor_var &operator= (ServerRequestInterceptor_ptr); ServerRequestInterceptor_var &operator= (const ServerRequestInterceptor_var &); ServerRequestInterceptor_ptr operator-> (void) const; - + operator const ServerRequestInterceptor_ptr &() const; operator ServerRequestInterceptor_ptr &(); - // in, inout, out, _retn + // in, inout, out, _retn ServerRequestInterceptor_ptr in (void) const; ServerRequestInterceptor_ptr &inout (void); ServerRequestInterceptor_ptr &out (void); @@ -1224,7 +1258,7 @@ class TAO_Export ClientRequestInterceptor: public virtual Interceptor operator ServerRequestInterceptor_ptr &(); ServerRequestInterceptor_ptr &ptr (void); ServerRequestInterceptor_ptr operator-> (void); - + private: ServerRequestInterceptor_ptr &ptr_; }; @@ -1248,12 +1282,12 @@ class TAO_Export ServerRequestInterceptor: public virtual Interceptor static ServerRequestInterceptor_ptr _duplicate (ServerRequestInterceptor_ptr obj); static ServerRequestInterceptor_ptr _narrow ( CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); static ServerRequestInterceptor_ptr _unchecked_narrow ( CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); static ServerRequestInterceptor_ptr _nil (void) @@ -1273,7 +1307,7 @@ class TAO_Export ServerRequestInterceptor: public virtual Interceptor virtual void receive_request ( PortableInterceptor::ServerRequestInfo_ptr ri TAO_ENV_ARG_DECL_WITH_DEFAULTS - ) + ) ACE_THROW_SPEC (( CORBA::SystemException, PortableInterceptor::ForwardRequest @@ -1282,7 +1316,7 @@ class TAO_Export ServerRequestInterceptor: public virtual Interceptor virtual void send_reply ( PortableInterceptor::ServerRequestInfo_ptr ri TAO_ENV_ARG_DECL_WITH_DEFAULTS - ) + ) ACE_THROW_SPEC (( CORBA::SystemException )) = 0; @@ -1290,7 +1324,7 @@ class TAO_Export ServerRequestInterceptor: public virtual Interceptor virtual void send_exception ( PortableInterceptor::ServerRequestInfo_ptr ri TAO_ENV_ARG_DECL_WITH_DEFAULTS - ) + ) ACE_THROW_SPEC (( CORBA::SystemException, PortableInterceptor::ForwardRequest @@ -1306,11 +1340,12 @@ class TAO_Export ServerRequestInterceptor: public virtual Interceptor )) = 0; virtual void *_tao_QueryInterface (ptr_arith_t type); - + virtual const char* _interface_repository_id (void) const; protected: - ServerRequestInterceptor (void); + ServerRequestInterceptor (); + virtual ~ServerRequestInterceptor (void); private: ServerRequestInterceptor (const ServerRequestInterceptor &); @@ -1326,7 +1361,7 @@ class TAO_Export ServerRequestInterceptor: public virtual Interceptor class IORInfo; typedef IORInfo *IORInfo_ptr; - + #endif /* end #if !defined */ @@ -1337,17 +1372,17 @@ class TAO_Export ServerRequestInterceptor: public virtual Interceptor { public: IORInfo_var (void); // default constructor - IORInfo_var (IORInfo_ptr p) : ptr_ (p) {} + IORInfo_var (IORInfo_ptr p) : ptr_ (p) {} IORInfo_var (const IORInfo_var &); // copy constructor ~IORInfo_var (void); // destructor - + IORInfo_var &operator= (IORInfo_ptr); IORInfo_var &operator= (const IORInfo_var &); IORInfo_ptr operator-> (void) const; - + operator const IORInfo_ptr &() const; operator IORInfo_ptr &(); - // in, inout, out, _retn + // in, inout, out, _retn IORInfo_ptr in (void) const; IORInfo_ptr &inout (void); IORInfo_ptr &out (void); @@ -1380,7 +1415,7 @@ class TAO_Export ServerRequestInterceptor: public virtual Interceptor operator IORInfo_ptr &(); IORInfo_ptr &ptr (void); IORInfo_ptr operator-> (void); - + private: IORInfo_ptr &ptr_; }; @@ -1404,12 +1439,12 @@ class TAO_Export IORInfo : public virtual CORBA_Object static IORInfo_ptr _duplicate (IORInfo_ptr obj); static IORInfo_ptr _narrow ( CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); static IORInfo_ptr _unchecked_narrow ( CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); static IORInfo_ptr _nil (void) @@ -1419,7 +1454,8 @@ class TAO_Export IORInfo : public virtual CORBA_Object virtual CORBA::Policy_ptr get_effective_policy ( CORBA::PolicyType type, - CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () ) ACE_THROW_SPEC (( CORBA::SystemException @@ -1427,7 +1463,8 @@ class TAO_Export IORInfo : public virtual CORBA_Object virtual void add_ior_component ( const IOP::TaggedComponent & component, - CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () ) ACE_THROW_SPEC (( CORBA::SystemException @@ -1436,18 +1473,20 @@ class TAO_Export IORInfo : public virtual CORBA_Object virtual void add_ior_component_to_profile ( const IOP::TaggedComponent & component, IOP::ProfileId profile_id, - CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () ) ACE_THROW_SPEC (( CORBA::SystemException )) = 0; virtual void *_tao_QueryInterface (ptr_arith_t type); - + virtual const char* _interface_repository_id (void) const; protected: - IORInfo (void); + IORInfo (); + virtual ~IORInfo (void); private: IORInfo (const IORInfo &); @@ -1463,7 +1502,7 @@ class TAO_Export IORInfo : public virtual CORBA_Object class IORInterceptor; typedef IORInterceptor *IORInterceptor_ptr; - + #endif /* end #if !defined */ @@ -1474,17 +1513,17 @@ class TAO_Export IORInfo : public virtual CORBA_Object { public: IORInterceptor_var (void); // default constructor - IORInterceptor_var (IORInterceptor_ptr p) : ptr_ (p) {} + IORInterceptor_var (IORInterceptor_ptr p) : ptr_ (p) {} IORInterceptor_var (const IORInterceptor_var &); // copy constructor ~IORInterceptor_var (void); // destructor - + IORInterceptor_var &operator= (IORInterceptor_ptr); IORInterceptor_var &operator= (const IORInterceptor_var &); IORInterceptor_ptr operator-> (void) const; - + operator const IORInterceptor_ptr &() const; operator IORInterceptor_ptr &(); - // in, inout, out, _retn + // in, inout, out, _retn IORInterceptor_ptr in (void) const; IORInterceptor_ptr &inout (void); IORInterceptor_ptr &out (void); @@ -1517,7 +1556,7 @@ class TAO_Export IORInfo : public virtual CORBA_Object operator IORInterceptor_ptr &(); IORInterceptor_ptr &ptr (void); IORInterceptor_ptr operator-> (void); - + private: IORInterceptor_ptr &ptr_; }; @@ -1541,12 +1580,12 @@ class TAO_Export IORInterceptor: public virtual Interceptor static IORInterceptor_ptr _duplicate (IORInterceptor_ptr obj); static IORInterceptor_ptr _narrow ( CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); static IORInterceptor_ptr _unchecked_narrow ( CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); static IORInterceptor_ptr _nil (void) @@ -1563,11 +1602,12 @@ class TAO_Export IORInterceptor: public virtual Interceptor )) = 0; virtual void *_tao_QueryInterface (ptr_arith_t type); - + virtual const char* _interface_repository_id (void) const; protected: - IORInterceptor (void); + IORInterceptor (); + virtual ~IORInterceptor (void); private: IORInterceptor (const IORInterceptor &); @@ -1583,7 +1623,7 @@ class TAO_Export IORInterceptor: public virtual Interceptor class PolicyFactory; typedef PolicyFactory *PolicyFactory_ptr; - + #endif /* end #if !defined */ @@ -1594,17 +1634,17 @@ class TAO_Export IORInterceptor: public virtual Interceptor { public: PolicyFactory_var (void); // default constructor - PolicyFactory_var (PolicyFactory_ptr p) : ptr_ (p) {} + PolicyFactory_var (PolicyFactory_ptr p) : ptr_ (p) {} PolicyFactory_var (const PolicyFactory_var &); // copy constructor ~PolicyFactory_var (void); // destructor - + PolicyFactory_var &operator= (PolicyFactory_ptr); PolicyFactory_var &operator= (const PolicyFactory_var &); PolicyFactory_ptr operator-> (void) const; - + operator const PolicyFactory_ptr &() const; operator PolicyFactory_ptr &(); - // in, inout, out, _retn + // in, inout, out, _retn PolicyFactory_ptr in (void) const; PolicyFactory_ptr &inout (void); PolicyFactory_ptr &out (void); @@ -1637,7 +1677,7 @@ class TAO_Export IORInterceptor: public virtual Interceptor operator PolicyFactory_ptr &(); PolicyFactory_ptr &ptr (void); PolicyFactory_ptr operator-> (void); - + private: PolicyFactory_ptr &ptr_; }; @@ -1661,12 +1701,12 @@ class TAO_Export PolicyFactory : public virtual CORBA_Object static PolicyFactory_ptr _duplicate (PolicyFactory_ptr obj); static PolicyFactory_ptr _narrow ( CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); static PolicyFactory_ptr _unchecked_narrow ( CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); static PolicyFactory_ptr _nil (void) @@ -1685,11 +1725,12 @@ class TAO_Export PolicyFactory : public virtual CORBA_Object )) = 0; virtual void *_tao_QueryInterface (ptr_arith_t type); - + virtual const char* _interface_repository_id (void) const; protected: - PolicyFactory (void); + PolicyFactory (); + virtual ~PolicyFactory (void); private: PolicyFactory (const PolicyFactory &); @@ -1705,7 +1746,7 @@ class TAO_Export PolicyFactory : public virtual CORBA_Object class ORBInitInfo; typedef ORBInitInfo *ORBInitInfo_ptr; - + #endif /* end #if !defined */ @@ -1716,17 +1757,17 @@ class TAO_Export PolicyFactory : public virtual CORBA_Object { public: ORBInitInfo_var (void); // default constructor - ORBInitInfo_var (ORBInitInfo_ptr p) : ptr_ (p) {} + ORBInitInfo_var (ORBInitInfo_ptr p) : ptr_ (p) {} ORBInitInfo_var (const ORBInitInfo_var &); // copy constructor ~ORBInitInfo_var (void); // destructor - + ORBInitInfo_var &operator= (ORBInitInfo_ptr); ORBInitInfo_var &operator= (const ORBInitInfo_var &); ORBInitInfo_ptr operator-> (void) const; - + operator const ORBInitInfo_ptr &() const; operator ORBInitInfo_ptr &(); - // in, inout, out, _retn + // in, inout, out, _retn ORBInitInfo_ptr in (void) const; ORBInitInfo_ptr &inout (void); ORBInitInfo_ptr &out (void); @@ -1759,7 +1800,7 @@ class TAO_Export PolicyFactory : public virtual CORBA_Object operator ORBInitInfo_ptr &(); ORBInitInfo_ptr &ptr (void); ORBInitInfo_ptr operator-> (void); - + private: ORBInitInfo_ptr &ptr_; }; @@ -1783,12 +1824,12 @@ class TAO_Export ORBInitInfo : public virtual CORBA_Object static ORBInitInfo_ptr _duplicate (ORBInitInfo_ptr obj); static ORBInitInfo_ptr _narrow ( CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); static ORBInitInfo_ptr _unchecked_narrow ( CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); static ORBInitInfo_ptr _nil (void) @@ -1799,7 +1840,7 @@ class TAO_Export ORBInitInfo : public virtual CORBA_Object typedef char * ObjectId; typedef CORBA::String_var ObjectId_var; typedef CORBA::String_out ObjectId_out; - + #if !defined (_PORTABLEINTERCEPTOR_ORBINITINFO_DUPLICATENAME_CH_) #define _PORTABLEINTERCEPTOR_ORBINITINFO_DUPLICATENAME_CH_ @@ -1810,33 +1851,33 @@ class TAO_Export ORBInitInfo : public virtual CORBA_Object DuplicateName (void); // Default constructor. - + DuplicateName (const DuplicateName &); // Copy constructor. - + ~DuplicateName (void); // Destructor. - + DuplicateName &operator= (const DuplicateName &); - + virtual void _raise (void); virtual void _tao_encode ( TAO_OutputCDR &, CORBA::Environment & ) const; - + virtual void _tao_decode ( TAO_InputCDR &, CORBA::Environment & ); - + static DuplicateName *_downcast (CORBA::Exception *); DuplicateName ( const char * _tao_name ); - + // = TAO extension. static CORBA::Exception *_alloc (void); }; // Exception PortableInterceptor::ORBInitInfo::DuplicateName. @@ -1854,27 +1895,27 @@ class TAO_Export ORBInitInfo : public virtual CORBA_Object InvalidName (void); // Default constructor. - + InvalidName (const InvalidName &); // Copy constructor. - + ~InvalidName (void); // Destructor. - + InvalidName &operator= (const InvalidName &); - + virtual void _raise (void); virtual void _tao_encode ( TAO_OutputCDR &, CORBA::Environment & ) const; - + virtual void _tao_decode ( TAO_InputCDR &, CORBA::Environment & ); - + static InvalidName *_downcast (CORBA::Exception *); @@ -1886,7 +1927,7 @@ class TAO_Export ORBInitInfo : public virtual CORBA_Object #endif /* end #if !defined */ virtual CORBA::StringSeq * arguments ( - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -1894,7 +1935,15 @@ class TAO_Export ORBInitInfo : public virtual CORBA_Object )) = 0; virtual char * orb_id ( - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = + TAO_default_environment () + ) + ACE_THROW_SPEC (( + CORBA::SystemException + )) = 0; + + virtual IOP::CodecFactory_ptr codec_factory ( + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -1904,7 +1953,7 @@ class TAO_Export ORBInitInfo : public virtual CORBA_Object virtual void register_initial_reference ( const char * id, CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -1914,7 +1963,7 @@ class TAO_Export ORBInitInfo : public virtual CORBA_Object virtual CORBA::Object_ptr resolve_initial_references ( const char * id, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -1924,7 +1973,7 @@ class TAO_Export ORBInitInfo : public virtual CORBA_Object virtual void add_client_request_interceptor ( PortableInterceptor::ClientRequestInterceptor_ptr interceptor, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -1934,7 +1983,7 @@ class TAO_Export ORBInitInfo : public virtual CORBA_Object virtual void add_server_request_interceptor ( PortableInterceptor::ServerRequestInterceptor_ptr interceptor, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -1944,7 +1993,7 @@ class TAO_Export ORBInitInfo : public virtual CORBA_Object virtual void add_ior_interceptor ( PortableInterceptor::IORInterceptor_ptr interceptor, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -1953,7 +2002,7 @@ class TAO_Export ORBInitInfo : public virtual CORBA_Object )) = 0; virtual PortableInterceptor::SlotId allocate_slot_id ( - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -1963,7 +2012,7 @@ class TAO_Export ORBInitInfo : public virtual CORBA_Object virtual void register_policy_factory ( CORBA::PolicyType type, PortableInterceptor::PolicyFactory_ptr policy_factory, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ) ACE_THROW_SPEC (( @@ -1971,11 +2020,12 @@ class TAO_Export ORBInitInfo : public virtual CORBA_Object )) = 0; virtual void *_tao_QueryInterface (ptr_arith_t type); - + virtual const char* _interface_repository_id (void) const; protected: - ORBInitInfo (void); + ORBInitInfo (); + virtual ~ORBInitInfo (void); private: ORBInitInfo (const ORBInitInfo &); @@ -1991,7 +2041,7 @@ class TAO_Export ORBInitInfo : public virtual CORBA_Object class ORBInitializer; typedef ORBInitializer *ORBInitializer_ptr; - + #endif /* end #if !defined */ @@ -2002,17 +2052,17 @@ class TAO_Export ORBInitInfo : public virtual CORBA_Object { public: ORBInitializer_var (void); // default constructor - ORBInitializer_var (ORBInitializer_ptr p) : ptr_ (p) {} + ORBInitializer_var (ORBInitializer_ptr p) : ptr_ (p) {} ORBInitializer_var (const ORBInitializer_var &); // copy constructor ~ORBInitializer_var (void); // destructor - + ORBInitializer_var &operator= (ORBInitializer_ptr); ORBInitializer_var &operator= (const ORBInitializer_var &); ORBInitializer_ptr operator-> (void) const; - + operator const ORBInitializer_ptr &() const; operator ORBInitializer_ptr &(); - // in, inout, out, _retn + // in, inout, out, _retn ORBInitializer_ptr in (void) const; ORBInitializer_ptr &inout (void); ORBInitializer_ptr &out (void); @@ -2045,7 +2095,7 @@ class TAO_Export ORBInitInfo : public virtual CORBA_Object operator ORBInitializer_ptr &(); ORBInitializer_ptr &ptr (void); ORBInitializer_ptr operator-> (void); - + private: ORBInitializer_ptr &ptr_; }; @@ -2069,12 +2119,12 @@ class TAO_Export ORBInitializer : public virtual CORBA_Object static ORBInitializer_ptr _duplicate (ORBInitializer_ptr obj); static ORBInitializer_ptr _narrow ( CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); static ORBInitializer_ptr _unchecked_narrow ( CORBA::Object_ptr obj, - CORBA::Environment &ACE_TRY_ENV = + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment () ); static ORBInitializer_ptr _nil (void) @@ -2099,11 +2149,12 @@ class TAO_Export ORBInitializer : public virtual CORBA_Object )) = 0; virtual void *_tao_QueryInterface (ptr_arith_t type); - + virtual const char* _interface_repository_id (void) const; protected: - ORBInitializer (void); + ORBInitializer (); + virtual ~ORBInitializer (void); private: ORBInitializer (const ORBInitializer &); @@ -2113,15 +2164,17 @@ class TAO_Export ORBInitializer : public virtual CORBA_Object #endif /* end #if !defined */ - /// Register an ORBInitializer with the global ORBInitializer - /// table. - TAO_NAMESPACE_STORAGE_CLASS void register_orb_initializer ( - ORBInitializer_ptr init, - CORBA::Environment & = TAO_default_environment ()); +/// Register an ORBInitializer with the global ORBInitializer +/// table. +TAO_NAMESPACE_STORAGE_CLASS void register_orb_initializer ( + ORBInitializer_ptr init, + CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ()); } TAO_NAMESPACE_CLOSE // module PortableInterceptor +// Proxy Broker Factory function pointer declarations. + TAO_Export void operator<<= (CORBA::Any &, const PortableInterceptor::ForwardRequest &); // copying version TAO_Export void operator<<= (CORBA::Any &, PortableInterceptor::ForwardRequest*); // noncopying version TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, PortableInterceptor::ForwardRequest *&); // deprecated @@ -2151,5 +2204,9 @@ TAO_Export CORBA::Boolean operator>> (TAO_InputCDR &, PortableInterceptor::Inval #pragma warning(pop) #endif /* _MSC_VER */ +#if defined (__BORLANDC__) +#pragma option pop +#endif /* __BORLANDC__ */ + #include "ace/post.h" #endif /* ifndef */ diff --git a/TAO/tao/PortableServer/ServerRequestInfo.cpp b/TAO/tao/PortableServer/ServerRequestInfo.cpp index c469667ca5c..3b1ece378ca 100644 --- a/TAO/tao/PortableServer/ServerRequestInfo.cpp +++ b/TAO/tao/PortableServer/ServerRequestInfo.cpp @@ -6,7 +6,9 @@ #include "tao/TAO_Server_Request.h" -ACE_RCSID (PortableServer, ServerRequestInfo, "$Id$") +ACE_RCSID (TAO_PortableServer, + ServerRequestInfo, + "$Id$") #if (TAO_HAS_INTERCEPTORS == 1) @@ -17,6 +19,9 @@ ACE_RCSID (PortableServer, ServerRequestInfo, "$Id$") TAO_ServerRequestInfo::TAO_ServerRequestInfo ( TAO_ServerRequest &server_request) : server_request_ (server_request), + forward_reference_ (), + poa_current_ (), + adapter_id_ (), caught_exception_ (0), reply_status_ (-1) { @@ -40,40 +45,40 @@ Dynamic::ParameterList * TAO_ServerRequestInfo::arguments (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { - // @@ Need the minor code once it becomes available. - ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (), 0); + ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (10, CORBA::COMPLETED_NO), + 0); } Dynamic::ExceptionList * TAO_ServerRequestInfo::exceptions (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { - // @@ Need the minor code once it becomes available. - ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (), 0); + ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (10, CORBA::COMPLETED_NO), + 0); } Dynamic::ContextList * TAO_ServerRequestInfo::contexts (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { - // @@ Need the minor code once it becomes available. - ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (), 0); + ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (10, CORBA::COMPLETED_NO), + 0); } Dynamic::RequestContext * TAO_ServerRequestInfo::operation_context (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { - // @@ Need the minor code once it becomes available. - ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (), 0); + ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (10, CORBA::COMPLETED_NO), + 0); } CORBA::Any * TAO_ServerRequestInfo::result (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { - // @@ Need the minor code once it becomes available. - ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (), 0); + ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (10, CORBA::COMPLETED_NO), + 0); } CORBA::Boolean @@ -91,8 +96,8 @@ TAO_ServerRequestInfo::sync_scope (CORBA::Environment &ACE_TRY_ENV) if (this->server_request_.sync_with_server ()) return Messaging::SYNC_WITH_SERVER; - // @@ Need the minor once it becomes available. - ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (), -1); + ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (10, CORBA::COMPLETED_NO), + -1); } #endif /* TAO_HAS_CORBA_MESSAGING */ @@ -102,7 +107,8 @@ TAO_ServerRequestInfo::reply_status (CORBA::Environment &ACE_TRY_ENV) { if (this->reply_status_ == -1) // A reply hasn't been received yet. - ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (), -1); + ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (10, CORBA::COMPLETED_NO), + -1); return this->reply_status_; } @@ -111,10 +117,8 @@ CORBA::Object_ptr TAO_ServerRequestInfo::forward_reference (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { - if (this->reply_status_ != PortableInterceptor::LOCATION_FORWARD - && this->reply_status_ != - PortableInterceptor::LOCATION_FORWARD_PERMANENT) - ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (), + if (this->reply_status_ != PortableInterceptor::LOCATION_FORWARD) + ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (10, CORBA::COMPLETED_NO), CORBA::Object::_nil ()); // We don't get the forward reference from the TAO_ServerRequest @@ -171,11 +175,7 @@ TAO_ServerRequestInfo::get_request_service_context ( return safe_service_context._retn (); } - ACE_THROW_RETURN (CORBA::BAD_PARAM ( - CORBA::SystemException::_tao_minor_code ( - TAO_DEFAULT_MINOR_CODE, - EINVAL), // @@ Need minor code from PI spec! - CORBA::COMPLETED_NO), + ACE_THROW_RETURN (CORBA::BAD_PARAM (23, CORBA::COMPLETED_NO), 0); } @@ -210,11 +210,7 @@ TAO_ServerRequestInfo::get_reply_service_context ( return safe_service_context._retn (); } - ACE_THROW_RETURN (CORBA::BAD_PARAM ( - CORBA::SystemException::_tao_minor_code ( - TAO_DEFAULT_MINOR_CODE, - EINVAL), // @@ Need minor code from PI spec! - CORBA::COMPLETED_NO), + ACE_THROW_RETURN (CORBA::BAD_PARAM (23, CORBA::COMPLETED_NO), 0); } @@ -229,12 +225,14 @@ TAO_ServerRequestInfo::sending_exception (CORBA::Environment &ACE_TRY_ENV) if (this->reply_status_ != PortableInterceptor::SYSTEM_EXCEPTION && this->reply_status_ != PortableInterceptor::USER_EXCEPTION) { - // @@ Need the minor code once it is available. - ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (), 0); + ACE_THROW_RETURN (CORBA::BAD_INV_ORDER (10, + CORBA::COMPLETED_NO), + 0); } - // The spec says that if it is a user exception which cant be inserted - // then the UNKNOWN exception needs to be thrown with minor code TBD_U. + // The spec says that if it is a user exception which cannot be + // inserted then the UNKNOWN exception should be thrown with minor + // code 1. CORBA::Any * temp = 0; @@ -268,11 +266,38 @@ CORBA::OctetSeq * TAO_ServerRequestInfo::object_id (CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { -// if (this->object_id_.in () == 0) -// { -// // @@ Need the minor code once it is available. -// ACE_THROW_RETURN (CORBA::NO_RESOURCES (), 0); -// } +#if 0 + if (CORBA::is_nil (this->poa_current_.in ())) + { + CORBA::Object_var p = + this->server_request_.orb_core ()->poa_current (); + + this->poa_current_ = + PortableServer::Current::_narrow (p.in (), + ACE_TRY_ENV); + ACE_CHECK_RETURN (0); + + if (CORBA::is_nil (this->poa_current_.in ())) + ACE_THROW_RETURN (CORBA::INTERNAL (), 0); + } + + ACE_TRY + { + CORBA::OctetSeq_var obj_id = + this->poa_current_->get_object_id (ACE_TRY_ENV); + ACE_TRY_CHECK; + + return obj_id._retn (); + } + ACE_CATCH (PortableServer::Current::NoContext, exc) + { + // Convert the NoContext exception to a NO_RESOURCES exception. + + ACE_THROW_RETURN (CORBA::NO_RESOURCES (1, CORBA::COMPLETED_NO), + 0); + } + ACE_ENDTRY; +#endif /* 0 */ ACE_THROW_RETURN (CORBA::NO_IMPLEMENT ( CORBA::SystemException::_tao_minor_code ( @@ -288,8 +313,9 @@ TAO_ServerRequestInfo::adapter_id (CORBA::Environment &ACE_TRY_ENV) { // if (this->adapter_id_.in () == 0) // { -// // @@ Need the minor code once it is available. -// ACE_THROW_RETURN (CORBA::NO_RESOURCES (), 0); +// ACE_THROW_RETURN (CORBA::NO_RESOURCES (1, +// CORBA::COMPLETED_NO), +// 0); // } ACE_THROW_RETURN (CORBA::NO_IMPLEMENT ( @@ -305,16 +331,20 @@ TAO_ServerRequestInfo::target_most_derived_interface ( CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { - // @@ Need the minor code once it is available. - ACE_THROW_RETURN (CORBA::NO_RESOURCES (), 0); + ACE_THROW_RETURN (CORBA::NO_RESOURCES (1, CORBA::COMPLETED_NO), 0); } CORBA::Policy_ptr TAO_ServerRequestInfo::get_server_policy (CORBA::PolicyType, - CORBA::Environment &) + CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { - return 0; + ACE_THROW_RETURN (CORBA::NO_IMPLEMENT ( + CORBA::SystemException::_tao_minor_code ( + TAO_DEFAULT_MINOR_CODE, + ENOTSUP), + CORBA::COMPLETED_NO), + CORBA::Policy::_nil ()); } void @@ -336,8 +366,7 @@ TAO_ServerRequestInfo::target_is_a (const char * /* id */, CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) { - // @@ Need the minor code once it is available. - ACE_THROW_RETURN (CORBA::NO_RESOURCES (), 0); + ACE_THROW_RETURN (CORBA::NO_RESOURCES (1, CORBA::COMPLETED_NO), 0); } void @@ -365,8 +394,7 @@ TAO_ServerRequestInfo::add_reply_service_context ( return; } else - // @@ Need the minor code once it becomes available. - ACE_THROW (CORBA::BAD_INV_ORDER ()); + ACE_THROW (CORBA::BAD_INV_ORDER (11, CORBA::COMPLETED_NO)); } } diff --git a/TAO/tao/PortableServer/ServerRequestInfo.inl b/TAO/tao/PortableServer/ServerRequestInfo.inl index 994b8529519..6f548eae3c9 100644 --- a/TAO/tao/PortableServer/ServerRequestInfo.inl +++ b/TAO/tao/PortableServer/ServerRequestInfo.inl @@ -28,12 +28,7 @@ TAO_ServerRequestInfo::forward_reference ( // Note that we're converting the ForwardRequest exception in to a // LOCATION_FORWARD reply, so we do not set the exception status. - if (exc.permanent) - this->reply_status_ = - PortableInterceptor::LOCATION_FORWARD_PERMANENT; - else - this->reply_status_ = - PortableInterceptor::LOCATION_FORWARD; + this->reply_status_ = PortableInterceptor::LOCATION_FORWARD; this->forward_reference_ = CORBA::Object::_duplicate (exc.forward.in ()); @@ -45,10 +40,6 @@ TAO_ServerRequestInfo::forward_reference (CORBA::Object_ptr obj) // We only get here if a servant manager threw a // PortableServer::ForwardRequest exception. - // LOCATION_FORWARD_PERMANENT is not supported by TAO, so assume - // that a LOCATION_FORWARD reply will be sent. - // @@ LOCATION_FORWARD_PERMANENT will apparently be dropped from - // future GIOP specifications. this->reply_status_ = PortableInterceptor::LOCATION_FORWARD; this->forward_reference_ = CORBA::Object::_duplicate (obj); diff --git a/TAO/tao/StringSeq.pidl b/TAO/tao/StringSeq.pidl index 307361ea0c6..951e67e7ac2 100644 --- a/TAO/tao/StringSeq.pidl +++ b/TAO/tao/StringSeq.pidl @@ -8,11 +8,11 @@ // The command used to generate code is: // // tao_idl -// -Ge 1 \ -// -Wb,export_macro=TAO_Export \ -// -Wb,export_include="tao/corbafwd.h" \ -// -Wb,pre_include="ace/pre.h" \ -// -Wb,post_include="ace/post.h" \ +// -Ge 1 +// -Wb,export_macro=TAO_Export +// -Wb,export_include="corbafwd.h" +// -Wb,pre_include="ace/pre.h" +// -Wb,post_include="ace/post.h" // StringSeq.pidl // // Patches for changes to the generated code are available in the @@ -20,14 +20,17 @@ // ================================================================ -#ifndef TAO_STRING_SEQ_IDL -#define TAO_STRING_SEQ_IDL +#ifndef TAO_CORBA_STRING_SEQ_IDL +#define TAO_CORBA_STRING_SEQ_IDL #pragma prefix "omg.org" -typedef sequence<string> StringSeq; -typedef sequence<wstring> WStringSeq; +module CORBA +{ + typedef sequence<string> StringSeq; + typedef sequence<wstring> WStringSeq; +}; #pragma prefix "" -#endif /* TAO_STRING_SEQ_IDL */ +#endif /* TAO_CORBA_STRING_SEQ_IDL */ diff --git a/TAO/tao/StringSeqC.cpp b/TAO/tao/StringSeqC.cpp index 9f9574831ab..7ccbde43cb7 100644 --- a/TAO/tao/StringSeqC.cpp +++ b/TAO/tao/StringSeqC.cpp @@ -29,13 +29,15 @@ #include "StringSeqC.i" #endif /* !defined INLINE */ -#include "tao/Any.h" +#include "Any.h" +#include "CDR.h" +#include "TypeCode.h" -#if !defined (TAO_STRINGSEQ_CS) -#define TAO_STRINGSEQ_CS +#if !defined (_CORBA_STRINGSEQ_CS_) +#define _CORBA_STRINGSEQ_CS_ // ************************************************************* -// CORBA_StringSeq +// CORBA::StringSeq // ************************************************************* CORBA_StringSeq::CORBA_StringSeq (void) @@ -81,8 +83,8 @@ void CORBA_StringSeq::_tao_any_destructor (void *x) static const CORBA::Long _oc_CORBA_StringSeq[] = { TAO_ENCAP_BYTE_ORDER, // byte order - 18, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x53747269), ACE_NTOHL (0x6e675365), ACE_NTOHL (0x713a312e), ACE_NTOHL (0x30000000), // repository ID = IDL:CORBA_StringSeq:1.0 - 10, ACE_NTOHL (0x53747269), ACE_NTOHL (0x6e675365), ACE_NTOHL (0x71000000), // name = CORBA_StringSeq + 32, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x434f5242), ACE_NTOHL (0x412f5374), ACE_NTOHL (0x72696e67), ACE_NTOHL (0x5365713a), ACE_NTOHL (0x312e3000), // repository ID = IDL:omg.org/CORBA/StringSeq:1.0 + 10, ACE_NTOHL (0x53747269), ACE_NTOHL (0x6e675365), ACE_NTOHL (0x71000000), // name = StringSeq CORBA::tk_sequence, // typecode kind 16, // encapsulation length TAO_ENCAP_BYTE_ORDER, // byte order @@ -95,11 +97,11 @@ static CORBA::TypeCode _tc_TAO_tc_CORBA_StringSeq (CORBA::tk_alias, sizeof (_oc_ CORBA::TypeCode_ptr _tc_CORBA_StringSeq = &_tc_TAO_tc_CORBA_StringSeq; -#if !defined (TAO_WSTRINGSEQ_CS) -#define TAO_WSTRINGSEQ_CS +#if !defined (_CORBA_WSTRINGSEQ_CS_) +#define _CORBA_WSTRINGSEQ_CS_ // ************************************************************* -// CORBA_WStringSeq +// CORBA::WStringSeq // ************************************************************* CORBA_WStringSeq::CORBA_WStringSeq (void) @@ -145,8 +147,8 @@ void CORBA_WStringSeq::_tao_any_destructor (void *x) static const CORBA::Long _oc_CORBA_WStringSeq[] = { TAO_ENCAP_BYTE_ORDER, // byte order - 19, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x57537472), ACE_NTOHL (0x696e6753), ACE_NTOHL (0x65713a31), ACE_NTOHL (0x2e300000), // repository ID = IDL:CORBA_WStringSeq:1.0 - 11, ACE_NTOHL (0x57537472), ACE_NTOHL (0x696e6753), ACE_NTOHL (0x65710000), // name = CORBA_WStringSeq + 33, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x434f5242), ACE_NTOHL (0x412f5753), ACE_NTOHL (0x7472696e), ACE_NTOHL (0x67536571), ACE_NTOHL (0x3a312e30), ACE_NTOHL (0x0), // repository ID = IDL:omg.org/CORBA/WStringSeq:1.0 + 11, ACE_NTOHL (0x57537472), ACE_NTOHL (0x696e6753), ACE_NTOHL (0x65710000), // name = WStringSeq CORBA::tk_sequence, // typecode kind 16, // encapsulation length TAO_ENCAP_BYTE_ORDER, // byte order @@ -157,7 +159,6 @@ static const CORBA::Long _oc_CORBA_WStringSeq[] = }; static CORBA::TypeCode _tc_TAO_tc_CORBA_WStringSeq (CORBA::tk_alias, sizeof (_oc_CORBA_WStringSeq), (char *) &_oc_CORBA_WStringSeq, 0, sizeof (CORBA_WStringSeq)); CORBA::TypeCode_ptr _tc_CORBA_WStringSeq = &_tc_TAO_tc_CORBA_WStringSeq; - void operator<<= ( CORBA::Any &_tao_any, const CORBA_StringSeq &_tao_elem diff --git a/TAO/tao/StringSeqC.h b/TAO/tao/StringSeqC.h index bab0046e7a5..7526afa8523 100644 --- a/TAO/tao/StringSeqC.h +++ b/TAO/tao/StringSeqC.h @@ -19,18 +19,18 @@ // Information about TAO is available at: // http://www.cs.wustl.edu/~schmidt/TAO.html -#ifndef TAO_IDL_STRINGSEQC_H -#define TAO_IDL_STRINGSEQC_H +#ifndef _TAO_IDL_CORBA_STRINGSEQC_H_ +#define _TAO_IDL_CORBA_STRINGSEQC_H_ #include "ace/pre.h" -#include "tao/corbafwd.h" +#include "corbafwd.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#include "tao/Sequence.h" +#include "Sequence.h" #if defined (TAO_EXPORT_MACRO) #undef TAO_EXPORT_MACRO @@ -55,223 +55,225 @@ #pragma option push -w-rvl -w-rch -w-ccc -w-inl #endif /* __BORLANDC__ */ - -#if !defined (TAO_STRINGSEQ_CH) -#define TAO_STRINGSEQ_CH - -class CORBA_StringSeq; -class CORBA_StringSeq_var; - -// ************************************************************* -// CORBA_StringSeq -// ************************************************************* - -class TAO_Export CORBA_StringSeq : public +#if !defined (_CORBA_STRINGSEQ_CH_) +#define _CORBA_STRINGSEQ_CH_ + + class CORBA_StringSeq; + class CORBA_StringSeq_var; + + // ************************************************************* + // CORBA::StringSeq + // ************************************************************* + + class TAO_Export CORBA_StringSeq : public #if !defined (TAO_USE_SEQUENCE_TEMPLATES) - TAO_Unbounded_String_Sequence + TAO_Unbounded_String_Sequence #else /* TAO_USE_SEQUENCE_TEMPLATES */ - TAO_Unbounded_String_Sequence -#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ -{ -public: - CORBA_StringSeq (void); // default ctor - CORBA_StringSeq (CORBA::ULong max); // uses max size - CORBA_StringSeq ( - CORBA::ULong max, - CORBA::ULong length, - char * *buffer, - CORBA::Boolean release = 0 - ); - CORBA_StringSeq (const CORBA_StringSeq &); // copy ctor - ~CORBA_StringSeq (void); - static void _tao_any_destructor (void*); + TAO_Unbounded_String_Sequence +#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ + { + public: + CORBA_StringSeq (void); // default ctor + CORBA_StringSeq (CORBA::ULong max); // uses max size + CORBA_StringSeq ( + CORBA::ULong max, + CORBA::ULong length, + char * *buffer, + CORBA::Boolean release = 0 + ); + CORBA_StringSeq (const CORBA_StringSeq &); // copy ctor + ~CORBA_StringSeq (void); + static void _tao_any_destructor (void*); #if !defined(__GNUC__) || !defined (ACE_HAS_GNUG_PRE_2_8) - typedef CORBA_StringSeq_var _var_type; + typedef CORBA_StringSeq_var _var_type; #endif /* ! __GNUC__ || g++ >= 2.8 */ -}; - + }; + #endif /* end #if !defined */ -#if !defined (TAO_STRINGSEQ___VAR_CH) -#define TAO_STRINGSEQ___VAR_CH - -// ************************************************************* -// class CORBA_StringSeq_var -// ************************************************************* - -class TAO_Export CORBA_StringSeq_var -{ -public: - CORBA_StringSeq_var (void); // default constructor - CORBA_StringSeq_var (CORBA_StringSeq *); - CORBA_StringSeq_var (const CORBA_StringSeq_var &); // copy constructor - ~CORBA_StringSeq_var (void); // destructor - - CORBA_StringSeq_var &operator= (CORBA_StringSeq *); - CORBA_StringSeq_var &operator= (const CORBA_StringSeq_var &); - CORBA_StringSeq *operator-> (void); - const CORBA_StringSeq *operator-> (void) const; - - operator const CORBA_StringSeq &() const; - operator CORBA_StringSeq &(); - operator CORBA_StringSeq &() const; - operator CORBA_StringSeq *&(); // variable-size base types only - - TAO_SeqElem_String_Manager operator[] (CORBA::ULong index); - - // in, inout, out, _retn - const CORBA_StringSeq &in (void) const; - CORBA_StringSeq &inout (void); - CORBA_StringSeq *&out (void); - CORBA_StringSeq *_retn (void); - CORBA_StringSeq *ptr (void) const; - -private: - CORBA_StringSeq *ptr_; -}; +#if !defined (_CORBA_STRINGSEQ___VAR_CH_) +#define _CORBA_STRINGSEQ___VAR_CH_ + + // ************************************************************* + // class CORBA::StringSeq_var + // ************************************************************* + + class TAO_Export CORBA_StringSeq_var + { + public: + CORBA_StringSeq_var (void); // default constructor + CORBA_StringSeq_var (CORBA_StringSeq *); + CORBA_StringSeq_var (const CORBA_StringSeq_var &); // copy constructor + ~CORBA_StringSeq_var (void); // destructor + + CORBA_StringSeq_var &operator= (CORBA_StringSeq *); + CORBA_StringSeq_var &operator= (const CORBA_StringSeq_var &); + CORBA_StringSeq *operator-> (void); + const CORBA_StringSeq *operator-> (void) const; + + operator const CORBA_StringSeq &() const; + operator CORBA_StringSeq &(); + operator CORBA_StringSeq &() const; + operator CORBA_StringSeq *&(); // variable-size base types only + + TAO_SeqElem_String_Manager operator[] (CORBA::ULong index); + + // in, inout, out, _retn + const CORBA_StringSeq &in (void) const; + CORBA_StringSeq &inout (void); + CORBA_StringSeq *&out (void); + CORBA_StringSeq *_retn (void); + CORBA_StringSeq *ptr (void) const; + + private: + CORBA_StringSeq *ptr_; + }; #endif /* end #if !defined */ -#if !defined (TAO_STRINGSEQ___OUT_CH) -#define TAO_STRINGSEQ___OUT_CH - -class TAO_Export CORBA_StringSeq_out -{ -public: - CORBA_StringSeq_out (CORBA_StringSeq *&); - CORBA_StringSeq_out (CORBA_StringSeq_var &); - CORBA_StringSeq_out (const CORBA_StringSeq_out &); - CORBA_StringSeq_out &operator= (const CORBA_StringSeq_out &); - CORBA_StringSeq_out &operator= (CORBA_StringSeq *); - operator CORBA_StringSeq *&(); - CORBA_StringSeq *&ptr (void); - CORBA_StringSeq *operator-> (void); - TAO_SeqElem_String_Manager operator[] (CORBA::ULong index); - -private: - CORBA_StringSeq *&ptr_; - // assignment from T_var not allowed - void operator= (const CORBA_StringSeq_var &); -}; +#if !defined (_CORBA_STRINGSEQ___OUT_CH_) +#define _CORBA_STRINGSEQ___OUT_CH_ + + class TAO_Export CORBA_StringSeq_out + { + public: + CORBA_StringSeq_out (CORBA_StringSeq *&); + CORBA_StringSeq_out (CORBA_StringSeq_var &); + CORBA_StringSeq_out (const CORBA_StringSeq_out &); + CORBA_StringSeq_out &operator= (const CORBA_StringSeq_out &); + CORBA_StringSeq_out &operator= (CORBA_StringSeq *); + operator CORBA_StringSeq *&(); + CORBA_StringSeq *&ptr (void); + CORBA_StringSeq *operator-> (void); + TAO_SeqElem_String_Manager operator[] (CORBA::ULong index); + + private: + CORBA_StringSeq *&ptr_; + // assignment from T_var not allowed + void operator= (const CORBA_StringSeq_var &); + }; #endif /* end #if !defined */ -extern TAO_Export CORBA::TypeCode_ptr _tc_CORBA_StringSeq; - + TAO_NAMESPACE_STORAGE_CLASS CORBA::TypeCode_ptr _tc_CORBA_StringSeq; -#if !defined (TAO_WSTRINGSEQ_CH) -#define TAO_WSTRINGSEQ_CH -class CORBA_WStringSeq; -class CORBA_WStringSeq_var; +#if !defined (_CORBA_WSTRINGSEQ_CH_) +#define _CORBA_WSTRINGSEQ_CH_ -// ************************************************************* -// CORBA_WStringSeq -// ************************************************************* - -class TAO_Export CORBA_WStringSeq : public + class CORBA_WStringSeq; + class CORBA_WStringSeq_var; + + // ************************************************************* + // CORBA::WStringSeq + // ************************************************************* + + class TAO_Export CORBA_WStringSeq : public #if !defined (TAO_USE_SEQUENCE_TEMPLATES) - TAO_Unbounded_WString_Sequence + TAO_Unbounded_WString_Sequence #else /* TAO_USE_SEQUENCE_TEMPLATES */ - TAO_Unbounded_WString_Sequence -#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ -{ -public: - CORBA_WStringSeq (void); // default ctor - CORBA_WStringSeq (CORBA::ULong max); // uses max size - CORBA_WStringSeq ( - CORBA::ULong max, - CORBA::ULong length, - CORBA::WChar * *buffer, - CORBA::Boolean release = 0 - ); - CORBA_WStringSeq (const CORBA_WStringSeq &); // copy ctor - ~CORBA_WStringSeq (void); - static void _tao_any_destructor (void*); + TAO_Unbounded_WString_Sequence +#endif /* !TAO_USE_SEQUENCE_TEMPLATES */ + { + public: + CORBA_WStringSeq (void); // default ctor + CORBA_WStringSeq (CORBA::ULong max); // uses max size + CORBA_WStringSeq ( + CORBA::ULong max, + CORBA::ULong length, + CORBA::WChar * *buffer, + CORBA::Boolean release = 0 + ); + CORBA_WStringSeq (const CORBA_WStringSeq &); // copy ctor + ~CORBA_WStringSeq (void); + static void _tao_any_destructor (void*); #if !defined(__GNUC__) || !defined (ACE_HAS_GNUG_PRE_2_8) - typedef CORBA_WStringSeq_var _var_type; + typedef CORBA_WStringSeq_var _var_type; #endif /* ! __GNUC__ || g++ >= 2.8 */ -}; - + }; + #endif /* end #if !defined */ -#if !defined (TAO_WSTRINGSEQ___VAR_CH) -#define TAO_WSTRINGSEQ___VAR_CH - -// ************************************************************* -// class CORBA_WStringSeq_var -// ************************************************************* - -class TAO_Export CORBA_WStringSeq_var -{ -public: - CORBA_WStringSeq_var (void); // default constructor - CORBA_WStringSeq_var (CORBA_WStringSeq *); - CORBA_WStringSeq_var (const CORBA_WStringSeq_var &); // copy constructor - ~CORBA_WStringSeq_var (void); // destructor - - CORBA_WStringSeq_var &operator= (CORBA_WStringSeq *); - CORBA_WStringSeq_var &operator= (const CORBA_WStringSeq_var &); - CORBA_WStringSeq *operator-> (void); - const CORBA_WStringSeq *operator-> (void) const; - - operator const CORBA_WStringSeq &() const; - operator CORBA_WStringSeq &(); - operator CORBA_WStringSeq &() const; - operator CORBA_WStringSeq *&(); // variable-size base types only - - TAO_SeqElem_WString_Manager operator[] (CORBA::ULong index); - - // in, inout, out, _retn - const CORBA_WStringSeq &in (void) const; - CORBA_WStringSeq &inout (void); - CORBA_WStringSeq *&out (void); - CORBA_WStringSeq *_retn (void); - CORBA_WStringSeq *ptr (void) const; - -private: - CORBA_WStringSeq *ptr_; -}; +#if !defined (_CORBA_WSTRINGSEQ___VAR_CH_) +#define _CORBA_WSTRINGSEQ___VAR_CH_ + + // ************************************************************* + // class CORBA_WStringSeq_var + // ************************************************************* + + class TAO_Export CORBA_WStringSeq_var + { + public: + CORBA_WStringSeq_var (void); // default constructor + CORBA_WStringSeq_var (CORBA_WStringSeq *); + CORBA_WStringSeq_var (const CORBA_WStringSeq_var &); // copy constructor + ~CORBA_WStringSeq_var (void); // destructor + + CORBA_WStringSeq_var &operator= (CORBA_WStringSeq *); + CORBA_WStringSeq_var &operator= (const CORBA_WStringSeq_var &); + CORBA_WStringSeq *operator-> (void); + const CORBA_WStringSeq *operator-> (void) const; + + operator const CORBA_WStringSeq &() const; + operator CORBA_WStringSeq &(); + operator CORBA_WStringSeq &() const; + operator CORBA_WStringSeq *&(); // variable-size base types only + + TAO_SeqElem_WString_Manager operator[] (CORBA::ULong index); + + // in, inout, out, _retn + const CORBA_WStringSeq &in (void) const; + CORBA_WStringSeq &inout (void); + CORBA_WStringSeq *&out (void); + CORBA_WStringSeq *_retn (void); + CORBA_WStringSeq *ptr (void) const; + + private: + CORBA_WStringSeq *ptr_; + }; #endif /* end #if !defined */ -#if !defined (TAO_WSTRINGSEQ___OUT_CH) -#define TAO_WSTRINGSEQ___OUT_CH +#if !defined (_CORBA_WSTRINGSEQ___OUT_CH_) +#define _CORBA_WSTRINGSEQ___OUT_CH_ + + class TAO_Export CORBA_WStringSeq_out + { + public: + CORBA_WStringSeq_out (CORBA_WStringSeq *&); + CORBA_WStringSeq_out (CORBA_WStringSeq_var &); + CORBA_WStringSeq_out (const CORBA_WStringSeq_out &); + CORBA_WStringSeq_out &operator= (const CORBA_WStringSeq_out &); + CORBA_WStringSeq_out &operator= (CORBA_WStringSeq *); + operator CORBA_WStringSeq *&(); + CORBA_WStringSeq *&ptr (void); + CORBA_WStringSeq *operator-> (void); + TAO_SeqElem_WString_Manager operator[] (CORBA::ULong index); + + private: + CORBA_WStringSeq *&ptr_; + // assignment from T_var not allowed + void operator= (const CORBA_WStringSeq_var &); + }; -class TAO_Export CORBA_WStringSeq_out -{ -public: - CORBA_WStringSeq_out (CORBA_WStringSeq *&); - CORBA_WStringSeq_out (CORBA_WStringSeq_var &); - CORBA_WStringSeq_out (const CORBA_WStringSeq_out &); - CORBA_WStringSeq_out &operator= (const CORBA_WStringSeq_out &); - CORBA_WStringSeq_out &operator= (CORBA_WStringSeq *); - operator CORBA_WStringSeq *&(); - CORBA_WStringSeq *&ptr (void); - CORBA_WStringSeq *operator-> (void); - TAO_SeqElem_WString_Manager operator[] (CORBA::ULong index); -private: - CORBA_WStringSeq *&ptr_; - // assignment from T_var not allowed - void operator= (const CORBA_WStringSeq_var &); -}; +#endif /* end #if !defined */ + TAO_NAMESPACE_STORAGE_CLASS CORBA::TypeCode_ptr _tc_CORBA_WStringSeq; -#endif /* end #if !defined */ -extern TAO_Export CORBA::TypeCode_ptr _tc_CORBA_WStringSeq; +// Proxy Broker Factory function pointer declarations. TAO_Export void operator<<= (CORBA::Any &, const CORBA_StringSeq &); // copying version TAO_Export void operator<<= (CORBA::Any &, CORBA_StringSeq*); // noncopying version @@ -285,8 +287,8 @@ TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const CORBA_WStringSe #ifndef __ACE_INLINE__ -#if !defined TAO_TAO_CDR_OP_CORBA_StringSeq_H -#define TAO_TAO_CDR_OP_CORBA_StringSeq_H +#if !defined _TAO_CDR_OP_CORBA_StringSeq_H_ +#define _TAO_CDR_OP_CORBA_StringSeq_H_ TAO_Export CORBA::Boolean operator<< ( TAO_OutputCDR &, @@ -297,11 +299,11 @@ TAO_Export CORBA::Boolean operator>> ( CORBA_StringSeq & ); -#endif /* TAO_TAO_CDR_OP_CORBA_StringSeq_H */ +#endif /* _TAO_CDR_OP_CORBA_StringSeq_H_ */ -#if !defined TAO_TAO_CDR_OP_CORBA_WStringSeq_H -#define TAO_TAO_CDR_OP_CORBA_WStringSeq_H +#if !defined _TAO_CDR_OP_CORBA_WStringSeq_H_ +#define _TAO_CDR_OP_CORBA_WStringSeq_H_ TAO_Export CORBA::Boolean operator<< ( TAO_OutputCDR &, @@ -312,7 +314,7 @@ TAO_Export CORBA::Boolean operator>> ( CORBA_WStringSeq & ); -#endif /* TAO_TAO_CDR_OP_CORBA_WStringSeq_H */ +#endif /* _TAO_CDR_OP_CORBA_WStringSeq_H_ */ #endif /* __ACE_INLINE__ */ diff --git a/TAO/tao/StringSeqC.i b/TAO/tao/StringSeqC.i index 3a98b4454fe..ea871fc4a05 100644 --- a/TAO/tao/StringSeqC.i +++ b/TAO/tao/StringSeqC.i @@ -20,11 +20,11 @@ // http://www.cs.wustl.edu/~schmidt/TAO.html -#if !defined (TAO_STRINGSEQ_CI) -#define TAO_STRINGSEQ_CI +#if !defined (_CORBA_STRINGSEQ_CI_) +#define _CORBA_STRINGSEQ_CI_ // ************************************************************* -// Inline operations for class CORBA_StringSeq_var +// Inline operations for class CORBA::StringSeq_var // ************************************************************* ACE_INLINE @@ -60,8 +60,8 @@ CORBA_StringSeq_var::operator= (CORBA_StringSeq *p) return *this; } -ACE_INLINE CORBA_StringSeq_var & -CORBA_StringSeq_var::operator= (const ::CORBA_StringSeq_var &p) // deep copy +ACE_INLINE ::CORBA_StringSeq_var & +CORBA_StringSeq_var::operator= (const ::CORBA_StringSeq_var &p) { if (this != &p) { @@ -72,7 +72,7 @@ CORBA_StringSeq_var::operator= (const ::CORBA_StringSeq_var &p) // deep copy } else { - CORBA_StringSeq *deep_copy = + CORBA_StringSeq *deep_copy = new CORBA_StringSeq (*p.ptr_); if (deep_copy != 0) @@ -167,7 +167,7 @@ CORBA_StringSeq_var::ptr (void) const } // ************************************************************* -// Inline operations for class CORBA_StringSeq_out +// Inline operations for class CORBA::StringSeq_out // ************************************************************* ACE_INLINE @@ -232,11 +232,11 @@ CORBA_StringSeq_out::operator[] (CORBA::ULong index) #endif /* end #if !defined */ -#if !defined (TAO_WSTRINGSEQ_CI) -#define TAO_WSTRINGSEQ_CI +#if !defined (_CORBA_WSTRINGSEQ_CI_) +#define _CORBA_WSTRINGSEQ_CI_ // ************************************************************* -// Inline operations for class CORBA_WStringSeq_var +// Inline operations for class CORBA::WStringSeq_var // ************************************************************* ACE_INLINE @@ -272,14 +272,31 @@ CORBA_WStringSeq_var::operator= (CORBA_WStringSeq *p) return *this; } -ACE_INLINE CORBA_WStringSeq_var & -CORBA_WStringSeq_var::operator= (const ::CORBA_WStringSeq_var &p) // deep copy +ACE_INLINE ::CORBA_WStringSeq_var & +CORBA_WStringSeq_var::operator= (const ::CORBA_WStringSeq_var &p) { if (this != &p) - { - delete this->ptr_; - ACE_NEW_RETURN (this->ptr_, ::CORBA_WStringSeq (*p.ptr_), *this); - } + { + if (p.ptr_ == 0) + { + delete this->ptr_; + this->ptr_ = 0; + } + else + { + CORBA_WStringSeq *deep_copy = + new CORBA_WStringSeq (*p.ptr_); + + if (deep_copy != 0) + { + CORBA_WStringSeq *tmp = deep_copy; + deep_copy = this->ptr_; + this->ptr_ = tmp; + delete deep_copy; + } + } + } + return *this; } @@ -362,7 +379,7 @@ CORBA_WStringSeq_var::ptr (void) const } // ************************************************************* -// Inline operations for class CORBA_WStringSeq_out +// Inline operations for class CORBA::WStringSeq_out // ************************************************************* ACE_INLINE @@ -427,23 +444,23 @@ CORBA_WStringSeq_out::operator[] (CORBA::ULong index) #endif /* end #if !defined */ -#if !defined TAO_TAO_CDR_OP_CORBA_StringSeq_I -#define TAO_TAO_CDR_OP_CORBA_StringSeq_I +#if !defined _TAO_CDR_OP_CORBA_StringSeq_I_ +#define _TAO_CDR_OP_CORBA_StringSeq_I_ CORBA::Boolean TAO_Export operator<< ( TAO_OutputCDR &, - const CORBA_StringSeq & + const CORBA::StringSeq & ); CORBA::Boolean TAO_Export operator>> ( TAO_InputCDR &, - CORBA_StringSeq & + CORBA::StringSeq & ); -#endif /* TAO_TAO_CDR_OP_CORBA_StringSeq_I */ +#endif /* _TAO_CDR_OP_CORBA_StringSeq_I_ */ -#if !defined TAO_TAO_CDR_OP_CORBA_WStringSeq_I -#define TAO_TAO_CDR_OP_CORBA_WStringSeq_I +#if !defined _TAO_CDR_OP_CORBA_WStringSeq_I_ +#define _TAO_CDR_OP_CORBA_WStringSeq_I_ CORBA::Boolean TAO_Export operator<< ( TAO_OutputCDR &, @@ -454,5 +471,5 @@ CORBA::Boolean TAO_Export operator>> ( CORBA_WStringSeq & ); -#endif /* TAO_TAO_CDR_OP_CORBA_WStringSeq_I */ +#endif /* _TAO_CDR_OP_CORBA_WStringSeq_I_ */ diff --git a/TAO/tao/TAO.dsp b/TAO/tao/TAO.dsp index 520fed3b38f..9ca60d61885 100644 --- a/TAO/tao/TAO.dsp +++ b/TAO/tao/TAO.dsp @@ -235,6 +235,10 @@ SOURCE=.\CDR.cpp # End Source File
# Begin Source File
+SOURCE=.\CDR_Encaps_Codec.cpp
+# End Source File
+# Begin Source File
+
SOURCE=.\Cleanup_Func_Registry.cpp
# End Source File
# Begin Source File
@@ -251,6 +255,14 @@ SOURCE=.\ClientRequestInfo.cpp # End Source File
# Begin Source File
+SOURCE=.\CodecFactory.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\CodecFactory_ORBInitializer.cpp
+# End Source File
+# Begin Source File
+
SOURCE=.\Connection_Cache_Manager.cpp
# End Source File
# Begin Source File
@@ -959,6 +971,10 @@ SOURCE=.\cdr.h # End Source File
# Begin Source File
+SOURCE=.\CDR_Encaps_Codec.h
+# End Source File
+# Begin Source File
+
SOURCE=.\Cleanup_Func_Registry.h
# End Source File
# Begin Source File
@@ -979,6 +995,14 @@ SOURCE=.\ClientRequestInfo.h # End Source File
# Begin Source File
+SOURCE=.\CodecFactory.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\CodecFactory_ORBInitializer.h
+# End Source File
+# Begin Source File
+
SOURCE=.\Connection_Cache_Manager.h
# End Source File
# Begin Source File
diff --git a/TAO/tao/TAO_Static.dsp b/TAO/tao/TAO_Static.dsp index 2f8c1a7e6ee..5bb11f1b103 100644 --- a/TAO/tao/TAO_Static.dsp +++ b/TAO/tao/TAO_Static.dsp @@ -167,6 +167,10 @@ SOURCE=.\cdr.h # End Source File
# Begin Source File
+SOURCE=.\CDR_Encaps_Codec.h
+# End Source File
+# Begin Source File
+
SOURCE=.\Cleanup_Func_Registry.h
# End Source File
# Begin Source File
@@ -183,6 +187,14 @@ SOURCE=.\ClientRequestInfo.h # End Source File
# Begin Source File
+SOURCE=.\CodecFactory.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\CodecFactory_ORBInitializer.h
+# End Source File
+# Begin Source File
+
SOURCE=.\Connection_Cache_Manager.h
# End Source File
# Begin Source File
@@ -1551,6 +1563,10 @@ SOURCE=.\CDR.cpp # End Source File
# Begin Source File
+SOURCE=.\CDR_Encaps_Codec.cpp
+# End Source File
+# Begin Source File
+
SOURCE=.\Cleanup_Func_Registry.cpp
# End Source File
# Begin Source File
@@ -1567,6 +1583,14 @@ SOURCE=.\ClientRequestInfo.cpp # End Source File
# Begin Source File
+SOURCE=.\CodecFactory.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\CodecFactory_ORBInitializer.cpp
+# End Source File
+# Begin Source File
+
SOURCE=.\Connection_Cache_Manager.cpp
# End Source File
# Begin Source File
diff --git a/TAO/tao/diffs/OctetSeq.diff b/TAO/tao/diffs/OctetSeq.diff index 82a2ec88e9d..88fd4f3df72 100644 --- a/TAO/tao/diffs/OctetSeq.diff +++ b/TAO/tao/diffs/OctetSeq.diff @@ -1,180 +1,193 @@ ---- OctetSeqC.h.old Sun Oct 22 22:28:28 2000 -+++ OctetSeqC.h Sun Oct 22 22:29:06 2000 -@@ -23,13 +23,14 @@ - #define _TAO_IDL_OCTETSEQC_H_ +--- OctetSeqC.h.old Fri Feb 23 22:46:34 2001 ++++ OctetSeqC.h Fri Feb 23 22:50:56 2001 +@@ -19,17 +19,17 @@ + // Information about TAO is available at: + // http://www.cs.wustl.edu/~schmidt/TAO.html + +-#ifndef _TAO_IDL_OCTETSEQC_H_ +-#define _TAO_IDL_OCTETSEQC_H_ ++#ifndef _TAO_IDL_CORBA_OCTETSEQC_H_ ++#define _TAO_IDL_CORBA_OCTETSEQC_H_ #include "ace/pre.h" -#include "tao/corba.h" -+ -+#include "tao/corbafwd.h" ++#include "corbafwd.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ --#include "tao/corbafwd.h" -+#include "tao/Sequence.h" +-#include "corbafwd.h" ++#include "Sequence.h" #if defined (TAO_EXPORT_MACRO) #undef TAO_EXPORT_MACRO -@@ -54,14 +55,14 @@ - #if !defined (_OCTETSEQ_CH_) - #define _OCTETSEQ_CH_ - --class OctetSeq; --class OctetSeq_var; -+class CORBA_OctetSeq; -+class CORBA_OctetSeq_var; - - // ************************************************************* --// OctetSeq -+// CORBA_OctetSeq - // ************************************************************* - --class TAO_Export OctetSeq : public -+class TAO_Export CORBA_OctetSeq : public +@@ -54,20 +54,17 @@ + #pragma option push -w-rvl -w-rch -w-ccc -w-inl + #endif /* __BORLANDC__ */ + +-TAO_NAMESPACE CORBA +-{ +- + #if !defined (_CORBA_OCTETSEQ_CH_) + #define _CORBA_OCTETSEQ_CH_ + +- class OctetSeq; +- class OctetSeq_var; ++ class CORBA_OctetSeq; ++ class CORBA_OctetSeq_var; + + // ************************************************************* +- // OctetSeq ++ // CORBA::OctetSeq + // ************************************************************* + +- class TAO_Export OctetSeq : public ++ class TAO_Export CORBA_OctetSeq : public #if !defined (TAO_USE_SEQUENCE_TEMPLATES) - TAO_Unbounded_Sequence<CORBA::Octet> + TAO_Unbounded_Sequence<CORBA::Octet> #else /* TAO_USE_SEQUENCE_TEMPLATES */ -@@ -69,25 +70,25 @@ +@@ -75,25 +72,25 @@ #endif /* !TAO_USE_SEQUENCE_TEMPLATES */ - { - public: -- OctetSeq (void); // default ctor -- OctetSeq (CORBA::ULong max); // uses max size -- OctetSeq ( -+ CORBA_OctetSeq (void); // default ctor -+ CORBA_OctetSeq (CORBA::ULong max); // uses max size -+ CORBA_OctetSeq ( - CORBA::ULong max, - CORBA::ULong length, - CORBA::Octet *buffer, - CORBA::Boolean release = 0 - ); -- OctetSeq (const OctetSeq &); // copy ctor -- ~OctetSeq (void); -+ CORBA_OctetSeq (const CORBA_OctetSeq &); // copy ctor -+ ~CORBA_OctetSeq (void); - static void _tao_any_destructor (void*); + { + public: +- OctetSeq (void); // default ctor +- OctetSeq (CORBA::ULong max); // uses max size +- OctetSeq ( ++ CORBA_OctetSeq (void); // default ctor ++ CORBA_OctetSeq (CORBA::ULong max); // uses max size ++ CORBA_OctetSeq ( + CORBA::ULong max, + CORBA::ULong length, + CORBA::Octet *buffer, + CORBA::Boolean release = 0 + ); +- OctetSeq (const OctetSeq &); // copy ctor +- ~OctetSeq (void); ++ CORBA_OctetSeq (const CORBA_OctetSeq &); // copy ctor ++ ~CORBA_OctetSeq (void); + static void _tao_any_destructor (void*); #if !defined(__GNUC__) || !defined (ACE_HAS_GNUG_PRE_2_8) -- typedef OctetSeq_var _var_type; -+ typedef CORBA_OctetSeq_var _var_type; +- typedef OctetSeq_var _var_type; ++ typedef CORBA_OctetSeq_var _var_type; #endif /* ! __GNUC__ || g++ >= 2.8 */ #if (TAO_NO_COPY_OCTET_SEQUENCES == 1) -- OctetSeq ( -+ CORBA_OctetSeq ( - CORBA::ULong length, - const ACE_Message_Block* mb - ) -@@ -103,40 +104,40 @@ - #define _OCTETSEQ___VAR_CH_ - - // ************************************************************* --// class OctetSeq_var -+// class CORBA_OctetSeq_var - // ************************************************************* - --class TAO_Export OctetSeq_var -+class TAO_Export CORBA_OctetSeq_var - { - public: -- OctetSeq_var (void); // default constructor -- OctetSeq_var (OctetSeq *); -- OctetSeq_var (const OctetSeq_var &); // copy constructor -- OctetSeq_var (const OctetSeq &); // fixed-size base types only -- ~OctetSeq_var (void); // destructor -+ CORBA_OctetSeq_var (void); // default constructor -+ CORBA_OctetSeq_var (CORBA_OctetSeq *); -+ CORBA_OctetSeq_var (const CORBA_OctetSeq_var &); // copy constructor -+ CORBA_OctetSeq_var (const CORBA_OctetSeq &); // fixed-size base types only -+ ~CORBA_OctetSeq_var (void); // destructor - -- OctetSeq_var &operator= (OctetSeq *); -- OctetSeq_var &operator= (const OctetSeq_var &); -- OctetSeq_var &operator= (const OctetSeq &); // fixed-size base types only -- OctetSeq *operator-> (void); -- const OctetSeq *operator-> (void) const; -+ CORBA_OctetSeq_var &operator= (CORBA_OctetSeq *); -+ CORBA_OctetSeq_var &operator= (const CORBA_OctetSeq_var &); -+ CORBA_OctetSeq_var &operator= (const CORBA_OctetSeq &); // fixed-size base types only -+ CORBA_OctetSeq *operator-> (void); -+ const CORBA_OctetSeq *operator-> (void) const; - -- operator const OctetSeq &() const; -- operator OctetSeq &(); -- operator OctetSeq &() const; -+ operator const CORBA_OctetSeq &() const; -+ operator CORBA_OctetSeq &(); -+ operator CORBA_OctetSeq &() const; - - CORBA::Octet & operator[] (CORBA::ULong index); - const CORBA::Octet & operator[] (CORBA::ULong index) const; - - // in, inout, out, _retn -- const OctetSeq &in (void) const; -- OctetSeq &inout (void); -- OctetSeq *&out (void); -- OctetSeq *_retn (void); -- OctetSeq *ptr (void) const; -+ const CORBA_OctetSeq &in (void) const; -+ CORBA_OctetSeq &inout (void); -+ CORBA_OctetSeq *&out (void); -+ CORBA_OctetSeq *_retn (void); -+ CORBA_OctetSeq *ptr (void) const; - - private: -- OctetSeq *ptr_; -+ CORBA_OctetSeq *ptr_; - }; +- OctetSeq ( ++ CORBA_OctetSeq ( + CORBA::ULong length, + const ACE_Message_Block* mb + ) +@@ -112,37 +109,37 @@ + // class CORBA::OctetSeq_var + // ************************************************************* + +- class TAO_Export OctetSeq_var ++ class TAO_Export CORBA_OctetSeq_var + { + public: +- OctetSeq_var (void); // default constructor +- OctetSeq_var (OctetSeq *); +- OctetSeq_var (const OctetSeq_var &); // copy constructor +- OctetSeq_var (const OctetSeq &); // fixed-size base types only +- ~OctetSeq_var (void); // destructor ++ CORBA_OctetSeq_var (void); // default constructor ++ CORBA_OctetSeq_var (CORBA_OctetSeq *); ++ CORBA_OctetSeq_var (const CORBA_OctetSeq_var &); // copy constructor ++ CORBA_OctetSeq_var (const CORBA_OctetSeq &); // fixed-size base types only ++ ~CORBA_OctetSeq_var (void); // destructor + +- OctetSeq_var &operator= (OctetSeq *); +- OctetSeq_var &operator= (const OctetSeq_var &); +- OctetSeq_var &operator= (const OctetSeq &); // fixed-size base types only +- OctetSeq *operator-> (void); +- const OctetSeq *operator-> (void) const; ++ CORBA_OctetSeq_var &operator= (CORBA_OctetSeq *); ++ CORBA_OctetSeq_var &operator= (const CORBA_OctetSeq_var &); ++ CORBA_OctetSeq_var &operator= (const CORBA_OctetSeq &); // fixed-size base types only ++ CORBA_OctetSeq *operator-> (void); ++ const CORBA_OctetSeq *operator-> (void) const; + +- operator const OctetSeq &() const; +- operator OctetSeq &(); +- operator OctetSeq &() const; ++ operator const CORBA_OctetSeq &() const; ++ operator CORBA_OctetSeq &(); ++ operator CORBA_OctetSeq &() const; + + CORBA::Octet & operator[] (CORBA::ULong index); + const CORBA::Octet & operator[] (CORBA::ULong index) const; + + // in, inout, out, _retn +- const OctetSeq &in (void) const; +- OctetSeq &inout (void); +- OctetSeq *&out (void); +- OctetSeq *_retn (void); +- OctetSeq *ptr (void) const; ++ const CORBA_OctetSeq &in (void) const; ++ CORBA_OctetSeq &inout (void); ++ CORBA_OctetSeq *&out (void); ++ CORBA_OctetSeq *_retn (void); ++ CORBA_OctetSeq *ptr (void) const; + + private: +- OctetSeq *ptr_; ++ CORBA_OctetSeq *ptr_; + }; + + +@@ -152,40 +149,37 @@ + #if !defined (_CORBA_OCTETSEQ___OUT_CH_) + #define _CORBA_OCTETSEQ___OUT_CH_ + +- class TAO_Export OctetSeq_out ++ class TAO_Export CORBA_OctetSeq_out + { + public: +- OctetSeq_out (OctetSeq *&); +- OctetSeq_out (OctetSeq_var &); +- OctetSeq_out (const OctetSeq_out &); +- OctetSeq_out &operator= (const OctetSeq_out &); +- OctetSeq_out &operator= (OctetSeq *); +- operator OctetSeq *&(); +- OctetSeq *&ptr (void); +- OctetSeq *operator-> (void); ++ CORBA_OctetSeq_out (CORBA_OctetSeq *&); ++ CORBA_OctetSeq_out (CORBA_OctetSeq_var &); ++ CORBA_OctetSeq_out (const CORBA_OctetSeq_out &); ++ CORBA_OctetSeq_out &operator= (const CORBA_OctetSeq_out &); ++ CORBA_OctetSeq_out &operator= (CORBA_OctetSeq *); ++ operator CORBA_OctetSeq *&(); ++ CORBA_OctetSeq *&ptr (void); ++ CORBA_OctetSeq *operator-> (void); + CORBA::Octet & operator[] (CORBA::ULong index); + + private: +- OctetSeq *&ptr_; ++ CORBA_OctetSeq *&ptr_; + // assignment from T_var not allowed +- void operator= (const OctetSeq_var &); ++ void operator= (const CORBA_OctetSeq_var &); + }; -@@ -146,51 +147,51 @@ - #if !defined (_OCTETSEQ___OUT_CH_) - #define _OCTETSEQ___OUT_CH_ - --class TAO_Export OctetSeq_out -+class TAO_Export CORBA_OctetSeq_out - { - public: -- OctetSeq_out (OctetSeq *&); -- OctetSeq_out (OctetSeq_var &); -- OctetSeq_out (const OctetSeq_out &); -- OctetSeq_out &operator= (const OctetSeq_out &); -- OctetSeq_out &operator= (OctetSeq *); -- operator OctetSeq *&(); -- OctetSeq *&ptr (void); -- OctetSeq *operator-> (void); -+ CORBA_OctetSeq_out (CORBA_OctetSeq *&); -+ CORBA_OctetSeq_out (CORBA_OctetSeq_var &); -+ CORBA_OctetSeq_out (const CORBA_OctetSeq_out &); -+ CORBA_OctetSeq_out &operator= (const CORBA_OctetSeq_out &); -+ CORBA_OctetSeq_out &operator= (CORBA_OctetSeq *); -+ operator CORBA_OctetSeq *&(); -+ CORBA_OctetSeq *&ptr (void); -+ CORBA_OctetSeq *operator-> (void); - CORBA::Octet & operator[] (CORBA::ULong index); - - private: -- OctetSeq *&ptr_; -+ CORBA_OctetSeq *&ptr_; - // assignment from T_var not allowed -- void operator= (const OctetSeq_var &); -+ void operator= (const CORBA_OctetSeq_var &); - }; + #endif /* end #if !defined */ +- TAO_NAMESPACE_STORAGE_CLASS CORBA::TypeCode_ptr _tc_OctetSeq; +- ++ TAO_NAMESPACE_STORAGE_CLASS CORBA::TypeCode_ptr _tc_CORBA_OctetSeq; - #endif /* end #if !defined */ +-} +-TAO_NAMESPACE_CLOSE // module CORBA --extern TAO_Export CORBA::TypeCode_ptr _tc_OctetSeq; -+extern TAO_Export CORBA::TypeCode_ptr _tc_CORBA_OctetSeq; + // Proxy Broker Factory function pointer declarations. --TAO_Export void operator<<= (CORBA::Any &, const OctetSeq &); // copying version --TAO_Export void operator<<= (CORBA::Any &, OctetSeq*); // noncopying version --TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, OctetSeq *&); // deprecated --TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const OctetSeq *&); +-TAO_Export void operator<<= (CORBA::Any &, const CORBA::OctetSeq &); // copying version +-TAO_Export void operator<<= (CORBA::Any &, CORBA::OctetSeq*); // noncopying version +-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA::OctetSeq *&); // deprecated +-TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, const CORBA::OctetSeq *&); +TAO_Export void operator<<= (CORBA::Any &, const CORBA_OctetSeq &); // copying version +TAO_Export void operator<<= (CORBA::Any &, CORBA_OctetSeq*); // noncopying version +TAO_Export CORBA::Boolean operator>>= (const CORBA::Any &, CORBA_OctetSeq *&); // deprecated @@ -182,56 +195,43 @@ #ifndef __ACE_INLINE__ - --#if !defined _TAO_CDR_OP_OctetSeq_H_ --#define _TAO_CDR_OP_OctetSeq_H_ -+#if !defined _TAO_CDR_OP_CORBA_OctetSeq_H_ -+#define _TAO_CDR_OP_CORBA_OctetSeq_H_ +@@ -195,11 +189,11 @@ TAO_Export CORBA::Boolean operator<< ( TAO_OutputCDR &, -- const OctetSeq & +- const CORBA::OctetSeq & + const CORBA_OctetSeq & ); TAO_Export CORBA::Boolean operator>> ( TAO_InputCDR &, -- OctetSeq & +- CORBA::OctetSeq & + CORBA_OctetSeq & ); --#endif /* _TAO_CDR_OP_OctetSeq_H_ */ -+#endif /* _TAO_CDR_OP_CORBA_OctetSeq_H_ */ - - - #endif /* __ACE_INLINE__ */ ---- OctetSeqC.i.old Sun Oct 22 22:28:28 2000 -+++ OctetSeqC.i Sun Oct 22 22:29:06 2000 -@@ -24,162 +24,162 @@ - #define _OCTETSEQ_CI_ - - // ************************************************************* --// Inline operations for class OctetSeq_var -+// Inline operations for class CORBA_OctetSeq_var + #endif /* _TAO_CDR_OP_CORBA_OctetSeq_H_ */ +--- OctetSeqC.i.old Fri Feb 23 22:46:34 2001 ++++ OctetSeqC.i Fri Feb 23 23:05:00 2001 +@@ -28,47 +28,47 @@ // ************************************************************* ACE_INLINE --OctetSeq_var::OctetSeq_var (void) // default constructor +-CORBA::OctetSeq_var::OctetSeq_var (void) // default constructor +CORBA_OctetSeq_var::CORBA_OctetSeq_var (void) // default constructor : ptr_ (0) {} ACE_INLINE --OctetSeq_var::OctetSeq_var (OctetSeq *p) +-CORBA::OctetSeq_var::OctetSeq_var (OctetSeq *p) +CORBA_OctetSeq_var::CORBA_OctetSeq_var (CORBA_OctetSeq *p) : ptr_ (p) {} ACE_INLINE --OctetSeq_var::OctetSeq_var (const ::OctetSeq_var &p) // copy constructor +-CORBA::OctetSeq_var::OctetSeq_var (const ::CORBA::OctetSeq_var &p) // copy constructor +CORBA_OctetSeq_var::CORBA_OctetSeq_var (const ::CORBA_OctetSeq_var &p) // copy constructor { if (p.ptr_) -- ACE_NEW (this->ptr_, ::OctetSeq (*p.ptr_)); +- ACE_NEW (this->ptr_, ::CORBA::OctetSeq (*p.ptr_)); + ACE_NEW (this->ptr_, ::CORBA_OctetSeq (*p.ptr_)); else this->ptr_ = 0; @@ -239,22 +239,22 @@ // fixed-size base types only ACE_INLINE --OctetSeq_var::OctetSeq_var (const ::OctetSeq &p) +-CORBA::OctetSeq_var::OctetSeq_var (const ::CORBA::OctetSeq &p) +CORBA_OctetSeq_var::CORBA_OctetSeq_var (const ::CORBA_OctetSeq &p) { -- ACE_NEW (this->ptr_, ::OctetSeq (p)); +- ACE_NEW (this->ptr_, ::CORBA::OctetSeq (p)); + ACE_NEW (this->ptr_, ::CORBA_OctetSeq (p)); } ACE_INLINE --OctetSeq_var::~OctetSeq_var (void) // destructor +-CORBA::OctetSeq_var::~OctetSeq_var (void) // destructor +CORBA_OctetSeq_var::~CORBA_OctetSeq_var (void) // destructor { delete this->ptr_; } --ACE_INLINE OctetSeq_var & --OctetSeq_var::operator= (OctetSeq *p) +-ACE_INLINE CORBA::OctetSeq_var & +-CORBA::OctetSeq_var::operator= (OctetSeq *p) +ACE_INLINE CORBA_OctetSeq_var & +CORBA_OctetSeq_var::operator= (CORBA_OctetSeq *p) { @@ -263,45 +263,57 @@ return *this; } --ACE_INLINE OctetSeq_var & --OctetSeq_var::operator= (const ::OctetSeq_var &p) // deep copy -+ACE_INLINE CORBA_OctetSeq_var & -+CORBA_OctetSeq_var::operator= (const ::CORBA_OctetSeq_var &p) // deep copy +-ACE_INLINE ::CORBA::OctetSeq_var & +-CORBA::OctetSeq_var::operator= (const ::CORBA::OctetSeq_var &p) ++ACE_INLINE ::CORBA_OctetSeq_var & ++CORBA_OctetSeq_var::operator= (const ::CORBA_OctetSeq_var &p) { if (this != &p) - { - delete this->ptr_; -- ACE_NEW_RETURN (this->ptr_, ::OctetSeq (*p.ptr_), *this); -+ ACE_NEW_RETURN (this->ptr_, ::CORBA_OctetSeq (*p.ptr_), *this); - } - return *this; + { +@@ -79,12 +79,12 @@ + } + else + { +- OctetSeq *deep_copy = +- new OctetSeq (*p.ptr_); ++ CORBA_OctetSeq *deep_copy = ++ new CORBA_OctetSeq (*p.ptr_); + + if (deep_copy != 0) + { +- OctetSeq *tmp = deep_copy; ++ CORBA_OctetSeq *tmp = deep_copy; + deep_copy = this->ptr_; + this->ptr_ = tmp; + delete deep_copy; +@@ -96,107 +96,107 @@ } // fixed-size types only --ACE_INLINE ::OctetSeq_var & --OctetSeq_var::operator= (const ::OctetSeq &p) +-ACE_INLINE ::CORBA::OctetSeq_var & +-CORBA::OctetSeq_var::operator= (const ::CORBA::OctetSeq &p) +ACE_INLINE ::CORBA_OctetSeq_var & +CORBA_OctetSeq_var::operator= (const ::CORBA_OctetSeq &p) { if (this->ptr_ != &p) { delete this->ptr_; -- ACE_NEW_RETURN (this->ptr_, ::OctetSeq (p), *this); +- ACE_NEW_RETURN (this->ptr_, ::CORBA::OctetSeq (p), *this); + ACE_NEW_RETURN (this->ptr_, ::CORBA_OctetSeq (p), *this); } return *this; } --ACE_INLINE const ::OctetSeq * --OctetSeq_var::operator-> (void) const +-ACE_INLINE const ::CORBA::OctetSeq * +-CORBA::OctetSeq_var::operator-> (void) const +ACE_INLINE const ::CORBA_OctetSeq * +CORBA_OctetSeq_var::operator-> (void) const { return this->ptr_; } --ACE_INLINE ::OctetSeq * --OctetSeq_var::operator-> (void) +-ACE_INLINE ::CORBA::OctetSeq * +-CORBA::OctetSeq_var::operator-> (void) +ACE_INLINE ::CORBA_OctetSeq * +CORBA_OctetSeq_var::operator-> (void) { @@ -309,50 +321,50 @@ } ACE_INLINE --OctetSeq_var::operator const ::OctetSeq &() const // cast +-CORBA::OctetSeq_var::operator const ::CORBA::OctetSeq &() const // cast +CORBA_OctetSeq_var::operator const ::CORBA_OctetSeq &() const // cast { return *this->ptr_; } ACE_INLINE --OctetSeq_var::operator ::OctetSeq &() // cast +-CORBA::OctetSeq_var::operator ::CORBA::OctetSeq &() // cast +CORBA_OctetSeq_var::operator ::CORBA_OctetSeq &() // cast { return *this->ptr_; } ACE_INLINE --OctetSeq_var::operator ::OctetSeq &() const // cast +-CORBA::OctetSeq_var::operator ::CORBA::OctetSeq &() const // cast +CORBA_OctetSeq_var::operator ::CORBA_OctetSeq &() const // cast { return *this->ptr_; } ACE_INLINE CORBA::Octet & --OctetSeq_var::operator[] (CORBA::ULong index) +-CORBA::OctetSeq_var::operator[] (CORBA::ULong index) +CORBA_OctetSeq_var::operator[] (CORBA::ULong index) { return this->ptr_->operator[] (index); } ACE_INLINE const CORBA::Octet & --OctetSeq_var::operator[] (CORBA::ULong index) const +-CORBA::OctetSeq_var::operator[] (CORBA::ULong index) const +CORBA_OctetSeq_var::operator[] (CORBA::ULong index) const { return ACE_const_cast (const CORBA::Octet &, this->ptr_->operator[] (index)); } --ACE_INLINE const ::OctetSeq & --OctetSeq_var::in (void) const +-ACE_INLINE const ::CORBA::OctetSeq & +-CORBA::OctetSeq_var::in (void) const +ACE_INLINE const ::CORBA_OctetSeq & +CORBA_OctetSeq_var::in (void) const { return *this->ptr_; } --ACE_INLINE ::OctetSeq & --OctetSeq_var::inout (void) +-ACE_INLINE ::CORBA::OctetSeq & +-CORBA::OctetSeq_var::inout (void) +ACE_INLINE ::CORBA_OctetSeq & +CORBA_OctetSeq_var::inout (void) { @@ -360,8 +372,8 @@ } // mapping for variable size --ACE_INLINE ::OctetSeq *& --OctetSeq_var::out (void) +-ACE_INLINE ::CORBA::OctetSeq *& +-CORBA::OctetSeq_var::out (void) +ACE_INLINE ::CORBA_OctetSeq *& +CORBA_OctetSeq_var::out (void) { @@ -370,19 +382,19 @@ return this->ptr_; } --ACE_INLINE ::OctetSeq * --OctetSeq_var::_retn (void) +-ACE_INLINE ::CORBA::OctetSeq * +-CORBA::OctetSeq_var::_retn (void) +ACE_INLINE ::CORBA_OctetSeq * +CORBA_OctetSeq_var::_retn (void) { -- ::OctetSeq *tmp = this->ptr_; +- ::CORBA::OctetSeq *tmp = this->ptr_; + ::CORBA_OctetSeq *tmp = this->ptr_; this->ptr_ = 0; return tmp; } --ACE_INLINE ::OctetSeq * --OctetSeq_var::ptr (void) const +-ACE_INLINE ::CORBA::OctetSeq * +-CORBA::OctetSeq_var::ptr (void) const +ACE_INLINE ::CORBA_OctetSeq * +CORBA_OctetSeq_var::ptr (void) const { @@ -390,12 +402,12 @@ } // ************************************************************* --// Inline operations for class OctetSeq_out +-// Inline operations for class CORBA::OctetSeq_out +// Inline operations for class CORBA_OctetSeq_out // ************************************************************* ACE_INLINE --OctetSeq_out::OctetSeq_out (OctetSeq *&p) +-CORBA::OctetSeq_out::OctetSeq_out (OctetSeq *&p) +CORBA_OctetSeq_out::CORBA_OctetSeq_out (CORBA_OctetSeq *&p) : ptr_ (p) { @@ -403,23 +415,23 @@ } ACE_INLINE --OctetSeq_out::OctetSeq_out (OctetSeq_var &p) // constructor from _var +-CORBA::OctetSeq_out::OctetSeq_out (OctetSeq_var &p) // constructor from _var +CORBA_OctetSeq_out::CORBA_OctetSeq_out (CORBA_OctetSeq_var &p) // constructor from _var : ptr_ (p.out ()) { delete this->ptr_; -@@ -187,44 +187,44 @@ +@@ -204,44 +204,44 @@ } ACE_INLINE --OctetSeq_out::OctetSeq_out (const ::OctetSeq_out &p) // copy constructor +-CORBA::OctetSeq_out::OctetSeq_out (const ::CORBA::OctetSeq_out &p) // copy constructor - : ptr_ (ACE_const_cast (OctetSeq_out&, p).ptr_) +CORBA_OctetSeq_out::CORBA_OctetSeq_out (const ::CORBA_OctetSeq_out &p) // copy constructor + : ptr_ (ACE_const_cast (CORBA_OctetSeq_out&, p).ptr_) {} --ACE_INLINE ::OctetSeq_out & --OctetSeq_out::operator= (const ::OctetSeq_out &p) +-ACE_INLINE ::CORBA::OctetSeq_out & +-CORBA::OctetSeq_out::operator= (const ::CORBA::OctetSeq_out &p) +ACE_INLINE ::CORBA_OctetSeq_out & +CORBA_OctetSeq_out::operator= (const ::CORBA_OctetSeq_out &p) { @@ -428,8 +440,8 @@ return *this; } --ACE_INLINE ::OctetSeq_out & --OctetSeq_out::operator= (OctetSeq *p) +-ACE_INLINE ::CORBA::OctetSeq_out & +-CORBA::OctetSeq_out::operator= (OctetSeq *p) +ACE_INLINE ::CORBA_OctetSeq_out & +CORBA_OctetSeq_out::operator= (CORBA_OctetSeq *p) { @@ -438,22 +450,22 @@ } ACE_INLINE --OctetSeq_out::operator ::OctetSeq *&() // cast +-CORBA::OctetSeq_out::operator ::CORBA::OctetSeq *&() // cast +CORBA_OctetSeq_out::operator ::CORBA_OctetSeq *&() // cast { return this->ptr_; } --ACE_INLINE ::OctetSeq *& --OctetSeq_out::ptr (void) // ptr +-ACE_INLINE ::CORBA::OctetSeq *& +-CORBA::OctetSeq_out::ptr (void) // ptr +ACE_INLINE ::CORBA_OctetSeq *& +CORBA_OctetSeq_out::ptr (void) // ptr { return this->ptr_; } --ACE_INLINE ::OctetSeq * --OctetSeq_out::operator-> (void) +-ACE_INLINE ::CORBA::OctetSeq * +-CORBA::OctetSeq_out::operator-> (void) +ACE_INLINE ::CORBA_OctetSeq * +CORBA_OctetSeq_out::operator-> (void) { @@ -461,84 +473,86 @@ } ACE_INLINE CORBA::Octet & --OctetSeq_out::operator[] (CORBA::ULong index) +-CORBA::OctetSeq_out::operator[] (CORBA::ULong index) +CORBA_OctetSeq_out::operator[] (CORBA::ULong index) { return this->ptr_->operator[] (index); } -@@ -233,17 +233,17 @@ - #endif /* end #if !defined */ - - --#if !defined _TAO_CDR_OP_OctetSeq_I_ --#define _TAO_CDR_OP_OctetSeq_I_ -+#if !defined _TAO_CDR_OP_CORBA_OctetSeq_I_ -+#define _TAO_CDR_OP_CORBA_OctetSeq_I_ +@@ -255,11 +255,11 @@ CORBA::Boolean TAO_Export operator<< ( TAO_OutputCDR &, -- const OctetSeq & +- const CORBA::OctetSeq & + const CORBA_OctetSeq & ); CORBA::Boolean TAO_Export operator>> ( TAO_InputCDR &, -- OctetSeq & +- CORBA::OctetSeq & + CORBA_OctetSeq & ); --#endif /* _TAO_CDR_OP_OctetSeq_I_ */ -+#endif /* _TAO_CDR_OP_CORBA_OctetSeq_I_ */ - ---- OctetSeqC.cpp.old Sun Oct 22 22:28:28 2000 -+++ OctetSeqC.cpp Sun Oct 22 22:29:06 2000 -@@ -25,17 +25,18 @@ + #endif /* _TAO_CDR_OP_CORBA_OctetSeq_I_ */ +--- OctetSeqC.cpp.old Fri Feb 23 22:46:34 2001 ++++ OctetSeqC.cpp Fri Feb 23 23:14:35 2001 +@@ -21,10 +21,6 @@ + + #include "OctetSeqC.h" + +-#if TAO_HAS_INTERCEPTORS == 1 +-#include "tao/RequestInfo_Util.h" +-#endif /* TAO_HAS_INTERCEPTORS == 1 */ +- + #if defined (__BORLANDC__) + #pragma option -w-rvl -w-rch -w-ccc -w-aus + #endif /* __BORLANDC__ */ +@@ -33,6 +29,9 @@ #include "OctetSeqC.i" #endif /* !defined INLINE */ -+#include "tao/Any.h" ++#include "Any.h" ++#include "CDR.h" ++#include "TypeCode.h" - #if !defined (_OCTETSEQ_CS_) - #define _OCTETSEQ_CS_ - - // ************************************************************* --// OctetSeq -+// CORBA_OctetSeq + #if !defined (_CORBA_OCTETSEQ_CS_) + #define _CORBA_OCTETSEQ_CS_ +@@ -41,9 +40,9 @@ + // CORBA::OctetSeq // ************************************************************* --OctetSeq::OctetSeq (void) +-CORBA::OctetSeq::OctetSeq (void) +CORBA_OctetSeq::CORBA_OctetSeq (void) {} --OctetSeq::OctetSeq (CORBA::ULong max) // uses max size +-CORBA::OctetSeq::OctetSeq (CORBA::ULong max) // uses max size +CORBA_OctetSeq::CORBA_OctetSeq (CORBA::ULong max) // uses max size : #if !defined (TAO_USE_SEQUENCE_TEMPLATES) TAO_Unbounded_Sequence<CORBA::Octet> -@@ -44,7 +45,7 @@ +@@ -52,7 +51,7 @@ #endif /* !TAO_USE_SEQUENCE_TEMPLATES */ (max) {} --OctetSeq::OctetSeq (CORBA::ULong max, CORBA::ULong length, CORBA::Octet *buffer, CORBA::Boolean release) +-CORBA::OctetSeq::OctetSeq (CORBA::ULong max, CORBA::ULong length, CORBA::Octet *buffer, CORBA::Boolean release) +CORBA_OctetSeq::CORBA_OctetSeq (CORBA::ULong max, CORBA::ULong length, CORBA::Octet *buffer, CORBA::Boolean release) : #if !defined (TAO_USE_SEQUENCE_TEMPLATES) TAO_Unbounded_Sequence<CORBA::Octet> -@@ -53,7 +54,7 @@ +@@ -61,7 +60,7 @@ #endif /* !TAO_USE_SEQUENCE_TEMPLATES */ (max, length, buffer, release) {} --OctetSeq::OctetSeq (const OctetSeq &seq) // copy ctor +-CORBA::OctetSeq::OctetSeq (const OctetSeq &seq) // copy ctor +CORBA_OctetSeq::CORBA_OctetSeq (const CORBA_OctetSeq &seq) // copy ctor : #if !defined (TAO_USE_SEQUENCE_TEMPLATES) TAO_Unbounded_Sequence<CORBA::Octet> -@@ -62,22 +63,22 @@ +@@ -70,11 +69,11 @@ #endif /* !TAO_USE_SEQUENCE_TEMPLATES */ (seq) {} --OctetSeq::~OctetSeq (void) // dtor +-CORBA::OctetSeq::~OctetSeq (void) // dtor +CORBA_OctetSeq::~CORBA_OctetSeq (void) // dtor {} --void OctetSeq::_tao_any_destructor (void *x) +-void CORBA::OctetSeq::_tao_any_destructor (void *x) +void CORBA_OctetSeq::_tao_any_destructor (void *x) { - OctetSeq *tmp = ACE_static_cast (OctetSeq*,x); @@ -546,32 +560,20 @@ delete tmp; } - - #endif /* end #if !defined */ - --static const CORBA::Long _oc_OctetSeq[] = -+static const CORBA::Long _oc_CORBA_OctetSeq[] = - { - TAO_ENCAP_BYTE_ORDER, // byte order -- 17, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x4f637465), ACE_NTOHL (0x74536571), ACE_NTOHL (0x3a312e30), ACE_NTOHL (0x0), // repository ID = IDL:OctetSeq:1.0 -- 9, ACE_NTOHL (0x4f637465), ACE_NTOHL (0x74536571), ACE_NTOHL (0x0), // name = OctetSeq -+ 17, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x4f637465), ACE_NTOHL (0x74536571), ACE_NTOHL (0x3a312e30), ACE_NTOHL (0x0), // repository ID = IDL:CORBA_OctetSeq:1.0 -+ 9, ACE_NTOHL (0x4f637465), ACE_NTOHL (0x74536571), ACE_NTOHL (0x0), // name = CORBA_OctetSeq - CORBA::tk_sequence, // typecode kind - 12, // encapsulation length - TAO_ENCAP_BYTE_ORDER, // byte order -@@ -86,54 +87,54 @@ +@@ -94,56 +93,53 @@ 0U, }; --static CORBA::TypeCode _tc_TAO_tc_OctetSeq (CORBA::tk_alias, sizeof (_oc_OctetSeq), (char *) &_oc_OctetSeq, 0, sizeof (OctetSeq)); --CORBA::TypeCode_ptr _tc_OctetSeq = &_tc_TAO_tc_OctetSeq; +-static CORBA::TypeCode _tc_TAO_tc_CORBA_OctetSeq (CORBA::tk_alias, sizeof (_oc_CORBA_OctetSeq), (char *) &_oc_CORBA_OctetSeq, 0, sizeof (CORBA::OctetSeq)); +-TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr) +-TAO_NAMESPACE_BEGIN (CORBA) +-TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_OctetSeq, &_tc_TAO_tc_CORBA_OctetSeq) +-TAO_NAMESPACE_END +static CORBA::TypeCode _tc_TAO_tc_CORBA_OctetSeq (CORBA::tk_alias, sizeof (_oc_CORBA_OctetSeq), (char *) &_oc_CORBA_OctetSeq, 0, sizeof (CORBA_OctetSeq)); +CORBA::TypeCode_ptr _tc_CORBA_OctetSeq = &_tc_TAO_tc_CORBA_OctetSeq; - void operator<<= ( CORBA::Any &_tao_any, -- const OctetSeq &_tao_elem +- const CORBA::OctetSeq &_tao_elem + const CORBA_OctetSeq &_tao_elem ) // copying { @@ -579,7 +581,7 @@ if (stream << _tao_elem) { _tao_any._tao_replace ( -- _tc_OctetSeq, +- CORBA::_tc_OctetSeq, + _tc_CORBA_OctetSeq, TAO_ENCAP_BYTE_ORDER, stream.begin () @@ -587,50 +589,50 @@ } } --void operator<<= (CORBA::Any &_tao_any, OctetSeq *_tao_elem) // non copying +-void operator<<= (CORBA::Any &_tao_any, CORBA::OctetSeq *_tao_elem) // non copying +void operator<<= (CORBA::Any &_tao_any, CORBA_OctetSeq *_tao_elem) // non copying { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( -- _tc_OctetSeq, +- CORBA::_tc_OctetSeq, + _tc_CORBA_OctetSeq, TAO_ENCAP_BYTE_ORDER, stream.begin (), 1, _tao_elem, -- OctetSeq::_tao_any_destructor +- CORBA::OctetSeq::_tao_any_destructor + CORBA_OctetSeq::_tao_any_destructor ); } --CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, OctetSeq *&_tao_elem) +-CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA::OctetSeq *&_tao_elem) +CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA_OctetSeq *&_tao_elem) { return _tao_any >>= ACE_const_cast( -- const OctetSeq*&, +- const CORBA::OctetSeq*&, + const CORBA_OctetSeq*&, _tao_elem ); } --CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const OctetSeq *&_tao_elem) +-CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA::OctetSeq *&_tao_elem) +CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA_OctetSeq *&_tao_elem) { _tao_elem = 0; ACE_TRY_NEW_ENV { CORBA::TypeCode_var type = _tao_any.type (); -- if (!type->equivalent (_tc_OctetSeq, ACE_TRY_ENV)) // not equal +- if (!type->equivalent (CORBA::_tc_OctetSeq, ACE_TRY_ENV)) // not equal + if (!type->equivalent (_tc_CORBA_OctetSeq, ACE_TRY_ENV)) // not equal { return 0; } -@@ -141,15 +142,15 @@ +@@ -151,15 +147,15 @@ if (_tao_any.any_owns_data ()) { _tao_elem = ACE_static_cast( -- const OctetSeq*, +- const CORBA::OctetSeq*, + const CORBA_OctetSeq*, _tao_any.value () ); @@ -638,49 +640,49 @@ } else { -- OctetSeq *tmp; -- ACE_NEW_RETURN (tmp, OctetSeq, 0); +- CORBA::OctetSeq *tmp; +- ACE_NEW_RETURN (tmp, CORBA::OctetSeq, 0); + CORBA_OctetSeq *tmp; + ACE_NEW_RETURN (tmp, CORBA_OctetSeq, 0); TAO_InputCDR stream ( _tao_any._tao_get_cdr (), _tao_any._tao_byte_order () -@@ -157,10 +158,10 @@ +@@ -167,10 +163,10 @@ if (stream >> *tmp) { ((CORBA::Any *)&_tao_any)->_tao_replace ( -- _tc_OctetSeq, +- CORBA::_tc_OctetSeq, + _tc_CORBA_OctetSeq, 1, ACE_static_cast (void *, tmp), -- OctetSeq::_tao_any_destructor +- CORBA::OctetSeq::_tao_any_destructor + CORBA_OctetSeq::_tao_any_destructor ); _tao_elem = tmp; return 1; -@@ -180,7 +181,7 @@ +@@ -190,7 +186,7 @@ CORBA::Boolean operator<< ( TAO_OutputCDR &strm, -- const OctetSeq &_tao_sequence +- const CORBA::OctetSeq &_tao_sequence + const CORBA_OctetSeq &_tao_sequence ) { if (strm << _tao_sequence.length ()) -@@ -190,7 +191,7 @@ +@@ -200,7 +196,7 @@ #if (TAO_NO_COPY_OCTET_SEQUENCES == 1) { TAO_Unbounded_Sequence<CORBA::Octet> *oseq = -- ACE_static_cast (TAO_Unbounded_Sequence<CORBA::Octet>*, (OctetSeq *)&_tao_sequence); +- ACE_static_cast (TAO_Unbounded_Sequence<CORBA::Octet>*, (CORBA::OctetSeq *)&_tao_sequence); + ACE_static_cast (TAO_Unbounded_Sequence<CORBA::Octet>*, (CORBA_OctetSeq *)&_tao_sequence); if (oseq->mb ()) return strm.write_octet_array_mb (oseq->mb ()); else -@@ -207,7 +208,7 @@ +@@ -217,7 +213,7 @@ CORBA::Boolean operator>> ( TAO_InputCDR &strm, -- OctetSeq &_tao_sequence +- CORBA::OctetSeq &_tao_sequence + CORBA_OctetSeq &_tao_sequence ) { |