summaryrefslogtreecommitdiff
path: root/TAO/tao/Strategies/DIOP_Profile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/Strategies/DIOP_Profile.cpp')
-rw-r--r--TAO/tao/Strategies/DIOP_Profile.cpp72
1 files changed, 11 insertions, 61 deletions
diff --git a/TAO/tao/Strategies/DIOP_Profile.cpp b/TAO/tao/Strategies/DIOP_Profile.cpp
index 27c3457526f..8e1cdfdefb3 100644
--- a/TAO/tao/Strategies/DIOP_Profile.cpp
+++ b/TAO/tao/Strategies/DIOP_Profile.cpp
@@ -36,12 +36,13 @@ TAO_DIOP_Profile::TAO_DIOP_Profile (const ACE_INET_Addr &addr,
const TAO_ObjectKey &object_key,
const TAO_GIOP_Message_Version &version,
TAO_ORB_Core *orb_core)
- : TAO_Profile (TAO_TAG_UDP_PROFILE, orb_core, version),
+ : TAO_Profile (TAO_TAG_UDP_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)
{
}
@@ -51,11 +52,12 @@ TAO_DIOP_Profile::TAO_DIOP_Profile (const char* host,
const ACE_INET_Addr &addr,
const TAO_GIOP_Message_Version &version,
TAO_ORB_Core *orb_core)
- : TAO_Profile (TAO_TAG_UDP_PROFILE, orb_core, version),
+ : TAO_Profile (TAO_TAG_UDP_PROFILE,
+ orb_core,
+ object_key,
+ version),
endpoint_ (host, port, addr),
- count_ (1),
- object_key_ (object_key),
- tagged_profile_ ()
+ count_ (1)
{
}
@@ -64,9 +66,7 @@ TAO_DIOP_Profile::TAO_DIOP_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)
{
}
@@ -447,56 +447,6 @@ TAO_DIOP_Profile::encode (TAO_OutputCDR &stream) const
return 1;
}
-
-IOP::TaggedProfile &
-TAO_DIOP_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_UDP_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,
- this->orb_core ()->to_iso8859 (),
- this->orb_core ()->to_unicode ());
-
- // 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_DIOP_Profile::create_profile_body (TAO_OutputCDR &encap) const
{