diff options
Diffstat (limited to 'TAO/tao/Strategies/SHMIOP_Profile.cpp')
-rw-r--r-- | TAO/tao/Strategies/SHMIOP_Profile.cpp | 71 |
1 files changed, 11 insertions, 60 deletions
diff --git a/TAO/tao/Strategies/SHMIOP_Profile.cpp b/TAO/tao/Strategies/SHMIOP_Profile.cpp index 7dd536e724d..c73889d6162 100644 --- a/TAO/tao/Strategies/SHMIOP_Profile.cpp +++ b/TAO/tao/Strategies/SHMIOP_Profile.cpp @@ -1,6 +1,5 @@ // This may look like C, but it's really -*- C++ -*- // $Id$ - #include "SHMIOP_Profile.h" #if defined (TAO_HAS_SHMIOP) && (TAO_HAS_SHMIOP != 0) @@ -34,12 +33,13 @@ TAO_SHMIOP_Profile::TAO_SHMIOP_Profile (const ACE_MEM_Addr &addr, const TAO::ObjectKey &object_key, const TAO_GIOP_Message_Version &version, TAO_ORB_Core *orb_core) - : TAO_Profile (TAO_TAG_SHMEM_PROFILE, orb_core, version), + : TAO_Profile (TAO_TAG_SHMEM_PROFILE, + orb_core, + object_key, + version), endpoint_ (addr, orb_core->orb_params ()->use_dotted_decimal_addresses ()), - count_ (1), - object_key_ (object_key), - tagged_profile_ () + count_ (1) { } @@ -49,11 +49,12 @@ TAO_SHMIOP_Profile::TAO_SHMIOP_Profile (const char* host, const ACE_INET_Addr &addr, const TAO_GIOP_Message_Version &version, TAO_ORB_Core *orb_core) - : TAO_Profile (TAO_TAG_SHMEM_PROFILE, orb_core, version), + : TAO_Profile (TAO_TAG_SHMEM_PROFILE, + orb_core, + object_key, + version), endpoint_ (host, port, addr), - count_ (1), - object_key_ (object_key), - tagged_profile_ () + count_ (1) { } @@ -62,9 +63,7 @@ TAO_SHMIOP_Profile::TAO_SHMIOP_Profile (TAO_ORB_Core *orb_core) orb_core, TAO_GIOP_Message_Version (TAO_DEF_GIOP_MAJOR, TAO_DEF_GIOP_MINOR)), endpoint_ (), - count_ (1), - object_key_ (), - tagged_profile_ () + count_ (1) { } @@ -456,54 +455,6 @@ TAO_SHMIOP_Profile::encode (TAO_OutputCDR &stream) const return 1; } -IOP::TaggedProfile & -TAO_SHMIOP_Profile::create_tagged_profile (void) -{ - // Check whether we have already created the TaggedProfile - if (this->tagged_profile_.profile_data.get_buffer () == 0) - { - // As we have not created we will now create the TaggedProfile - this->tagged_profile_.tag = TAO_TAG_SHMEM_PROFILE; - - // Create the encapsulation.... - TAO_OutputCDR encap (ACE_CDR::DEFAULT_BUFSIZE, - TAO_ENCAP_BYTE_ORDER, - this->orb_core ()->output_cdr_buffer_allocator (), - this->orb_core ()->output_cdr_dblock_allocator (), - this->orb_core ()->output_cdr_msgblock_allocator (), - this->orb_core ()->orb_params ()->cdr_memcpy_tradeoff (), - TAO_DEF_GIOP_MAJOR, - TAO_DEF_GIOP_MINOR); - - // Create the profile body - this->create_profile_body (encap); - - CORBA::ULong length = - ACE_static_cast(CORBA::ULong,encap.total_length ()); - -#if (TAO_NO_COPY_OCTET_SEQUENCES == 1) - // Place the message block in to the Sequence of Octets that we - // have - this->tagged_profile_.profile_data.replace (length, - encap.begin ()); -#else - this->tagged_profile_.profile_data.length (length); - CORBA::Octet *buffer = - this->tagged_profile_.profile_data.get_buffer (); - for (const ACE_Message_Block *i = encap.begin (); - i != encap.end (); - i = i->next ()) - { - ACE_OS::memcpy (buffer, i->rd_ptr (), i->length ()); - buffer += i->length (); - } -#endif /* TAO_NO_COPY_OCTET_SEQUENCES == 1*/ - } - - return this->tagged_profile_; -} - - void TAO_SHMIOP_Profile::create_profile_body (TAO_OutputCDR &encap) const { |