rili::stream::ReadableFile Class Reference
Inheritance diagram for rili::stream::ReadableFile:
Collaboration diagram for rili::stream::ReadableFile:
Public Member Functions | |
ReadableFile (std::string const &file) | |
ReadableFile (std::string const &file, std::size_t preferedChunkSize) | |
virtual | ~ReadableFile () |
Public Member Functions inherited from rili::stream::ReadableFileProxy | |
ReadableFileProxy (FILE *readableFile) | |
ReadableFileProxy (FILE *readableFile, std::size_t preferedChunkSize) | |
void | consume (std::size_t size) override |
view::Base const & | readableView () const override |
std::exception_ptr | pull (std::size_t count) override |
Public Member Functions inherited from rili::stream::Readable | |
void | read (unsigned char *data, std::size_t size) |
void | read (char *data, std::size_t size) |
void | read (unsigned char &c) |
void | read (char &c) |
OperationResult | operator>> (char &v) |
OperationResult | operator>> (unsigned char &v) |
OperationResult | operator>> (short &v) |
OperationResult | operator>> (unsigned short &v) |
OperationResult | operator>> (long &v) |
OperationResult | operator>> (unsigned long &v) |
OperationResult | operator>> (long long &v) |
OperationResult | operator>> (unsigned long long &v) |
OperationResult | operator>> (int &v) |
OperationResult | operator>> (unsigned int &v) |
OperationResult | operator>> (float &v) |
OperationResult | operator>> (double &v) |
OperationResult | operator>> (bool &v) |
OperationResult | operator>> (void *&v) |
OperationResult | operator>> (std::string &v) |
OperationResult | operator>> (Reader const &fn) |
Constructor & Destructor Documentation
|
inlineexplicit |
ReadableFile try open file from given path in "rb" mode and construct stream with prefferedChunkSize = 1024.
- Parameters
-
file - path of file to open
- See also
- fopen
|
inline |
ReadableFile try open file from given path in "rb" mode and construct stream.
- Parameters
-
file - path of file to open preferedChunkSize - number of bytes which will be tried to fetch at one shot from file if other size not explicitely asked for pull(std::size_t count) method. In case of unreliable/unpredictiable blocking data sources it's better to keep it relatively small. Otherwise read operation will block until whole chunk is avaliable even if higher level Reader do not need whole chun. For reliable data sources like normal files bigger values will benefit in better preformance.
- See also
- fopen
|
virtual |
~ReadableFile will close managed file if it's open
The documentation for this class was generated from the following file:
- rili/stream/CstdioWrappers.hpp