Public Member Functions | Protected Attributes

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_Incremental_Key_Generator::TAO_Incremental_Key_Generator ( void   ) 

Definition at line 17 of file Key_Adapters.cpp.

  : counter_ (0)
{
}


Member Function Documentation

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;
}


Member Data Documentation

Definition at line 51 of file Key_Adapters.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines