Go to the documentation of this file.
9 #ifndef IOINTERFACEFILE_H
10 #define IOINTERFACEFILE_H
XsResultValue find(const XsByteArray &data, XsFilePos &pos)
Find a string of bytes in the file.
void gotoWrite(void)
Change from reading to writing mode.
XsResultValue closeFile(void)
Close the file.
The low-level file communication class.
XsFilePos m_fileSize
Contains the size of the file.
struct XsByteArray XsByteArray
void gotoRead(void)
Change from writing to reading mode.
XsFileHandle * m_handle
The file handlem, also indicates if the file is open or not.
XsResultValue flushData(void)
Flush all data in the buffers to and from the device.
XsResultValue close(void)
Close the file, overrides IoInterface::close().
XsFilePos m_writePos
The last write position in the file.
bool isReadOnly(void) const
Return whether the file is readonly or not.
XsTimeStamp getFileDate(void) const
Return the creation date of the file.
GLuint GLsizei GLsizei * length
XsResultValue
Xsens result values.
XsResultValue writeData(const XsByteArray &data, XsSize *written=nullptr)
Write the data contained in data to the device.
bool m_reading
Indicates whether the last operation was a read or write operation.
XsResultValue insertData(XsFilePos start, const XsByteArray &data)
Insert the given data into the file.
XsFilePos getFileSize(void) const
Return the size of the file.
XsResultValue deleteData(XsFilePos start, XsSize length)
Delete the given data from the file.
GLsizei GLsizei GLenum GLenum const GLvoid * data
XsResultValue getLastResult(void) const
Return the result code of the last operation.
XsResultValue readData(XsSize maxLength, XsByteArray &data)
Read at most maxLength bytes from the device into data.
XsString m_filename
Contains the name of the file that was last successfully opened.
XsFilePos m_readPos
The last read position in the file.
size_t XsSize
XsSize must be unsigned number!
XsResultValue create(const XsString &filename)
Create an empty file.
XsResultValue getName(XsString &filename) const
Retrieve the filename that was last successfully opened.
Class for managing timestamps in a unified way.
#define XSENS_DISABLE_COPY(className)
Add this macro to the start of a class definition to prevent automatic creation of copy functions.
An abstract IO interface.
XsFilePos getReadPosition(void) const
Return the current read position.
bool m_readOnly
Indicates if the file was opened in read-only mode.
XsResultValue open(const XsString &filename, bool createNew, bool readOnly)
Open a file.
XsResultValue readTerminatedData(XsSize maxLength, unsigned char terminator, XsByteArray &bdata)
Read data from the file and put it into the data buffer.
XsResultValue setWritePosition(XsFilePos pos=-1)
Set the new absolute write position.
bool isOpen(void) const
Return whether the file is open or not.
XsResultValue closeAndDelete(void)
Close the file and delete it.
XsResultValue setReadPosition(XsFilePos pos)
Set the new absolute read position.
XsFilePos getWritePosition(void) const
Return the current write position.
XsResultValue m_lastResult
The last result of an operation.
XsResultValue appendData(const XsByteArray &bdata)
Write data to the end of the file.
__int64 XsFilePos
The type that is used for positioning inside a file.
Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST | |