MolSim
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
FileReader Class Reference

File reader class which implements functionality to read data from input files. More...

#include <FileReader.h>

Inheritance diagram for FileReader:
XMLReader

Public Member Functions

 FileReader ()
 Creates a new FileReader with no file initialized.
 
 FileReader (const std::string &filename)
 Creates a new FileReader and opens the file with the given name.
 
virtual ~FileReader ()
 Destroys the FileReader object and automatically closes the input stream.
 
void openFile (const std::string &filename)
 Initializes the input stream with the given file (via its name).
 

Protected Attributes

std::ifstream m_infile
 Input stream representing the file containing molecule data.
 

Detailed Description

File reader class which implements functionality to read data from input files.

Constructor & Destructor Documentation

◆ FileReader() [1/2]

FileReader::FileReader ( )

Creates a new FileReader with no file initialized.

◆ FileReader() [2/2]

FileReader::FileReader ( const std::string &  filename)
explicit

Creates a new FileReader and opens the file with the given name.

Parameters
filenameThe name of the file to load into m_infile.

◆ ~FileReader()

virtual FileReader::~FileReader ( )
virtual

Destroys the FileReader object and automatically closes the input stream.

Member Function Documentation

◆ openFile()

void FileReader::openFile ( const std::string &  filename)

Initializes the input stream with the given file (via its name).

Parameters
filenameThe name of the file to load into the input stream m_infile.

Member Data Documentation

◆ m_infile

std::ifstream FileReader::m_infile
protected

Input stream representing the file containing molecule data.


The documentation for this class was generated from the following file: