|
MeVisLab Toolbox Reference
|
Implements reading and writing from a given file descriptor. More...
#include <mlImageFormatFileAccess.h>
Public Member Functions | |
| MLImageFormatDiskFileHandle (int fd) | |
| Standard constructor. | |
| ~MLImageFormatDiskFileHandle () override | |
| Destructor to clean up. | |
| bool | read (MLuint8 *data, MLuint startPosition, MLuint numBytes) override |
Reads the given block and returns true if numBytes have been read. | |
| MLErrorCode | write (MLuint startPos, const MLuint8 *data, size_t length) override |
| Writes the given block. | |
| MLint64 | getFileSize () override |
| Returns the current complete file size. If an error occurs, a value <0 is returned. | |
| MLErrorCode | close () override |
| Closes the file. | |
Public Member Functions inherited from ml::MLImageFormatAbstractFileHandle | |
| MLImageFormatAbstractFileHandle () | |
| Standard constructor. | |
| virtual | ~MLImageFormatAbstractFileHandle () |
| Destructor to clean up. Reimplement to close the file. | |
| MLuint8 * | read (MLuint startPosition, MLuint numBytes) |
| Convenience method that reads the given block and returns an array that needs to be freed by free(). | |
Implements reading and writing from a given file descriptor.
Definition at line 55 of file mlImageFormatFileAccess.h.
| ml::MLImageFormatDiskFileHandle::MLImageFormatDiskFileHandle | ( | int | fd | ) |
Standard constructor.
|
override |
Destructor to clean up.
|
overridevirtual |
Closes the file.
Implements ml::MLImageFormatAbstractFileHandle.
|
overridevirtual |
Returns the current complete file size. If an error occurs, a value <0 is returned.
Implements ml::MLImageFormatAbstractFileHandle.
|
overridevirtual |
Reads the given block and returns true if numBytes have been read.
The data pointer needs to be large enough to hold numBytes bytes.
Implements ml::MLImageFormatAbstractFileHandle.
|
overridevirtual |
Writes the given block.
Implements ml::MLImageFormatAbstractFileHandle.