Go to the first, previous, next, last section, table of contents.


PObjectID -- ID-Managment for persistent Objects

SYNOPSIS

#include <CNCL/PObjectID.h>

TYPE

BASE CLASSES

None

DERIVED CLASSES

all persistent classes and extensions

RELATED CLASSES

None

DESCRIPTION

This class manages the (unique) identification number of each persistent object. All persistent classes must be derived from this class. As CNPObjectID is not derived from any CNCL-class multiple inheritance can be used.

One of the member variables, declared as static, is the counter for the actual id. It is increased whenever a new id is given to an object. The other one is the id of the object itself. This number cannot occur two times inside of one program.

Constructors:

CNPObjectID();
Initializes the id and increases the static counter. This constructor must be called in all constructors of the derived classes.


Additional types provided by CNReaderTbl are:

typedef long PID
For a possible future change from long to any other larger number this typedef has been included.

CNPObjectID provides the following functions:

CNPID object_id();
Returns the object id.


Go to the first, previous, next, last section, table of contents.