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


Persistent Classes

The classes described here provide the possibility of persistent objects. As in most cases it is not necessary to have all the overhead for persistency inside of a running program, no complete new class need to be designed if persistency is needed. It is sufficient to add an extension to a CNCL-kompatible class where all necessary methods are included.

To generate new persistent classes or extensions, derived from any CNCL compatible class, the utility CNpersistent is provided. It generates a class framework with all functions required by CNCL and all necesarry methods for persistency.

Usage:

CNpersistent[-l] [-t template-dir] basename

The required parameter basename is the name of the base class. This sript will produce the persistent extension to the mentioned base class. The result are two files in the current directory: Pbasename.h (header file) and Pbasename.c (implementation file).

The optional parameters are:

Example:

CNpersistent MyClass

creates the class/extension files PMyClass.h and PMyClass.c. MyClass and CNPObjectID will be the base classes to the new extension. The only methods that have to be defined after this are the read_from constructor and the storer-method.


NOTE:


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