Langmuir
Simulation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
LangmuirCore::OutputStream Class Reference

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 OutputInfoinfo ()
 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
 

Detailed Description

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.

Constructor & Destructor Documentation

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.

See also
OutputInfo::OutputInfo Setup the QTextStream, QFile, and OutputInfo
Parameters
namefile name
parsimulation parameters
parentQObject 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.

See also
OutputInfo::OutputInfo
LangmuirCore::OutputStream::~OutputStream ( )

flush the stream and close the file

Member Function Documentation

const QFile& LangmuirCore::OutputStream::file ( )

Get the file object, though you probably have no need for it.

Returns
file object
const OutputInfo& LangmuirCore::OutputStream::info ( )

Get the info object to get things like file name and path.

Returns
file info object

Member Data Documentation

QFile LangmuirCore::OutputStream::m_file
private
OutputInfo LangmuirCore::OutputStream::m_info
private

< OutputInfo object that generated file name

QFile object, the device of this QTextStream


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