3 Base Class

All key classes in our system are successors of one base class called TObj. This class incorporates useful features common to all classes. Namely it implements fundamental methods for:

We suggest to read an Reference Manual for detailed information on class TObj.

3.1Object Serialization

The class TObj implements serialization and deserialization methods for all basic scalar types and for arrays of basic type. The list of supported types follows:

For detailed description of de/serialization technique see Appendix A: Serialization and Deserialization.

3.2Journal Keeping

Every successor of the class TObj has simple access to the system journal file. Therefore every object in the system is enabled to announce an important change of its state or an important event. This announcement means that a text string is logged to the journal file. The name of the journal file is journal.log and it is located in the actual directory of the process that announces the event. The log of an event is realised by the method TObj::Message() with type specified as MSG_DEBUGG.

One additional action is taken whenever an event is logged by a child process. The text string is in addition send via PVM to the parent process. The parent process then logs this message to its own journal file with additional information about the origin of the message.

3.3Error Reporting

The class TObj implements a common mechanism of error reporting. This mechanism allows every successor of the class TObj to report an error. This reporting means that an error description is logged to a file failure.log. This file is located in the actual directory of the process that reports the error. The error description consists of three text strings. First is the error name and a short description. The second strings contains name of the class and method that has encountered the error. The last string contains summary values of the object's attributes.

The error reporting is realised by the method TObj::Message() with type specified as MSG_OK. The string containing the summary of attributes is generated by method TObj::Dump(). This virtual method should be overridden by every successor of the class TObj.

The error announcement mechanism includes certain additional actions. These actions depend on the type of process:

Programmer's Guide Project Antares