next up previous contents
Next: About this document ... Up: Design Notes Previous: The cyclic log descriptor   Contents

The cyclic_log class

The only state maintained by cyclic_log objects is the CYC_fd file descriptor returned by CYC_open. This enables cyclic_log to be a very simple wrapper around the C routines.

For example, the constructors just call CYC_open, the destructor calls CYC_close. The read and write methods just call CYC_read and CYC_write respectively.

An older design of cyclic logs had the class maintaining all its own state but this was changed in order to offer a C API as an alternative.



Andrew Marlow 2004-01-01