|
pocolog_cpp
|
#include <FileStream.hpp>
Public Member Functions | |
| FileStream () | |
| FileStream (const char *__s, std::ios_base::openmode mode) | |
| ~FileStream () | |
| bool | open (const char *fileName, std::ios_base::openmode mode) |
| void | read (char *buffer, size_t size) |
| std::streampos | tellg () |
| std::streampos | tellp () |
| std::streampos | seekg (std::streampos pos) |
| std::streampos | seekp (std::streampos pos) |
| bool | good () const |
| bool | eof () const |
| bool | fail () const |
| off_t | size () const |
| void | close () |
Reimplementation of the std::fstream class.
This implementation is buffered, meanding that the class will keep a read and a writebuffer, and only perform disc accesses if neccessary.
This reimplementation performs way better in the usecase, that seekp/seekg is called often. The std::fstream implementation discards its buffer every time seek is called, resulting in a horrible runtime performance in our usecase.
| pocolog_cpp::FileStream::FileStream | ( | ) |
| pocolog_cpp::FileStream::FileStream | ( | const char * | __s, |
| std::ios_base::openmode | mode | ||
| ) |
| pocolog_cpp::FileStream::~FileStream | ( | ) |
| void pocolog_cpp::FileStream::close | ( | ) |
|
inline |
| bool pocolog_cpp::FileStream::fail | ( | ) | const |
| bool pocolog_cpp::FileStream::good | ( | ) | const |
| bool pocolog_cpp::FileStream::open | ( | const char * | fileName, |
| std::ios_base::openmode | mode | ||
| ) |
| void pocolog_cpp::FileStream::read | ( | char * | buffer, |
| size_t | size | ||
| ) |
| std::streampos pocolog_cpp::FileStream::seekg | ( | std::streampos | pos | ) |
| std::streampos pocolog_cpp::FileStream::seekp | ( | std::streampos | pos | ) |
| off_t pocolog_cpp::FileStream::size | ( | ) | const |
| std::streampos pocolog_cpp::FileStream::tellg | ( | ) |
| std::streampos pocolog_cpp::FileStream::tellp | ( | ) |
1.8.6