#include <abstractdiskio.h>
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 |
NSDiskIO::AbstractWriter::AbstractWriter | ( | QObject * | ) |
constructor
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
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.
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().
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.
node | The QDomNode to restore from |
Implements NSCore::QTreeItem.
void NSDiskIO::AbstractWriter::dataAvailable | ( | NSCore::DataSetProducer * | ) | [private] |
int NSDiskIO::AbstractWriter::_number_of_written_datasets [private] |