#include <RandomAccessNullDevice.h>
Inheritance diagram for RandomAccessNullDevice:
Public Member Functions | |
RandomAccessNullDevice () | |
Creates a new null device. | |
FileSize | getSizeInBytes () |
Gets the current size of this device. | |
void | setSizeInBytes (FileSize cbNew) |
Sets the size of this device, truncating or extending the device as necessary. | |
void | transfer (RandomAccessRequest const &request) |
Synchronously reads or writes a range of bytes from the device. | |
void | prepareTransfer (RandomAccessRequest &request) |
Prepares for an asynchronous transfer by associating required information about this device (e.g. | |
void | flush () |
Forces any buffered writes to permanent storage (e.g. | |
int | getHandle () |
|
Definition at line 38 of file RandomAccessNullDevice.h.
RandomAccessNullDevice::RandomAccessNullDevice | ( | ) | [explicit] |
FileSize RandomAccessNullDevice::getSizeInBytes | ( | ) | [virtual] |
Gets the current size of this device.
Implements RandomAccessDevice.
Definition at line 33 of file RandomAccessNullDevice.cpp.
void RandomAccessNullDevice::setSizeInBytes | ( | FileSize | cbNew | ) | [virtual] |
Sets the size of this device, truncating or extending the device as necessary.
Contents of extended portion are undefined.
cbNew | new device size in bytes |
Implements RandomAccessDevice.
Definition at line 38 of file RandomAccessNullDevice.cpp.
void RandomAccessNullDevice::transfer | ( | RandomAccessRequest const & | request | ) | [virtual] |
Synchronously reads or writes a range of bytes from the device.
Never returns an error state; instead, a completion notification method is called (via RandomAccessRequestBinding::notifyTransferCompletion).
request | the encapsulated request parameters |
Implements RandomAccessDevice.
Definition at line 43 of file RandomAccessNullDevice.cpp.
void RandomAccessNullDevice::prepareTransfer | ( | RandomAccessRequest & | request | ) | [virtual] |
Prepares for an asynchronous transfer by associating required information about this device (e.g.
file handle) with the given request. The actual asynchronous transfer is initiated by a calling DeviceAccessScheduler rather than this RandomAccessDevice itself.
request | the encapsulated request parameters |
Implements RandomAccessDevice.
Definition at line 48 of file RandomAccessNullDevice.cpp.
void RandomAccessNullDevice::flush | ( | ) | [virtual] |
Forces any buffered writes to permanent storage (e.g.
fsync for a file device).
Implements RandomAccessDevice.
Definition at line 53 of file RandomAccessNullDevice.cpp.
int RandomAccessNullDevice::getHandle | ( | ) | [virtual] |
Implements RandomAccessDevice.
Definition at line 57 of file RandomAccessNullDevice.cpp.