|
bitrl & cuberl Documentation
Simulation engine for reinforcement learning agents
|
#include <file_reader_base.h>


Public Member Functions | |
| virtual | ~FileReaderBase ()=default |
| virtual void | open () override |
| Attempts to open the file for reading. | |
| bool | eof () const |
| Returns true if the underlying stream handler has reached the EOF. | |
Public Member Functions inherited from bitrl::utils::io::FileHandlerBase< std::ifstream > | |
| virtual | ~FileHandlerBase () |
| Constructor. | |
| FileFormats::Type | get_type () const noexcept |
| Returns the type of the file. | |
| handler_type & | get_file_stream () noexcept |
| Returns the underlying file stream. | |
| const handler_type & | get_file_stream () const noexcept |
| Returns the underlying file stream. | |
| std::string | get_filename () const noexcept |
| Returns the filename that is used to write. | |
| bool | is_open () const noexcept |
| Return true if and only if the file is open. | |
| virtual void | close () |
| Close the file. Return true if and only if the file was closed successfully false otherwise. | |
Protected Member Functions | |
| FileReaderBase (const std::string &file_name, FileFormats::Type t) | |
| Constructor. | |
Protected Member Functions inherited from bitrl::utils::io::FileHandlerBase< std::ifstream > | |
| FileHandlerBase (const std::string &file_name, FileFormats::Type t) | |
| protected Constructor so that explicit instantiation of the class fails | |
Additional Inherited Members | |
Public Types inherited from bitrl::utils::io::FileHandlerBase< std::ifstream > | |
| typedef std::ifstream | handler_type |
Protected Attributes inherited from bitrl::utils::io::FileHandlerBase< std::ifstream > | |
| std::string | file_name_ |
| The name of the file to write. | |
| const FileFormats::Type | t_ |
| The format of the file. | |
| handler_type | f_ |
| The low level file handler. | |
|
virtualdefault |
|
protected |
Constructor.
|
inline |
Returns true if the underlying stream handler has reached the EOF.
|
overridevirtual |
Attempts to open the file for reading.
Implements bitrl::utils::io::FileHandlerBase< std::ifstream >.
Reimplemented in bitrl::utils::io::JSONFileReader.