NSDiskIO::AbstractWriter Class Reference

basic interface for writing datasets into files on disk More...

#include <abstractdiskio.h>

Inheritance diagram for NSDiskIO::AbstractWriter:

NSCore::DataSetChainMember NSCore::DataSetProducer NSCore::QTreeItem QObject NSCore::PointerProtection_Skel NSDiskIO::CombinedCSV NSDiskIO::CSVWriter NSDiskIO::EPOSBinWriter NSDiskIO::EPOSWriter
Collaboration diagram for NSDiskIO::AbstractWriter:

Collaboration graph
[legend]

List of all members.

Public Slots

virtual void setFile (QString)=0
 open a file
void resetCounter ()
 resets the counter of the written datasets

Signals

void wroteDataSet (int)
 Emits the number of datasets written so far.

Public Member Functions

 AbstractWriter (QObject *)
 constructor
virtual void writeDataSet (NSCore::AcqisitionDataSet &data)=0
 Write a single dataset to disk.
virtual QString ending () const __attribute__((deprecated))=0
 The ending of your files.
virtual QString filter () const
bool dataArrived (NSCore::AcqisitionDataSet &)
 Data arrived!

Protected Attributes

NSCore::NamedParameterTreeItemPointer config

Private Slots

void privateLateInit ()

Private Member Functions

QString debug () const
 Custom debug text.
QDomNode saveToXML (QDomDocument doc)
 Store the information of this element into a new QDomElement.
bool restoreFromXML (QDomNode node)
 Restore the state of this element from the given QDomNode.
void dataAvailable (NSCore::DataSetProducer *)

Private Attributes

int _number_of_written_datasets


Detailed Description

basic interface for writing datasets into files on disk

Constructor & Destructor Documentation

NSDiskIO::AbstractWriter::AbstractWriter ( QObject  ) 

constructor


Member Function Documentation

virtual void NSDiskIO::AbstractWriter::writeDataSet ( NSCore::AcqisitionDataSet data  )  [pure virtual]

Write a single dataset to disk.

You have to implement this function to write a dataset to disk. There is no need for other things to do, the rest will be done by customEvent of the AbstractDiskWriter

Parameters:
data the dataset you should write

Implemented in NSDiskIO::CSVWriter, NSDiskIO::EPOSWriter, NSDiskIO::CombinedCSV, and NSDiskIO::EPOSBinWriter.

virtual QString NSDiskIO::AbstractWriter::ending (  )  const [pure virtual]

The ending of your files.

You have to return the ending of your files without the dot.

Deprecated:

Implemented in NSDiskIO::CSVWriter, NSDiskIO::CombinedCSV, and NSDiskIO::EPOSBinWriter.

virtual QString NSDiskIO::AbstractWriter::filter (  )  const [inline, virtual]

bool NSDiskIO::AbstractWriter::dataArrived ( NSCore::AcqisitionDataSet  )  [virtual]

Data arrived!

Subclass this function to handle the data. Return true when the data should be sent to the next in the chain. Otherwise it gets deleted.

Implements NSCore::DataSetChainMember.

virtual void NSDiskIO::AbstractWriter::setFile ( QString   )  [pure virtual, slot]

void NSDiskIO::AbstractWriter::resetCounter (  )  [slot]

resets the counter of the written datasets

void NSDiskIO::AbstractWriter::wroteDataSet ( int   )  [signal]

Emits the number of datasets written so far.

void NSDiskIO::AbstractWriter::privateLateInit (  )  [private, slot]

QString NSDiskIO::AbstractWriter::debug (  )  const [inline, private, virtual]

Custom debug text.

This function has to be implemented and has to return the internal debug-data that is to be printed...

Implements NSCore::QTreeItem.

QDomNode NSDiskIO::AbstractWriter::saveToXML ( QDomDocument  doc  )  [inline, private, virtual]

Store the information of this element into a new QDomElement.

This function is only to save the state of this element, all the recursive stuff will be done by toXml().

Parameters:
doc The QDomDocument to use for creation of the element

Implements NSCore::QTreeItem.

bool NSDiskIO::AbstractWriter::restoreFromXML ( QDomNode  node  )  [inline, private, virtual]

Restore the state of this element from the given QDomNode.

You don't have to do the recursive stuff here, that is handled in fromXml() for you. Only the things done in saveToXML need/can be restored here.

If you succeeded and want the childs to be restored too, return true.

Parameters:
node The QDomNode to restore from

Implements NSCore::QTreeItem.

void NSDiskIO::AbstractWriter::dataAvailable ( NSCore::DataSetProducer  )  [private]


Member Data Documentation


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

Generated on Tue Apr 12 02:10:30 2011 for epos by  doxygen 1.5.5