class
#include <src/Base/Reader.hpp>
Reader Reader base serves as a base class for various file readers. It does generic low-level I/O, e.g., opening and closing a file, and associated error handling.
Derived classes
- class ASCMeshReader
- ASCMeshReader : tk::
Reader. - class GmshMeshReader
- class MeditMeshReader
- MeditMeshReader : tk::
Reader. - class NetgenMeshReader
- NetgenMeshReader : tk::
Reader. - class RDGFLOMeshReader
- RDGFLOMeshReader : tk::
Reader. - class UGRIDMeshReader
- UGRIDMeshReader : tk::
Reader.
Constructors, destructors, conversion operators
Public functions
Protected variables
- const std::string m_filename
- File name.
- std::ifstream m_inFile
- File input stream.
Function documentation
tk:: Reader:: Reader(const std::string& filename,
std::ios_base::openmode mode = std::ifstream::in) explicit
Constructor: Acquire file handle.
Parameters | |
---|---|
filename in | Name of file to open for reading |
mode in | Open mode, see http://en.cppreference.com/w/cpp/io/ios_ |
void tk:: Reader:: read(char* data,
std::streamsize count)
Parameters | |
---|---|
data in | Buffer to read to |
count in | Number of characters to read |
Unformatted read
std::string tk:: Reader:: firstline()
Return first line (for detection of file type based on header)
Returns | First line read from file. This can be used for detection of file type based on header. |
---|
std::string tk:: Reader:: line(std::size_t lineNum)
Read a given line from file.
Parameters | |
---|---|
lineNum in | Line number to read from file |
Returns | Line read from file at line given |