#include <InstanceId.h>

Inheritance diagram for InstanceId< Class >:
Collaboration diagram for InstanceId< Class >:

Public Types

typedef unsigned int Value
 id storage type; More...
 

Public Member Functions

 InstanceId ()
 
 operator Value () const
 
bool operator== (const InstanceId &o) const
 
bool operator!= (const InstanceId &o) const
 
void change ()
 
std::ostream & print (std::ostream &) const
 prints class-pecific prefix followed by ID value; More...
 
const char * prefix () const
 returns the class-pecific prefix More...
 

Public Attributes

Value value = 0
 instance identifier More...
 

Private Member Functions

 InstanceId (const InstanceId &)
 not implemented; IDs are unique More...
 
InstanceIdoperator= (const InstanceId &)
 not implemented More...
 

Detailed Description

template<class Class>
class InstanceId< Class >

Identifier for class instances

  • unique IDs for a large number of concurrent instances, but may wrap;
  • useful for debugging and insecure request/response matching;
  • sequential IDs within a class except when wrapping;
  • always positive IDs.
    Todo:

    : add storage type parameter to support configurable Value types?

    : add creation/destruction debugging?

Definition at line 23 of file InstanceId.h.

Member Typedef Documentation

template<class Class>
typedef unsigned int InstanceId< Class >::Value
Todo:
: parameterize?

Definition at line 26 of file InstanceId.h.

Constructor & Destructor Documentation

template<class Class>
InstanceId< Class >::InstanceId ( )
inline

Definition at line 28 of file InstanceId.h.

template<class Class>
InstanceId< Class >::InstanceId ( const InstanceId< Class > &  )
private

Member Function Documentation

template<class Class>
void InstanceId< Class >::change ( )
template<class Class>
InstanceId< Class >::operator Value ( ) const
inline

Definition at line 30 of file InstanceId.h.

template<class Class>
bool InstanceId< Class >::operator!= ( const InstanceId< Class > &  o) const
inline

Definition at line 32 of file InstanceId.h.

template<class Class>
InstanceId& InstanceId< Class >::operator= ( const InstanceId< Class > &  )
private
template<class Class>
bool InstanceId< Class >::operator== ( const InstanceId< Class > &  o) const
inline

Definition at line 31 of file InstanceId.h.

template<class Class>
const char* InstanceId< Class >::prefix ( ) const
template<class Class>
std::ostream& InstanceId< Class >::print ( std::ostream &  ) const
Todo:
: use HEX for value printing?

Member Data Documentation

template<class Class>
Value InstanceId< Class >::value = 0

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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors