whio_dev

Not logged in

ACHTUNG: AS OF 20110523, THIS PAGE IS NOW MAINTAINED IN THE NEW WIKI: http://whiki.wanderinghorse.net/wikis/whio/?page=whio_dev

whio_dev API

whio_dev is a C struct (declared in <wh/whio/whio_dev.h>) which defines an interface for basic random-access i/o operations. It essentially defines the same functionality as are available for standard FILE handles.

whio_dev specifies only an interface, and instances of concrete implementations are created via various factory functions (declared in <wh/whio/whio_devs.h>). Probably its most useful feature is that all i/o devices are destroyed using the same interface - only their construction is type-specific. This simplifies clean-up in client code, e.g. compared to having to know whether a give FILE handle must be closed with fclose(3) or pclose(3).

Implementations are provided for the following types of i/o devices:

In principal, it is normally simple to create whio_dev implementations for any type of device which provides facilities for random access. In doing so, any generic i/o algorithms, or code which uses the whio_dev interface for its i/o, can use such client-supplied whio_dev implementations. For example, whio_epfs and whio_udb can use any compliant client-written device for their underlying storage.

See also...