#include <genesis/utils/io/file_input_source.hpp>
Inherits BaseInputSource.
Input source for reading byte data from a file.
The input file name is provided via the constructor.
It is also possible to provide a FILE
pointer directly. In this case, the ownership of the file pointer is taken by this class. Thus, closing the file is done when destructing this class.
Definition at line 59 of file file_input_source.hpp.
Public Member Functions | |
FileInputSource (FileInputSource &&)=default | |
FileInputSource (FileInputSource const &)=default | |
FileInputSource (std::string const &file_name) | |
Construct the input source from a file with the given file name. More... | |
FileInputSource (std::string const &file_name, FILE *file) | |
Construct the input source from a FILE pointer. The file_name is used for the source_name() function only. More... | |
~FileInputSource () override=default | |
FileInputSource & | operator= (FileInputSource &&)=default |
FileInputSource & | operator= (FileInputSource const &)=default |
Public Member Functions inherited from BaseInputSource | |
BaseInputSource ()=default | |
BaseInputSource (BaseInputSource &&)=default | |
BaseInputSource (BaseInputSource const &)=default | |
virtual | ~BaseInputSource () |
BaseInputSource & | operator= (BaseInputSource &&)=default |
BaseInputSource & | operator= (BaseInputSource const &)=default |
size_t | read (char *buffer, size_t size) |
Read size many bytes into the char buffer . More... | |
std::string | source_name () const |
Get a name of the input source. This is intended for user output. More... | |
std::string | source_string () const |
Get a string representing the input source. This is intended for the reader classes, which for example might want to examine the input file name. More... | |
|
inlineexplicit |
Construct the input source from a file with the given file name.
Definition at line 70 of file file_input_source.hpp.
|
inlineexplicit |
Construct the input source from a FILE
pointer. The file_name
is used for the source_name() function only.
Definition at line 82 of file file_input_source.hpp.
|
default |
|
default |
|
overridedefault |
|
default |
|
default |