TAO_Incremental_Key_Generator Class Reference

Defines a key generator. More...

#include <Key_Adapters.h>

List of all members.

Public Member Functions

 TAO_Incremental_Key_Generator (void)
int operator() (PortableServer::ObjectId &id)

Protected Attributes

CORBA::ULong counter_


Detailed Description

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.


Constructor & Destructor Documentation

TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_Incremental_Key_Generator::TAO_Incremental_Key_Generator ( void   ) 

Definition at line 17 of file Key_Adapters.cpp.

00018   : counter_ (0)
00019 {
00020 }


Member Function Documentation

int TAO_Incremental_Key_Generator::operator() ( PortableServer::ObjectId id  ) 

Definition at line 23 of file Key_Adapters.cpp.

References ACE_OS::memcpy().

00024 {
00025   // Resize to accommodate the counter.
00026   id.length (sizeof this->counter_);
00027 
00028   // Add new key data.
00029   ACE_OS::memcpy (id.get_buffer (),
00030                   &++this->counter_,
00031                   sizeof this->counter_);
00032 
00033   // Success.
00034   return 0;
00035 }


Member Data Documentation

CORBA::ULong TAO_Incremental_Key_Generator::counter_ [protected]

Definition at line 51 of file Key_Adapters.h.


The documentation for this class was generated from the following files:
Generated on Tue Feb 2 17:41:29 2010 for TAO_PortableServer by  doxygen 1.4.7