Go to the documentation of this file.
65 size_t Read(
void* Buffer,
size_t Count)
override;
66 size_t Write(
const void* Buffer,
size_t Count)
override;
bool readLine(std::string &str)
Reads one string line from the file (until a new-line character)
TSeekOrigin
Used in CStream::Seek.
virtual ~CFileStream()
Destructor.
bool is_open()
Returns true if the file was open without errors.
This CStream derived class allow using a file as a read/write binary stream, creating it if the file ...
uint64_t Seek(int64_t off, CStream::TSeekOrigin org=sFromBeginning) override
Introduces a pure virtual method for moving to a specified position in the streamed resource.
uint64_t getPositionI()
The current Input cursor position, where 0 is the first byte.
void close()
Closes the file.
uint64_t getTotalBytesCount() const override
Returns the total amount of bytes in the stream.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
bool fileOpenCorrectly() const
Returns true if the file was open without errors.
uint64_t getPosition() const override
Method for getting the current cursor position, where 0 is the first byte and TotalBytesCount-1 the l...
bool checkEOF()
Will be true if EOF has been already reached.
size_t Read(void *Buffer, size_t Count) override
Introduces a pure virtual method responsible for reading from the stream.
uint64_t getPositionO()
The current Input cursor position, where 0 is the first byte.
int TFileOpenModes
File open modes are used in CFileStream Posible values are:
std::fstream m_f
The actual input file stream.
size_t Write(const void *Buffer, size_t Count) override
Introduces a pure virtual method responsible for writing to the stream.
unsigned __int64 uint64_t
bool open(const std::string &fileName, TFileOpenModes mode=fomRead|fomWrite)
Opens the file, returning true on success.
CFileStream()
Constructor.
void clearError()
Resets stream error status bits (e.g.
GLsizei const GLchar ** string
CFileStream & operator=(const CFileStream &)=delete
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
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 | |