int
TAO_No_Hint_Strategy::recover_key (const PortableServer::ObjectId &system_id,
                                   PortableServer::ObjectId &user_id)
{
  // Smartly copy all the data; <user_id does not own the data>.
  user_id.replace (system_id.maximum (),
                   system_id.length (),
                   const_cast<CORBA::Octet *> (system_id.get_buffer ()),
                   0);

  return 0;
}
Exemple #2
0
int
TAO_Ignore_Original_Key_Adapter::decode (const PortableServer::ObjectId &modified_key,
                                         PortableServer::ObjectId &original_key)
{
  // Smartly copy all the data; <original_key does not own the data>.
  original_key.replace (modified_key.maximum (),
                        modified_key.length (),
                        const_cast <CORBA::Octet *>
                                   (modified_key.get_buffer ()),
                        0);

  // Success.
  return 0;
}
Exemple #3
0
int
TAO_Preserve_Original_Key_Adapter::decode (const PortableServer::ObjectId &modified_key,
                                           PortableServer::ObjectId &original_key)
{
  // Size of active key.
  size_t const active_key_size = ACE_Active_Map_Manager_Key::size ();

  // Smartly copy all the data; <original_key does not own the data>.
  original_key.replace (static_cast <CORBA::ULong>
                            (modified_key.maximum () - active_key_size),
                        static_cast <CORBA::ULong>
                            (modified_key.length () - active_key_size),
                        const_cast <CORBA::Octet *>
                            (modified_key.get_buffer ()) + active_key_size,
                        0);

  // Success.
  return 0;
}