dip.io.storage

The dip.io.storage module implements support for specific storage types.

QIODeviceStorage

class dip.io.storage.QIODeviceStorage

Base class: Model

The QIODeviceStorage class is an abstract base class for storage that is accessed via a QIODevice.

read_buffer_size = Int(16384)
The number of bytes to read at a time.
implicit_location(obj)

Return the implicit storage location for an object.

Parameter:obj – is the object to create the location for.
Returns:None as devices typically have explicit locations.
qiodevice(location)

A storage location is converted to a QIODevice instance. This must be reimplemented by a sub-class.

Parameter:location – is the storage location.
Returns:the QIODevice.
read(obj, location)

Read an object from a storage location.

Parameters:
  • obj – is the object to populate from the storage location.
  • location – is the storage location where the object is read from.
Returns:

the read object. This may be the original object populated from the storage location, or it may be a different object (of an appropriate type) created from the storage location.

write(obj, location)

Write an object to a filesystem location.

Parameters:
  • obj – is the object to write.
  • location – is the storage location where the object is written to.

Table Of Contents

Previous topic

dip.io.codecs

Next topic

dip.io.storage.filesystem

This Page