MeVisLab Toolbox Reference
ml::MLImageFormatDiskFileHandle Class Reference

Implements reading and writing from a given file descriptor. More...

#include <mlImageFormatFileAccess.h>

Inheritance diagram for ml::MLImageFormatDiskFileHandle:
ml::MLImageFormatAbstractFileHandle

Public Member Functions

 MLImageFormatDiskFileHandle (int fd)
 Standard constructor.
 ~MLImageFormatDiskFileHandle () override
 Destructor to clean up.
bool read (MLuint8 *data, MLuint startPosition, MLuint numBytes) override
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.
MLuint8read (MLuint startPosition, MLuint numBytes)

Detailed Description

Implements reading and writing from a given file descriptor.

Definition at line 55 of file mlImageFormatFileAccess.h.

Constructor & Destructor Documentation

◆ MLImageFormatDiskFileHandle()

ml::MLImageFormatDiskFileHandle::MLImageFormatDiskFileHandle ( int fd)

Standard constructor.

◆ ~MLImageFormatDiskFileHandle()

ml::MLImageFormatDiskFileHandle::~MLImageFormatDiskFileHandle ( )
override

Destructor to clean up.

Member Function Documentation

◆ close()

MLErrorCode ml::MLImageFormatDiskFileHandle::close ( )
overridevirtual

Closes the file.

Implements ml::MLImageFormatAbstractFileHandle.

◆ getFileSize()

MLint64 ml::MLImageFormatDiskFileHandle::getFileSize ( )
overridevirtual

Returns the current complete file size. If an error occurs, a value <0 is returned.

Implements ml::MLImageFormatAbstractFileHandle.

◆ read()

bool ml::MLImageFormatDiskFileHandle::read ( MLuint8 * data,
MLuint startPosition,
MLuint numBytes )
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.

◆ write()

MLErrorCode ml::MLImageFormatDiskFileHandle::write ( MLuint startPos,
const MLuint8 * data,
size_t length )
overridevirtual

Writes the given block.

Implements ml::MLImageFormatAbstractFileHandle.


The documentation for this class was generated from the following file: