MVault 1.0.0
Simple c++ database
|
A class for reading files as a stream. More...
#include <StreamFileReader.h>
Public Member Functions | |
StreamFileReader () noexcept | |
Default constructor. | |
StreamFileReader (const StreamFileReader &other) noexcept=delete | |
Copy constructor. | |
StreamFileReader (StreamFileReader &&other) noexcept=delete | |
Move constructor. | |
StreamFileReader (const std::string &fileName) noexcept | |
Constructor. | |
StreamFileReader & | operator= (const StreamFileReader &other) noexcept=delete |
Assignment operator. | |
StreamFileReader & | operator= (StreamFileReader &&other) noexcept=delete |
Move assignment operator. | |
bool | Open (const std::string &fileName) noexcept |
Method for opening the file. | |
bool | IsOpen () const noexcept |
Method for checking whether the file has been opened. | |
bool | IsEnd () const noexcept |
A method for checking if a file has been read. | |
std::size_t | GetFileSize () const noexcept |
A method for get file size. | |
std::size_t | GetCurrentPos () const noexcept |
A method for get current reading position. | |
char | GetChar () const noexcept |
Method for getting the current character. | |
char | GetNextChar () const noexcept |
Method for getting the next character. | |
bool | Move () noexcept |
A method for moving through a file. | |
void | Close () noexcept |
Method for closing a file. | |
~StreamFileReader () noexcept | |
Default destructor. | |
A class for reading files as a stream.
Small files will be fully loaded into RAM. A large file is considered to be a file larger than BIG_FILE_SIZE. Large files will be read in chunks, the size of FILE_BLOCK_SIZE. At the same time, there will be no difference in interaction for the user of the class.
|
noexcept |
Default constructor.
|
deletenoexcept |
Copy constructor.
[in] | other | object to copy |
|
deletenoexcept |
Move constructor.
[in] | other | object to move |
|
explicitnoexcept |
Constructor.
[in] | fileName | file to open |
|
noexcept |
Method for getting the current character.
|
noexcept |
A method for get current reading position.
|
noexcept |
A method for get file size.
|
noexcept |
Method for getting the next character.
|
noexcept |
A method for checking if a file has been read.
|
noexcept |
Method for checking whether the file has been opened.
|
noexcept |
A method for moving through a file.
Method for opening the file.
[in] | fileName | file to open |
|
deletenoexcept |
Assignment operator.
[in] | other | object to copy |
|
deletenoexcept |
Move assignment operator.
[in] | other | object to move |