Main Page | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members | Related Pages

LOW_objectIDFactory Class Reference

Factory class for individual object IDs. More...

#include <LOW_objectIDFactory.h>

Collaboration diagram for LOW_objectIDFactory:

Collaboration graph
[legend]
List of all members.

Public Types

typedef uint32_t objectID_t
 object ID type


Static Public Member Functions

objectID_t getNewObjectID ()
 Get a new unique object ID.


Static Protected Attributes

LOW_thread_rwlock__staticSyncRwlockSingleton = 0
LOW_platformMiscFactory::threadIdent_t __writeLockHolder = 0

Private Member Functions

 LOW_objectIDFactory ()
 Default constructor.

 ~LOW_objectIDFactory ()
 Destructor.


Static Private Attributes

objectID_t objIDCounter = 0
 Counter to get unique object IDs, incremented on instance creation to get individual IDs.


Detailed Description

Factory class for individual object IDs.

This class is thread-safe.

Author:
Harald Roelle

Definition at line 32 of file LOW_objectIDFactory.h.


Member Typedef Documentation

typedef uint32_t LOW_objectIDFactory::objectID_t
 

object ID type

Definition at line 42 of file LOW_objectIDFactory.h.

Referenced by getNewObjectID().


Constructor & Destructor Documentation

LOW_objectIDFactory::LOW_objectIDFactory  )  [private]
 

Default constructor.

It is private to prevent creating objects from this class as this is a static factory.

Definition at line 38 of file LOW_objectIDFactory.cpp.

LOW_objectIDFactory::~LOW_objectIDFactory  )  [private]
 

Destructor.

It is private to prevent creating objects from this class as this is a static factory.

Definition at line 43 of file LOW_objectIDFactory.cpp.


Member Function Documentation

LOW_objectIDFactory::objectID_t LOW_objectIDFactory::getNewObjectID  )  [static]
 

Get a new unique object ID.

To be precise, the ID is pseudo unique as a simple counter increment is used.

Returns:
A new unique object ID.

Definition at line 54 of file LOW_objectIDFactory.cpp.

References __LOW_SYNCHRONIZE_STATIC_WRITE__, objectID_t, and objIDCounter.


Member Data Documentation

LOW_thread_rwlock * LOW_objectIDFactory::__staticSyncRwlockSingleton = 0 [static, protected]
 

Definition at line 27 of file LOW_objectIDFactory.cpp.

LOW_platformMiscFactory::threadIdent_t LOW_objectIDFactory::__writeLockHolder = 0 [static, protected]
 

Definition at line 27 of file LOW_objectIDFactory.cpp.

LOW_objectIDFactory::objectID_t LOW_objectIDFactory::objIDCounter = 0 [static, private]
 

Counter to get unique object IDs, incremented on instance creation to get individual IDs.

Definition at line 29 of file LOW_objectIDFactory.cpp.

Referenced by getNewObjectID().


The documentation for this class was generated from the following files:
Generated on Tue Feb 3 11:31:03 2004 for OneWireLibrary++ by doxygen 1.3.2