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