#include <Key_Adapters.h>
Public Member Functions | |
| int | encode (const PortableServer::ObjectId &original_key, const ACE_Active_Map_Manager_Key &active_key, PortableServer::ObjectId &modified_key) |
| int | decode (const PortableServer::ObjectId &modified_key, ACE_Active_Map_Manager_Key &active_key) |
| int | decode (const PortableServer::ObjectId &modified_key, PortableServer::ObjectId &original_key) |
Define the encoding and decoding methods for converting between Object Ids and active keys. This class ignores the passed to it.
Definition at line 82 of file Key_Adapters.h.
|
||||||||||||
|
Definition at line 80 of file Key_Adapters.cpp.
00082 {
00083 // Smartly copy all the data; <original_key does not own the data>.
00084 original_key.replace (modified_key.maximum (),
00085 modified_key.length (),
00086 const_cast <CORBA::Octet *>
00087 (modified_key.get_buffer ()),
00088 0);
00089
00090 // Success.
00091 return 0;
00092 }
|
|
||||||||||||
|
Definition at line 69 of file Key_Adapters.cpp. References ACE_Active_Map_Manager_Key::decode().
00071 {
00072 // Read off value of index and generation.
00073 active_key.decode (modified_key.get_buffer ());
00074
00075 // Success.
00076 return 0;
00077 }
|
|
||||||||||||||||
|
Definition at line 49 of file Key_Adapters.cpp. References ACE_Active_Map_Manager_Key::encode(), and ACE_Active_Map_Manager_Key::size().
00052 {
00053 ACE_UNUSED_ARG (original_key);
00054
00055 // Size of active key.
00056 size_t active_key_size = active_key.size ();
00057
00058 // Resize to accommodate both the original data and the new active key.
00059 modified_key.length (static_cast <CORBA::ULong> (active_key_size));
00060
00061 // Copy active key data into user key.
00062 active_key.encode (modified_key.get_buffer ());
00063
00064 // Success.
00065 return 0;
00066 }
|
1.3.6