Defines a key generator. More...
#include <Key_Adapters.h>
Public Member Functions | |
| TAO_Incremental_Key_Generator (void) | |
| int | operator() (PortableServer::ObjectId &id) |
Protected Attributes | |
| CORBA::ULong | counter_ |
Defines a key generator.
This class is used in adapters of maps that do not produce keys.
Definition at line 41 of file Key_Adapters.h.
| TAO_Incremental_Key_Generator::TAO_Incremental_Key_Generator | ( | void | ) |
Definition at line 17 of file Key_Adapters.cpp.
: counter_ (0) { }
| int TAO_Incremental_Key_Generator::operator() | ( | PortableServer::ObjectId & | id | ) |
Definition at line 23 of file Key_Adapters.cpp.
{
// Resize to accommodate the counter.
id.length (sizeof this->counter_);
// Add new key data.
ACE_OS::memcpy (id.get_buffer (),
&++this->counter_,
sizeof this->counter_);
// Success.
return 0;
}
CORBA::ULong TAO_Incremental_Key_Generator::counter_ [protected] |
Definition at line 51 of file Key_Adapters.h.
1.7.0