Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
SequenceNumber Class Reference

Singleton for generating unique numbers. More...

#include <SequenceNumber.h>

List of all members.

Public Member Functions

unsigned long getSequenceNumber ()
virtual ~SequenceNumber ()

Static Public Member Functions

static SequenceNumbergetInstance ()

Private Member Functions

 SequenceNumber ()

Private Attributes

unsigned long m_NextValue
Mutex m_NextValueMutex

Static Private Attributes

static SequenceNumberinstance = 0

Detailed Description

Singleton for generating unique numbers.

Author:
(R5)

Definition at line 24 of file SequenceNumber.h.


Constructor & Destructor Documentation

Destructor

Definition at line 41 of file SequenceNumber.cpp.

Private default Constructor (-->Singleton)

Definition at line 27 of file SequenceNumber.cpp.


Member Function Documentation

Returns instance of the singleton

Returns:
instance of the singleton

Definition at line 18 of file SequenceNumber.cpp.

Returns system-wide unique IDs for any kind of objects which than can be distinguished. This method is protected with a mutex and thus only allows one thread at a time to enter it.

Returns:
unique ID.

Definition at line 32 of file SequenceNumber.cpp.


Member Data Documentation

SequenceNumber * SequenceNumber::instance = 0 [static, private]

Single instance of the SequenceNumber

Definition at line 57 of file SequenceNumber.h.

unsigned long SequenceNumber::m_NextValue [private]

Number, that will be the next unique ID for a new message

Definition at line 62 of file SequenceNumber.h.

Mutex which is needed for incrementing m_NextValue

Definition at line 67 of file SequenceNumber.h.


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


robbie_architecture
Author(s): Viktor Seib
autogenerated on Mon Oct 6 2014 02:53:09