ACE 8.0.5
Loading...
Searching...
No Matches
ACE_Incremental_Key_Generator< T > Class Template Reference

Defines a simple incremental key generator. More...

#include <Map_T.h>

Collaboration diagram for ACE_Incremental_Key_Generator< T >:

Public Member Functions

 ACE_Incremental_Key_Generator ()=default
 Constructor.
int operator() (T &t)
 Functor method: generates a new key.
const T & current_value () const
 Returns the current value.

Protected Attributes

t_ {}
 Current value.

Detailed Description

template<class T>
class ACE_Incremental_Key_Generator< T >

Defines a simple incremental key generator.

Generates a new key of type T by incrementing current value. Requirements on T are:

  • Constructor that accepts 0 in the constructor.
  • Prefix increment.
  • Assignment. Note that a primitive types such as u_long, int, etc., are suitable for this class.

Constructor & Destructor Documentation

◆ ACE_Incremental_Key_Generator()

template<class T>
ACE_Incremental_Key_Generator< T >::ACE_Incremental_Key_Generator ( )
default

Constructor.

Member Function Documentation

◆ current_value()

template<class T>
const T & ACE_Incremental_Key_Generator< T >::current_value ( ) const
inline

Returns the current value.

◆ operator()()

template<class T>
int ACE_Incremental_Key_Generator< T >::operator() ( T & t)
inline

Functor method: generates a new key.

Member Data Documentation

◆ t_

template<class T>
T ACE_Incremental_Key_Generator< T >::t_ {}
protected

Current value.


The documentation for this class was generated from the following files: