diff options
Diffstat (limited to 'TAO/tao/GIOPC.cpp')
-rw-r--r-- | TAO/tao/GIOPC.cpp | 1029 |
1 files changed, 701 insertions, 328 deletions
diff --git a/TAO/tao/GIOPC.cpp b/TAO/tao/GIOPC.cpp index 73dbf1111fa..8c5c7531c78 100644 --- a/TAO/tao/GIOPC.cpp +++ b/TAO/tao/GIOPC.cpp @@ -1,4 +1,27 @@ -/* -*- C++ -*- $Id$ */ +// -*- C++ -*- +// +// $Id$ + +// **** Code generated by the The ACE ORB (TAO) IDL Compiler **** +// TAO and the TAO IDL Compiler have been developed by: +// Center for Distributed Object Computing +// Washington University +// St. Louis, MO +// USA +// http://www.cs.wustl.edu/~schmidt/doc-center.html +// and +// Distributed Object Computing Laboratory +// University of California at Irvine +// Irvine, CA +// USA +// http://doc.ece.uci.edu/ +// +// Information about TAO is available at: +// http://www.cs.wustl.edu/~schmidt/TAO.html + +// TAO_IDL - Generated from +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_codegen.cpp:314 + // ================================================================ // @@ -17,81 +40,228 @@ // ================================================================ -#include "tao/GIOPC.h" +#include "GIOPC.h" #include "tao/Environment.h" -#include "tao/Any.h" -#include "tao/Typecode.h" +#include "tao/Any_T.h" +#include "tao/ORB_Core.h" + +#if defined (__BORLANDC__) +#pragma option -w-rvl -w-rch -w-ccc -w-aus -w-sig +#endif /* __BORLANDC__ */ #if !defined (__ACE_INLINE__) #include "GIOPC.i" #endif /* !defined INLINE */ +// TAO_IDL - Generated from +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_typecode/typecode_defn.cpp:284 static const CORBA::Long _oc_GIOP_AddressingDisposition[] = { - TAO_ENCAP_BYTE_ORDER, // byte order - 43, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x47494f50), ACE_NTOHL (0x2f416464), ACE_NTOHL (0x72657373), ACE_NTOHL (0x696e6744), ACE_NTOHL (0x6973706f), ACE_NTOHL (0x73697469), ACE_NTOHL (0x6f6e3a31), ACE_NTOHL (0x2e300000), // repository ID = IDL:omg.org/GIOP/AddressingDisposition:1.0 - 22, ACE_NTOHL (0x41646472), ACE_NTOHL (0x65737369), ACE_NTOHL (0x6e674469), ACE_NTOHL (0x73706f73), ACE_NTOHL (0x6974696f), ACE_NTOHL (0x6e000000), // name = AddressingDisposition - CORBA::tk_short, + TAO_ENCAP_BYTE_ORDER, // byte order + 43, + ACE_NTOHL (0x49444c3a), + ACE_NTOHL (0x6f6d672e), + ACE_NTOHL (0x6f72672f), + ACE_NTOHL (0x47494f50), + ACE_NTOHL (0x2f416464), + ACE_NTOHL (0x72657373), + ACE_NTOHL (0x696e6744), + ACE_NTOHL (0x6973706f), + ACE_NTOHL (0x73697469), + ACE_NTOHL (0x6f6e3a31), + ACE_NTOHL (0x2e300000), // repository ID = IDL:omg.org/GIOP/AddressingDisposition:1.0 + 22, + ACE_NTOHL (0x41646472), + ACE_NTOHL (0x65737369), + ACE_NTOHL (0x6e674469), + ACE_NTOHL (0x73706f73), + ACE_NTOHL (0x6974696f), + ACE_NTOHL (0x6e000000), // name = AddressingDisposition + CORBA::tk_short, }; -static CORBA::TypeCode _tc_TAO_tc_GIOP_AddressingDisposition (CORBA::tk_alias, sizeof (_oc_GIOP_AddressingDisposition), (char *) &_oc_GIOP_AddressingDisposition, 0, sizeof (GIOP::AddressingDisposition)); + +static CORBA::TypeCode _tc_TAO_tc_GIOP_AddressingDisposition ( + CORBA::tk_alias, + sizeof (_oc_GIOP_AddressingDisposition), + (char *) &_oc_GIOP_AddressingDisposition, + 0, + sizeof (GIOP::AddressingDisposition) + ); + TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr) TAO_NAMESPACE_BEGIN (GIOP) -TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_AddressingDisposition, &_tc_TAO_tc_GIOP_AddressingDisposition) -TAO_NAMESPACE_END -TAO_NAMESPACE_TYPE (const CORBA::Short) -TAO_NAMESPACE_BEGIN (GIOP) -TAO_NAMESPACE_DEFINE (const CORBA::Short, KeyAddr, 0) -TAO_NAMESPACE_END -TAO_NAMESPACE_TYPE (const CORBA::Short) -TAO_NAMESPACE_BEGIN (GIOP) -TAO_NAMESPACE_DEFINE (const CORBA::Short, ProfileAddr, 1) +TAO_NAMESPACE_DEFINE ( + ::CORBA::TypeCode_ptr, + _tc_AddressingDisposition, + &_tc_TAO_tc_GIOP_AddressingDisposition + ) TAO_NAMESPACE_END -TAO_NAMESPACE_TYPE (const CORBA::Short) + +// TAO_IDL - Generated from +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_typecode/typecode_defn.cpp:284 + +static const CORBA::Long _oc_GIOP_Version[] = +{ + TAO_ENCAP_BYTE_ORDER, // byte order + 29, + ACE_NTOHL (0x49444c3a), + ACE_NTOHL (0x6f6d672e), + ACE_NTOHL (0x6f72672f), + ACE_NTOHL (0x47494f50), + ACE_NTOHL (0x2f566572), + ACE_NTOHL (0x73696f6e), + ACE_NTOHL (0x3a312e30), + ACE_NTOHL (0x0), // repository ID = IDL:omg.org/GIOP/Version:1.0 + 8, + ACE_NTOHL (0x56657273), + ACE_NTOHL (0x696f6e00), // name = Version + 2, // member count + 6, + ACE_NTOHL (0x6d616a6f), + ACE_NTOHL (0x72000000), // name = major + CORBA::tk_octet, + + 6, + ACE_NTOHL (0x6d696e6f), + ACE_NTOHL (0x72000000), // name = minor + CORBA::tk_octet, + +}; + +static CORBA::TypeCode _tc_TAO_tc_GIOP_Version ( + CORBA::tk_struct, + sizeof (_oc_GIOP_Version), + (char *) &_oc_GIOP_Version, + 0, + sizeof (GIOP::Version) + ); + +TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr) TAO_NAMESPACE_BEGIN (GIOP) -TAO_NAMESPACE_DEFINE (const CORBA::Short, ReferenceAddr, 2) +TAO_NAMESPACE_DEFINE ( + ::CORBA::TypeCode_ptr, + _tc_Version, + &_tc_TAO_tc_GIOP_Version + ) TAO_NAMESPACE_END + +// TAO_IDL - Generated from +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_structure/structure_cs.cpp:67 + +void GIOP::Version::_tao_any_destructor (void *_tao_void_pointer) +{ + Version *tmp = ACE_static_cast (Version*, _tao_void_pointer); + delete tmp; +} + +// TAO_IDL - Generated from +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_typecode/typecode_defn.cpp:284 + static const CORBA::Long _oc_GIOP_IORAddressingInfo[] = { - TAO_ENCAP_BYTE_ORDER, // byte order - 39, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x47494f50), ACE_NTOHL (0x2f494f52), ACE_NTOHL (0x41646472), ACE_NTOHL (0x65737369), ACE_NTOHL (0x6e67496e), ACE_NTOHL (0x666f3a31), ACE_NTOHL (0x2e300000), // repository ID = IDL:omg.org/GIOP/IORAddressingInfo:1.0 - 18, ACE_NTOHL (0x494f5241), ACE_NTOHL (0x64647265), ACE_NTOHL (0x7373696e), ACE_NTOHL (0x67496e66), ACE_NTOHL (0x6f000000), // name = IORAddressingInfo + TAO_ENCAP_BYTE_ORDER, // byte order + 39, + ACE_NTOHL (0x49444c3a), + ACE_NTOHL (0x6f6d672e), + ACE_NTOHL (0x6f72672f), + ACE_NTOHL (0x47494f50), + ACE_NTOHL (0x2f494f52), + ACE_NTOHL (0x41646472), + ACE_NTOHL (0x65737369), + ACE_NTOHL (0x6e67496e), + ACE_NTOHL (0x666f3a31), + ACE_NTOHL (0x2e300000), // repository ID = IDL:omg.org/GIOP/IORAddressingInfo:1.0 + 18, + ACE_NTOHL (0x494f5241), + ACE_NTOHL (0x64647265), + ACE_NTOHL (0x7373696e), + ACE_NTOHL (0x67496e66), + ACE_NTOHL (0x6f000000), // name = IORAddressingInfo 2, // member count - 23, ACE_NTOHL (0x73656c65), ACE_NTOHL (0x63746564), ACE_NTOHL (0x5f70726f), ACE_NTOHL (0x66696c65), ACE_NTOHL (0x5f696e64), ACE_NTOHL (0x65780000), // name = selected_profile_index - CORBA::tk_ulong, + 23, + ACE_NTOHL (0x73656c65), + ACE_NTOHL (0x63746564), + ACE_NTOHL (0x5f70726f), + ACE_NTOHL (0x66696c65), + ACE_NTOHL (0x5f696e64), + ACE_NTOHL (0x65780000), // name = selected_profile_index + CORBA::tk_ulong, - 4, ACE_NTOHL (0x696f7200), // name = ior - CORBA::tk_struct, // typecode kind + 4, + ACE_NTOHL (0x696f7200), // name = ior + CORBA::tk_struct, // typecode kind 288, // encapsulation length TAO_ENCAP_BYTE_ORDER, // byte order - 24, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x494f502f), ACE_NTOHL (0x494f523a), ACE_NTOHL (0x312e3000), // repository ID = IDL:omg.org/IOP/IOR:1.0 - 4, ACE_NTOHL (0x494f5200), // name = IOR + 24, + ACE_NTOHL (0x49444c3a), + ACE_NTOHL (0x6f6d672e), + ACE_NTOHL (0x6f72672f), + ACE_NTOHL (0x494f502f), + ACE_NTOHL (0x494f523a), + ACE_NTOHL (0x312e3000), // repository ID = IDL:omg.org/IOP/IOR:1.0 + 4, + ACE_NTOHL (0x494f5200), // name = IOR 2, // member count - 8, ACE_NTOHL (0x74797065), ACE_NTOHL (0x5f696400), // name = type_id - CORBA::tk_string, + 8, + ACE_NTOHL (0x74797065), + ACE_NTOHL (0x5f696400), // name = type_id + CORBA::tk_string, 0U, // string length - 9, ACE_NTOHL (0x70726f66), ACE_NTOHL (0x696c6573), ACE_NTOHL (0x0), // name = profiles - CORBA::tk_sequence, // typecode kind + 9, + ACE_NTOHL (0x70726f66), + ACE_NTOHL (0x696c6573), + ACE_NTOHL (0x0), // name = profiles + 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 - 34, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x494f502f), ACE_NTOHL (0x54616767), ACE_NTOHL (0x65645072), ACE_NTOHL (0x6f66696c), ACE_NTOHL (0x653a312e), ACE_NTOHL (0x30000000), // repository ID = IDL:omg.org/IOP/TaggedProfile:1.0 - 14, ACE_NTOHL (0x54616767), ACE_NTOHL (0x65645072), ACE_NTOHL (0x6f66696c), ACE_NTOHL (0x65000000), // name = TaggedProfile + 34, + ACE_NTOHL (0x49444c3a), + ACE_NTOHL (0x6f6d672e), + ACE_NTOHL (0x6f72672f), + ACE_NTOHL (0x494f502f), + ACE_NTOHL (0x54616767), + ACE_NTOHL (0x65645072), + ACE_NTOHL (0x6f66696c), + ACE_NTOHL (0x653a312e), + ACE_NTOHL (0x30000000), // repository ID = IDL:omg.org/IOP/TaggedProfile:1.0 + 14, + ACE_NTOHL (0x54616767), + ACE_NTOHL (0x65645072), + ACE_NTOHL (0x6f66696c), + ACE_NTOHL (0x65000000), // name = TaggedProfile 2, // member count - 4, ACE_NTOHL (0x74616700), // name = tag - CORBA::tk_alias, // typecode kind for typedefs + 4, + ACE_NTOHL (0x74616700), // name = tag + CORBA::tk_alias, // typecode kind for typedefs 60, // encapsulation length TAO_ENCAP_BYTE_ORDER, // byte order - 30, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x494f502f), ACE_NTOHL (0x50726f66), ACE_NTOHL (0x696c6549), ACE_NTOHL (0x643a312e), ACE_NTOHL (0x30000000), // repository ID = IDL:omg.org/IOP/ProfileId:1.0 - 10, ACE_NTOHL (0x50726f66), ACE_NTOHL (0x696c6549), ACE_NTOHL (0x64000000), // name = ProfileId - CORBA::tk_ulong, - - - 13, ACE_NTOHL (0x70726f66), ACE_NTOHL (0x696c655f), ACE_NTOHL (0x64617461), ACE_NTOHL (0x0), // name = profile_data - CORBA::tk_sequence, // typecode kind + 30, + ACE_NTOHL (0x49444c3a), + ACE_NTOHL (0x6f6d672e), + ACE_NTOHL (0x6f72672f), + ACE_NTOHL (0x494f502f), + ACE_NTOHL (0x50726f66), + ACE_NTOHL (0x696c6549), + ACE_NTOHL (0x643a312e), + ACE_NTOHL (0x30000000), // repository ID = IDL:omg.org/IOP/ProfileId:1.0 + 10, + ACE_NTOHL (0x50726f66), + ACE_NTOHL (0x696c6549), + ACE_NTOHL (0x64000000), // name = ProfileId + CORBA::tk_ulong, + + + 13, + ACE_NTOHL (0x70726f66), + ACE_NTOHL (0x696c655f), + ACE_NTOHL (0x64617461), + ACE_NTOHL (0x0), // name = profile_data + CORBA::tk_sequence, // typecode kind 12, // encapsulation length TAO_ENCAP_BYTE_ORDER, // byte order CORBA::tk_octet, @@ -103,51 +273,91 @@ static const CORBA::Long _oc_GIOP_IORAddressingInfo[] = }; -static CORBA::TypeCode _tc_TAO_tc_GIOP_IORAddressingInfo (CORBA::tk_struct, sizeof (_oc_GIOP_IORAddressingInfo), (char *) &_oc_GIOP_IORAddressingInfo, 0, sizeof (GIOP::IORAddressingInfo)); + +static CORBA::TypeCode _tc_TAO_tc_GIOP_IORAddressingInfo ( + CORBA::tk_struct, + sizeof (_oc_GIOP_IORAddressingInfo), + (char *) &_oc_GIOP_IORAddressingInfo, + 0, + sizeof (GIOP::IORAddressingInfo) + ); + TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr) TAO_NAMESPACE_BEGIN (GIOP) -TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_IORAddressingInfo, &_tc_TAO_tc_GIOP_IORAddressingInfo) +TAO_NAMESPACE_DEFINE ( + ::CORBA::TypeCode_ptr, + _tc_IORAddressingInfo, + &_tc_TAO_tc_GIOP_IORAddressingInfo + ) TAO_NAMESPACE_END -// ************************************************************* -// Operations for union GIOP::TargetAddress -// ************************************************************* +// TAO_IDL - Generated from +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_structure/structure_cs.cpp:67 + +void GIOP::IORAddressingInfo::_tao_any_destructor (void *_tao_void_pointer) +{ + IORAddressingInfo *tmp = ACE_static_cast (IORAddressingInfo*, _tao_void_pointer); + delete tmp; +} + +// TAO_IDL - Generated from +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_union/union_cs.cpp:92 -// default constructor GIOP::TargetAddress::TargetAddress (void) { ACE_OS::memset (&this->disc_, 0, sizeof (this->disc_)); ACE_OS::memset (&this->u_, 0, sizeof (this->u_)); + this->disc_ = 0; } -// copy constructor -GIOP::TargetAddress::TargetAddress (const GIOP::TargetAddress &u) +GIOP::TargetAddress::TargetAddress (const ::GIOP::TargetAddress &u) { this->disc_ = u.disc_; switch (this->disc_) { case 0: { - ACE_NEW ( - this->u_.object_key_, - TAO_ObjectKey (*u.u_.object_key_) - ); + if (u.u_.object_key_ == 0) + { + this->u_.object_key_ = 0; + } + else + { + ACE_NEW ( + this->u_.object_key_, + TAO::ObjectKey (*u.u_.object_key_) + ); + } } break; case 1: { - ACE_NEW ( - this->u_.profile_, - IOP::TaggedProfile (*u.u_.profile_) - ); + if (u.u_.profile_ == 0) + { + this->u_.profile_ = 0; + } + else + { + ACE_NEW ( + this->u_.profile_, + IOP::TaggedProfile (*u.u_.profile_) + ); + } } break; case 2: { - ACE_NEW ( - this->u_.ior_, - GIOP::IORAddressingInfo (*u.u_.ior_) - ); + if (u.u_.ior_ == 0) + { + this->u_.ior_ = 0; + } + else + { + ACE_NEW ( + this->u_.ior_, + GIOP::IORAddressingInfo (*u.u_.ior_) + ); + } } break; default: @@ -155,48 +365,87 @@ GIOP::TargetAddress::TargetAddress (const GIOP::TargetAddress &u) } } -// assignment operator +GIOP::TargetAddress::~TargetAddress (void) +{ + // Finalize. + this->_reset (this->disc_, 1); +} + +void GIOP::TargetAddress::_tao_any_destructor (void *_tao_void_pointer) +{ + TargetAddress *tmp = ACE_static_cast (TargetAddress*, _tao_void_pointer); + delete tmp; +} + GIOP::TargetAddress & -GIOP::TargetAddress::operator= (const GIOP::TargetAddress &u) +GIOP::TargetAddress::operator= (const ::GIOP::TargetAddress &u) { + if (&u == this) + { + return *this; + } + this->_reset (u.disc_, 0); this->disc_ = u.disc_; + switch (this->disc_) { case 0: { - ACE_NEW_RETURN ( - this->u_.object_key_, - TAO_ObjectKey (*u.u_.object_key_), - *this - ); + if (u.u_.object_key_ == 0) + { + this->u_.object_key_ = 0; + } + else + { + ACE_NEW_RETURN ( + this->u_.object_key_, + TAO::ObjectKey (*u.u_.object_key_), + *this + ); + } } break; case 1: { - ACE_NEW_RETURN ( - this->u_.profile_, - IOP::TaggedProfile (*u.u_.profile_), - *this - ); + if (u.u_.profile_ == 0) + { + this->u_.profile_ = 0; + } + else + { + ACE_NEW_RETURN ( + this->u_.profile_, + IOP::TaggedProfile (*u.u_.profile_), + *this + ); + } } break; case 2: { - ACE_NEW_RETURN ( - this->u_.ior_, - GIOP::IORAddressingInfo (*u.u_.ior_), - *this - ); + if (u.u_.ior_ == 0) + { + this->u_.ior_ = 0; + } + else + { + ACE_NEW_RETURN ( + this->u_.ior_, + GIOP::IORAddressingInfo (*u.u_.ior_), + *this + ); + } } break; default: break; } -return *this; + + return *this; } -// reset method to reset old values of a union +// Reset method to reset old values of a union. void GIOP::TargetAddress::_reset (CORBA::Short, CORBA::Boolean /*finalize*/) { switch (this->disc_) @@ -218,18 +467,37 @@ void GIOP::TargetAddress::_reset (CORBA::Short, CORBA::Boolean /*finalize*/) } } +// TAO_IDL - Generated from +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_typecode/typecode_defn.cpp:284 + static const CORBA::Long _oc_GIOP_TargetAddress[] = { - TAO_ENCAP_BYTE_ORDER, // byte order - 35, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x47494f50), ACE_NTOHL (0x2f546172), ACE_NTOHL (0x67657441), ACE_NTOHL (0x64647265), ACE_NTOHL (0x73733a31), ACE_NTOHL (0x2e300000), // repository ID = IDL:omg.org/GIOP/TargetAddress:1.0 - 14, ACE_NTOHL (0x54617267), ACE_NTOHL (0x65744164), ACE_NTOHL (0x64726573), ACE_NTOHL (0x73000000), // name = TargetAddress - CORBA::tk_short, - - -1, // default used index + TAO_ENCAP_BYTE_ORDER, // byte order + 35, + ACE_NTOHL (0x49444c3a), + ACE_NTOHL (0x6f6d672e), + ACE_NTOHL (0x6f72672f), + ACE_NTOHL (0x47494f50), + ACE_NTOHL (0x2f546172), + ACE_NTOHL (0x67657441), + ACE_NTOHL (0x64647265), + ACE_NTOHL (0x73733a31), + ACE_NTOHL (0x2e300000), // repository ID = IDL:omg.org/GIOP/TargetAddress:1.0 + 14, + ACE_NTOHL (0x54617267), + ACE_NTOHL (0x65744164), + ACE_NTOHL (0x64726573), + ACE_NTOHL (0x73000000), // name = TargetAddress + CORBA::tk_short, + +-1, // default used index 3, // member count - ACE_IDL_NSTOHL (0x0000), // union case label (evaluated value) - 11, ACE_NTOHL (0x6f626a65), ACE_NTOHL (0x63745f6b), ACE_NTOHL (0x65790000), // name = object_key - CORBA::tk_sequence, // typecode kind + ACE_IDL_NSTOHL (0x0000), // union case label (evaluated value) + 11, + ACE_NTOHL (0x6f626a65), + ACE_NTOHL (0x63745f6b), + ACE_NTOHL (0x65790000), // name = object_key + CORBA::tk_sequence, // typecode kind 12, // encapsulation length TAO_ENCAP_BYTE_ORDER, // byte order CORBA::tk_octet, @@ -237,24 +505,55 @@ static const CORBA::Long _oc_GIOP_TargetAddress[] = 0U, ACE_IDL_NSTOHL (0x0001), // union case label (evaluated value) - 8, ACE_NTOHL (0x70726f66), ACE_NTOHL (0x696c6500), // name = profile - CORBA::tk_struct, // typecode kind + 8, + ACE_NTOHL (0x70726f66), + ACE_NTOHL (0x696c6500), // name = profile + CORBA::tk_struct, // typecode kind 184, // encapsulation length TAO_ENCAP_BYTE_ORDER, // byte order - 34, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x494f502f), ACE_NTOHL (0x54616767), ACE_NTOHL (0x65645072), ACE_NTOHL (0x6f66696c), ACE_NTOHL (0x653a312e), ACE_NTOHL (0x30000000), // repository ID = IDL:omg.org/IOP/TaggedProfile:1.0 - 14, ACE_NTOHL (0x54616767), ACE_NTOHL (0x65645072), ACE_NTOHL (0x6f66696c), ACE_NTOHL (0x65000000), // name = TaggedProfile + 34, + ACE_NTOHL (0x49444c3a), + ACE_NTOHL (0x6f6d672e), + ACE_NTOHL (0x6f72672f), + ACE_NTOHL (0x494f502f), + ACE_NTOHL (0x54616767), + ACE_NTOHL (0x65645072), + ACE_NTOHL (0x6f66696c), + ACE_NTOHL (0x653a312e), + ACE_NTOHL (0x30000000), // repository ID = IDL:omg.org/IOP/TaggedProfile:1.0 + 14, + ACE_NTOHL (0x54616767), + ACE_NTOHL (0x65645072), + ACE_NTOHL (0x6f66696c), + ACE_NTOHL (0x65000000), // name = TaggedProfile 2, // member count - 4, ACE_NTOHL (0x74616700), // name = tag - CORBA::tk_alias, // typecode kind for typedefs + 4, + ACE_NTOHL (0x74616700), // name = tag + CORBA::tk_alias, // typecode kind for typedefs 60, // encapsulation length TAO_ENCAP_BYTE_ORDER, // byte order - 30, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x494f502f), ACE_NTOHL (0x50726f66), ACE_NTOHL (0x696c6549), ACE_NTOHL (0x643a312e), ACE_NTOHL (0x30000000), // repository ID = IDL:omg.org/IOP/ProfileId:1.0 - 10, ACE_NTOHL (0x50726f66), ACE_NTOHL (0x696c6549), ACE_NTOHL (0x64000000), // name = ProfileId - CORBA::tk_ulong, + 30, + ACE_NTOHL (0x49444c3a), + ACE_NTOHL (0x6f6d672e), + ACE_NTOHL (0x6f72672f), + ACE_NTOHL (0x494f502f), + ACE_NTOHL (0x50726f66), + ACE_NTOHL (0x696c6549), + ACE_NTOHL (0x643a312e), + ACE_NTOHL (0x30000000), // repository ID = IDL:omg.org/IOP/ProfileId:1.0 + 10, + ACE_NTOHL (0x50726f66), + ACE_NTOHL (0x696c6549), + ACE_NTOHL (0x64000000), // name = ProfileId + CORBA::tk_ulong, - 13, ACE_NTOHL (0x70726f66), ACE_NTOHL (0x696c655f), ACE_NTOHL (0x64617461), ACE_NTOHL (0x0), // name = profile_data - CORBA::tk_sequence, // typecode kind + 13, + ACE_NTOHL (0x70726f66), + ACE_NTOHL (0x696c655f), + ACE_NTOHL (0x64617461), + ACE_NTOHL (0x0), // name = profile_data + CORBA::tk_sequence, // typecode kind 12, // encapsulation length TAO_ENCAP_BYTE_ORDER, // byte order CORBA::tk_octet, @@ -263,301 +562,375 @@ static const CORBA::Long _oc_GIOP_TargetAddress[] = ACE_IDL_NSTOHL (0x0002), // union case label (evaluated value) - 4, ACE_NTOHL (0x696f7200), // name = ior - CORBA::tk_struct, // typecode kind - 412, // encapsulation length + 4, + ACE_NTOHL (0x696f7200), // name = ior + CORBA::tk_struct, // typecode kind + 228, // encapsulation length TAO_ENCAP_BYTE_ORDER, // byte order - 39, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x47494f50), ACE_NTOHL (0x2f494f52), ACE_NTOHL (0x41646472), ACE_NTOHL (0x65737369), ACE_NTOHL (0x6e67496e), ACE_NTOHL (0x666f3a31), ACE_NTOHL (0x2e300000), // repository ID = IDL:omg.org/GIOP/IORAddressingInfo:1.0 - 18, ACE_NTOHL (0x494f5241), ACE_NTOHL (0x64647265), ACE_NTOHL (0x7373696e), ACE_NTOHL (0x67496e66), ACE_NTOHL (0x6f000000), // name = IORAddressingInfo + 39, + ACE_NTOHL (0x49444c3a), + ACE_NTOHL (0x6f6d672e), + ACE_NTOHL (0x6f72672f), + ACE_NTOHL (0x47494f50), + ACE_NTOHL (0x2f494f52), + ACE_NTOHL (0x41646472), + ACE_NTOHL (0x65737369), + ACE_NTOHL (0x6e67496e), + ACE_NTOHL (0x666f3a31), + ACE_NTOHL (0x2e300000), // repository ID = IDL:omg.org/GIOP/IORAddressingInfo:1.0 + 18, + ACE_NTOHL (0x494f5241), + ACE_NTOHL (0x64647265), + ACE_NTOHL (0x7373696e), + ACE_NTOHL (0x67496e66), + ACE_NTOHL (0x6f000000), // name = IORAddressingInfo 2, // member count - 23, ACE_NTOHL (0x73656c65), ACE_NTOHL (0x63746564), ACE_NTOHL (0x5f70726f), ACE_NTOHL (0x66696c65), ACE_NTOHL (0x5f696e64), ACE_NTOHL (0x65780000), // name = selected_profile_index - CORBA::tk_ulong, - - 4, ACE_NTOHL (0x696f7200), // name = ior - CORBA::tk_struct, // typecode kind - 288, // encapsulation length + 23, + ACE_NTOHL (0x73656c65), + ACE_NTOHL (0x63746564), + ACE_NTOHL (0x5f70726f), + ACE_NTOHL (0x66696c65), + ACE_NTOHL (0x5f696e64), + ACE_NTOHL (0x65780000), // name = selected_profile_index + CORBA::tk_ulong, + + 4, + ACE_NTOHL (0x696f7200), // name = ior + CORBA::tk_struct, // typecode kind + 104, // encapsulation length TAO_ENCAP_BYTE_ORDER, // byte order - 24, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x494f502f), ACE_NTOHL (0x494f523a), ACE_NTOHL (0x312e3000), // repository ID = IDL:omg.org/IOP/IOR:1.0 - 4, ACE_NTOHL (0x494f5200), // name = IOR + 24, + ACE_NTOHL (0x49444c3a), + ACE_NTOHL (0x6f6d672e), + ACE_NTOHL (0x6f72672f), + ACE_NTOHL (0x494f502f), + ACE_NTOHL (0x494f523a), + ACE_NTOHL (0x312e3000), // repository ID = IDL:omg.org/IOP/IOR:1.0 + 4, + ACE_NTOHL (0x494f5200), // name = IOR 2, // member count - 8, ACE_NTOHL (0x74797065), ACE_NTOHL (0x5f696400), // name = type_id - CORBA::tk_string, + 8, + ACE_NTOHL (0x74797065), + ACE_NTOHL (0x5f696400), // name = type_id + CORBA::tk_string, 0U, // string length - 9, ACE_NTOHL (0x70726f66), ACE_NTOHL (0x696c6573), ACE_NTOHL (0x0), // name = profiles - CORBA::tk_sequence, // typecode kind - 200, // encapsulation length + 9, + ACE_NTOHL (0x70726f66), + ACE_NTOHL (0x696c6573), + ACE_NTOHL (0x0), // name = profiles + CORBA::tk_sequence, // typecode kind + 16, // encapsulation length TAO_ENCAP_BYTE_ORDER, // byte order - CORBA::tk_struct, // typecode kind - 184, // encapsulation length - TAO_ENCAP_BYTE_ORDER, // byte order - 34, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x494f502f), ACE_NTOHL (0x54616767), ACE_NTOHL (0x65645072), ACE_NTOHL (0x6f66696c), ACE_NTOHL (0x653a312e), ACE_NTOHL (0x30000000), // repository ID = IDL:omg.org/IOP/TaggedProfile:1.0 - 14, ACE_NTOHL (0x54616767), ACE_NTOHL (0x65645072), ACE_NTOHL (0x6f66696c), ACE_NTOHL (0x65000000), // name = TaggedProfile - 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 - 30, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x494f502f), ACE_NTOHL (0x50726f66), ACE_NTOHL (0x696c6549), ACE_NTOHL (0x643a312e), ACE_NTOHL (0x30000000), // repository ID = IDL:omg.org/IOP/ProfileId:1.0 - 10, ACE_NTOHL (0x50726f66), ACE_NTOHL (0x696c6549), ACE_NTOHL (0x64000000), // name = ProfileId - CORBA::tk_ulong, - - - 13, ACE_NTOHL (0x70726f66), ACE_NTOHL (0x696c655f), ACE_NTOHL (0x64617461), ACE_NTOHL (0x0), // name = profile_data - CORBA::tk_sequence, // typecode kind - 12, // encapsulation length - TAO_ENCAP_BYTE_ORDER, // byte order - CORBA::tk_octet, - - 0U, - - + 0xffffffff, // indirection + 0xfffffe50, // negative offset (-432) 0U, }; -static CORBA::TypeCode _tc_TAO_tc_GIOP_TargetAddress (CORBA::tk_union, sizeof (_oc_GIOP_TargetAddress), (char *) &_oc_GIOP_TargetAddress, 0, sizeof (GIOP::TargetAddress)); -TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr) -TAO_NAMESPACE_BEGIN (GIOP) -TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_TargetAddress, &_tc_TAO_tc_GIOP_TargetAddress) -TAO_NAMESPACE_END -static const CORBA::Long _oc_GIOP_Version[] = -{ - TAO_ENCAP_BYTE_ORDER, // byte order - 29, - ACE_NTOHL (0x49444c3a), - ACE_NTOHL (0x6f6d672e), - ACE_NTOHL (0x6f72672f), - ACE_NTOHL (0x47494f50), - ACE_NTOHL (0x2f566572), - ACE_NTOHL (0x73696f6e), - ACE_NTOHL (0x3a312e30), - ACE_NTOHL (0x0), // repository ID = IDL:omg.org/GIOP/Version:1.0 - 8, - ACE_NTOHL (0x56657273), - ACE_NTOHL (0x696f6e00), // name = Version - 2, // member count - 6, - ACE_NTOHL (0x6d616a6f), - ACE_NTOHL (0x72000000), // name = major - CORBA::tk_octet, - - 6, - ACE_NTOHL (0x6d696e6f), - ACE_NTOHL (0x72000000), // name = minor - CORBA::tk_octet, - -}; - -static CORBA::TypeCode _tc_TAO_tc_GIOP_Version ( - CORBA::tk_struct, - sizeof (_oc_GIOP_Version), - (char *) &_oc_GIOP_Version, +static CORBA::TypeCode _tc_TAO_tc_GIOP_TargetAddress ( + CORBA::tk_union, + sizeof (_oc_GIOP_TargetAddress), + (char *) &_oc_GIOP_TargetAddress, 0, - sizeof (GIOP::Version) + sizeof (GIOP::TargetAddress) ); TAO_NAMESPACE_TYPE (CORBA::TypeCode_ptr) TAO_NAMESPACE_BEGIN (GIOP) -TAO_NAMESPACE_DEFINE (::CORBA::TypeCode_ptr, _tc_Version, &_tc_TAO_tc_GIOP_Version) +TAO_NAMESPACE_DEFINE ( + ::CORBA::TypeCode_ptr, + _tc_TargetAddress, + &_tc_TAO_tc_GIOP_TargetAddress + ) TAO_NAMESPACE_END +// TAO_IDL - Generated from +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_structure/any_op_cs.cpp:54 -void -GIOP::IORAddressingInfo::_tao_any_destructor (void *x) +// Copying insertion. +void operator<<= ( + CORBA::Any &_tao_any, + const GIOP::Version &_tao_elem + ) { - GIOP::IORAddressingInfo *tmp = ACE_static_cast (GIOP::IORAddressingInfo*,x); - delete tmp; + TAO::Any_Dual_Impl_T<GIOP::Version>::insert_copy ( + _tao_any, + GIOP::Version::_tao_any_destructor, + GIOP::_tc_Version, + _tao_elem + ); } -void operator<<= (CORBA::Any &_tao_any, const GIOP::IORAddressingInfo &_tao_elem) // copying +// Non-copying insertion. +void operator<<= ( + CORBA::Any &_tao_any, + GIOP::Version *_tao_elem + ) { - TAO_OutputCDR stream; - stream << _tao_elem; - _tao_any._tao_replace ( - GIOP::_tc_IORAddressingInfo, - TAO_ENCAP_BYTE_ORDER, - stream.begin () + TAO::Any_Dual_Impl_T<GIOP::Version>::insert ( + _tao_any, + GIOP::Version::_tao_any_destructor, + GIOP::_tc_Version, + _tao_elem ); } -void operator<<= (CORBA::Any &_tao_any, GIOP::IORAddressingInfo *_tao_elem) // non copying +// Extraction to non-const pointer (deprecated). +CORBA::Boolean operator>>= ( + const CORBA::Any &_tao_any, + GIOP::Version *&_tao_elem + ) { - TAO_OutputCDR stream; - stream << *_tao_elem; - _tao_any._tao_replace ( - GIOP::_tc_IORAddressingInfo, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_elem, - GIOP::IORAddressingInfo::_tao_any_destructor + return _tao_any >>= ACE_const_cast ( + const GIOP::Version *&, + _tao_elem ); } -CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, GIOP::IORAddressingInfo *&_tao_elem) +// Extraction to const pointer. +CORBA::Boolean operator>>= ( + const CORBA::Any &_tao_any, + const GIOP::Version *&_tao_elem + ) { - ACE_TRY_NEW_ENV - { - CORBA::TypeCode_var type = _tao_any.type (); - CORBA::Boolean result = - type->equivalent (GIOP::_tc_IORAddressingInfo ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + return + TAO::Any_Dual_Impl_T<GIOP::Version>::extract ( + _tao_any, + GIOP::Version::_tao_any_destructor, + GIOP::_tc_Version, + _tao_elem + ); +} - if (!result) - { - _tao_elem = 0; - return 0; - } +#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ + defined (ACE_HAS_GNU_REPO) + template class TAO::Any_Dual_Impl_T<GIOP::Version>; +#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) +# pragma instantiate TAO::Any_Dual_Impl_T<GIOP::Version> +#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ - if (_tao_any.any_owns_data ()) - { - _tao_elem = (GIOP::IORAddressingInfo *)_tao_any.value (); - return 1; - } - else - { - ACE_NEW_RETURN (_tao_elem, GIOP::IORAddressingInfo, 0); - TAO_InputCDR stream ( - _tao_any._tao_get_cdr (), - _tao_any._tao_byte_order () - ); - if (stream >> *_tao_elem) - { - ((CORBA::Any *)&_tao_any)->_tao_replace ( - GIOP::_tc_IORAddressingInfo, - 1, - ACE_reinterpret_cast (void *, _tao_elem), - GIOP::IORAddressingInfo::_tao_any_destructor - ); - return 1; - } - else - { - delete _tao_elem; - _tao_elem = 0; - } - } - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - return 0; - } - ACE_ENDTRY; - return 0; +// TAO_IDL - Generated from +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_structure/any_op_cs.cpp:54 + +// Copying insertion. +void operator<<= ( + CORBA::Any &_tao_any, + const GIOP::IORAddressingInfo &_tao_elem + ) +{ + TAO::Any_Dual_Impl_T<GIOP::IORAddressingInfo>::insert_copy ( + _tao_any, + GIOP::IORAddressingInfo::_tao_any_destructor, + GIOP::_tc_IORAddressingInfo, + _tao_elem + ); } -CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const GIOP::IORAddressingInfo *&_tao_elem) +// Non-copying insertion. +void operator<<= ( + CORBA::Any &_tao_any, + GIOP::IORAddressingInfo *_tao_elem + ) { - return _tao_any >>= ACE_const_cast(GIOP::IORAddressingInfo*&,_tao_elem); + TAO::Any_Dual_Impl_T<GIOP::IORAddressingInfo>::insert ( + _tao_any, + GIOP::IORAddressingInfo::_tao_any_destructor, + GIOP::_tc_IORAddressingInfo, + _tao_elem + ); } -void -GIOP::TargetAddress::_tao_any_destructor (void *x) +// Extraction to non-const pointer (deprecated). +CORBA::Boolean operator>>= ( + const CORBA::Any &_tao_any, + GIOP::IORAddressingInfo *&_tao_elem + ) { - GIOP::TargetAddress *tmp = ACE_static_cast (GIOP::TargetAddress*,x); - delete tmp; + return _tao_any >>= ACE_const_cast ( + const GIOP::IORAddressingInfo *&, + _tao_elem + ); } +// Extraction to const pointer. +CORBA::Boolean operator>>= ( + const CORBA::Any &_tao_any, + const GIOP::IORAddressingInfo *&_tao_elem + ) +{ + return + TAO::Any_Dual_Impl_T<GIOP::IORAddressingInfo>::extract ( + _tao_any, + GIOP::IORAddressingInfo::_tao_any_destructor, + GIOP::_tc_IORAddressingInfo, + _tao_elem + ); +} + +#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ + defined (ACE_HAS_GNU_REPO) + template class TAO::Any_Dual_Impl_T<GIOP::IORAddressingInfo>; +#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) +# pragma instantiate TAO::Any_Dual_Impl_T<GIOP::IORAddressingInfo> +#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ + +// TAO_IDL - Generated from +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_union/any_op_cs.cpp:54 + +// Copying insertion. void operator<<= ( CORBA::Any &_tao_any, const GIOP::TargetAddress &_tao_elem ) { - TAO_OutputCDR stream; - if (stream << _tao_elem) - { - _tao_any._tao_replace ( - GIOP::_tc_TargetAddress, - TAO_ENCAP_BYTE_ORDER, - stream.begin () - ); - } + TAO::Any_Dual_Impl_T<GIOP::TargetAddress>::insert_copy ( + _tao_any, + GIOP::TargetAddress::_tao_any_destructor, + GIOP::_tc_TargetAddress, + _tao_elem + ); } +// Non-copying insertion. void operator<<= ( CORBA::Any &_tao_any, GIOP::TargetAddress *_tao_elem ) { - TAO_OutputCDR stream; - if (stream << *_tao_elem) - { - _tao_any._tao_replace ( - GIOP::_tc_TargetAddress, - TAO_ENCAP_BYTE_ORDER, - stream.begin (), - 1, - _tao_elem, - GIOP::IORAddressingInfo::_tao_any_destructor - ); - } + TAO::Any_Dual_Impl_T<GIOP::TargetAddress>::insert ( + _tao_any, + GIOP::TargetAddress::_tao_any_destructor, + GIOP::_tc_TargetAddress, + _tao_elem + ); } +// Extraction to non-const pointer (deprecated). CORBA::Boolean operator>>= ( const CORBA::Any &_tao_any, GIOP::TargetAddress *&_tao_elem ) { - ACE_TRY_NEW_ENV - { - CORBA::TypeCode_var type = _tao_any.type (); - CORBA::Boolean result = - type->equivalent (GIOP::_tc_TargetAddress ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + return _tao_any >>= ACE_const_cast ( + const GIOP::TargetAddress *&, + _tao_elem + ); +} - if (!result) - { - _tao_elem = 0; - return 0; - } +// Extraction to const pointer. +CORBA::Boolean operator>>= ( + const CORBA::Any &_tao_any, + const GIOP::TargetAddress *&_tao_elem + ) +{ + return + TAO::Any_Dual_Impl_T<GIOP::TargetAddress>::extract ( + _tao_any, + GIOP::TargetAddress::_tao_any_destructor, + GIOP::_tc_TargetAddress, + _tao_elem + ); +} - if (_tao_any.any_owns_data ()) - { - _tao_elem = (GIOP::TargetAddress *)_tao_any.value (); - return 1; - } - else - { - ACE_NEW_RETURN (_tao_elem, GIOP::TargetAddress, 0); - TAO_InputCDR stream ( - _tao_any._tao_get_cdr (), - _tao_any._tao_byte_order () - ); +#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ + defined (ACE_HAS_GNU_REPO) + template class TAO::Any_Dual_Impl_T<GIOP::TargetAddress>; +#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) +# pragma instantiate TAO::Any_Dual_Impl_T<GIOP::TargetAddress> +#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ - if (stream >> *_tao_elem) - { - ((CORBA::Any *)&_tao_any)->_tao_replace ( - GIOP::_tc_TargetAddress, - 1, - ACE_reinterpret_cast (void *, _tao_elem), - GIOP::IORAddressingInfo::_tao_any_destructor - ); - return 1; - } - else +// TAO_IDL - Generated from +// W:\ACE_wrappers\TAO\TAO_IDL\be\be_visitor_sequence/cdr_op_cs.cpp:125 + +#if !defined _TAO_CDR_OP_GIOP_TargetAddress__tao_seq_Octet_CPP_ +#define _TAO_CDR_OP_GIOP_TargetAddress__tao_seq_Octet_CPP_ + +CORBA::Boolean operator<< ( + TAO_OutputCDR &strm, + TAO::ObjectKey &_tao_sequence + ) +{ + CORBA::ULong _tao_seq_len = _tao_sequence.length (); + + if (strm << _tao_seq_len) + { + // Encode all elements. + +#if (TAO_NO_COPY_OCTET_SEQUENCES == 1) { - delete _tao_elem; - _tao_elem = 0; + TAO_Unbounded_Sequence<CORBA::Octet> *oseq = + ACE_static_cast (TAO_Unbounded_Sequence<CORBA::Octet>*, (TAO::ObjectKey *)&_tao_sequence); + if (oseq->mb ()) + return strm.write_octet_array_mb (oseq->mb ()); + else + return strm.write_octet_array (_tao_sequence.get_buffer (), _tao_sequence.length ()); } + +#else /* TAO_NO_COPY_OCTET_SEQUENCES == 0 */ + return strm.write_octet_array (_tao_sequence.get_buffer (), _tao_sequence.length ()); + +#endif /* TAO_NO_COPY_OCTET_SEQUENCES == 0 */ } - } - ACE_CATCHANY - { - delete _tao_elem; - _tao_elem = 0; - } - ACE_ENDTRY; + return 0; } -CORBA::Boolean operator>>= ( - const CORBA::Any &_tao_any, - const GIOP::TargetAddress *&_tao_elem +CORBA::Boolean operator>> ( + TAO_InputCDR &strm, + TAO::ObjectKey &_tao_sequence ) { - return _tao_any >>= ACE_const_cast (GIOP::TargetAddress*&,_tao_elem); + CORBA::ULong _tao_seq_len; + + if (strm >> _tao_seq_len) + { + // Add a check to the length of the sequence + // to make sure it does not exceed the length + // of the stream. (See bug 58.) + if (_tao_seq_len > strm.length ()) + { + return 0; + } + + // 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. + +#if (TAO_NO_COPY_OCTET_SEQUENCES == 1) + if (ACE_BIT_DISABLED (strm.start ()->flags (), + ACE_Message_Block::DONT_DELETE)) + { + TAO_ORB_Core* orb_core = strm.orb_core (); + if (orb_core != 0 && + strm.orb_core ()->resource_factory ()-> + input_cdr_allocator_type_locked () == 1) + { + TAO_Unbounded_Sequence<CORBA::Octet> *oseq = + ACE_static_cast(TAO_Unbounded_Sequence<CORBA::Octet>*, &_tao_sequence); + oseq->replace (_tao_seq_len, strm.start ()); + oseq->mb ()->wr_ptr (oseq->mb()->rd_ptr () + _tao_seq_len); + strm.skip_bytes (_tao_seq_len); + return 1; + } + } + return strm.read_octet_array (_tao_sequence.get_buffer (), _tao_seq_len); +#else /* TAO_NO_COPY_OCTET_SEQUENCES == 0 */ + return strm.read_octet_array (_tao_sequence.get_buffer (), _tao_sequence.length ()); + +#endif /* TAO_NO_COPY_OCTET_SEQUENCES == 0 */ + } + + return 0; } + +#endif /* _TAO_CDR_OP_GIOP_TargetAddress__tao_seq_Octet_CPP_ */ + |