Langmuir
Simulation
|
A class to combine QFile, QTextStream and OutputInfo (QFileInfo). More...
#include <output.h>
Public Member Functions | |
OutputStream (const QString &name, const SimulationParameters *par=0, QObject *parent=0) | |
Setup the QTextStream, QFile, and OutputInfo. More... | |
~OutputStream () | |
flush the stream and close the file More... | |
const OutputInfo & | info () |
Get the info object to get things like file name and path. More... | |
const QFile & | file () |
Get the file object, though you probably have no need for it. More... | |
Private Attributes | |
OutputInfo | m_info |
< OutputInfo object that generated file name More... | |
QFile | m_file |
A class to combine QFile, QTextStream and OutputInfo (QFileInfo).
Only for used for output. Derived from QObject so destruction ensures streams are flushed and files are closed.
LangmuirCore::OutputStream::OutputStream | ( | const QString & | name, |
const SimulationParameters * | par = 0 , |
||
QObject * | parent = 0 |
||
) |
Setup the QTextStream, QFile, and OutputInfo.
The parameters are the same as OutputInfo. Opens the file as text and write only. Will open with QIODevice::Append if Outout::Options::AppendMode is given.
name | file name |
par | simulation parameters |
parent | QObject this belongs to |
The parameters are the same as OutputInfo. Opens the file as text and write only. Will open with QIODevice::Append if Outout::Options::AppendMode is given.
LangmuirCore::OutputStream::~OutputStream | ( | ) |
flush the stream and close the file
const QFile& LangmuirCore::OutputStream::file | ( | ) |
Get the file object, though you probably have no need for it.
const OutputInfo& LangmuirCore::OutputStream::info | ( | ) |
Get the info object to get things like file name and path.
|
private |
|
private |
< OutputInfo object that generated file name
QFile object, the device of this QTextStream