svcore
1.9
|
#include <CSVFeatureWriter.h>
Public Types | |
typedef vector< Parameter > | ParameterList |
Public Member Functions | |
CSVFeatureWriter () | |
virtual | ~CSVFeatureWriter () |
string | getDescription () const override |
ParameterList | getSupportedParameters () const override |
void | setParameters (map< string, string > ¶ms) override |
void | write (QString trackid, const Transform &transform, const Vamp::Plugin::OutputDescriptor &output, const Vamp::Plugin::FeatureList &features, std::string summaryType="") override |
void | finish () override |
QString | getWriterTag () const override |
void | testOutputFile (QString trackId, TransformId transformId) override |
Throw FailedToOpenOutputStream if we can already tell that we will be unable to write to the output file. More... | |
void | flush () override |
virtual void | setTrackMetadata (QString, TrackMetadata) |
virtual void | setNofM (int, int) |
Notify the writer that we are about to start extraction for input file N of M (where N is 1..M). More... | |
Protected Types | |
enum | FileWriteSupport { SupportOneFilePerTrackTransform = 1, SupportOneFilePerTrack = 2, SupportOneFileTotal = 4, SupportStdOut = 8 } |
typedef pair< QString, TransformId > | TrackTransformPair |
typedef map< TrackTransformPair, QString > | FileNameMap |
typedef map< TrackTransformPair, QFile * > | FileMap |
typedef map< QFile *, QTextStream * > | FileStreamMap |
Protected Member Functions | |
QTextStream * | getOutputStream (QString, TransformId, QTextCodec *) |
TrackTransformPair | getFilenameKey (QString, TransformId) |
QString | createOutputFilename (QString, TransformId) |
QString | getOutputFilename (QString, TransformId) |
QFile * | getOutputFile (QString, TransformId) |
virtual void | reviewFileForAppending (QString) |
Protected Attributes | |
FileMap | m_files |
FileNameMap | m_filenames |
FileStreamMap | m_streams |
QTextStream * | m_prevstream |
int | m_support |
QString | m_extension |
QString | m_baseDir |
bool | m_manyFiles |
QString | m_singleFileName |
bool | m_stdout |
bool | m_append |
bool | m_force |
Private Types | |
typedef pair< QString, Transform > | DataId |
typedef map< DataId, Vamp::Plugin::Feature > | PendingFeatures |
typedef map< DataId, std::string > | PendingSummaryTypes |
Private Member Functions | |
void | writeFeature (DataId, QTextStream &, const Vamp::Plugin::Feature &f, const Vamp::Plugin::Feature *optionalNextFeature, std::string summaryType) |
Private Attributes | |
QString | m_separator |
bool | m_sampleTiming |
bool | m_endTimes |
bool | m_forceEnd |
bool | m_omitFilename |
QString | m_prevPrintedTrackId |
PendingFeatures | m_pending |
PendingSummaryTypes | m_pendingSummaryTypes |
int | m_digits |
Detailed Description
Definition at line 37 of file CSVFeatureWriter.h.
Member Typedef Documentation
|
private |
Definition at line 66 of file CSVFeatureWriter.h.
|
private |
Definition at line 67 of file CSVFeatureWriter.h.
|
private |
Definition at line 68 of file CSVFeatureWriter.h.
|
protectedinherited |
Definition at line 61 of file FileFeatureWriter.h.
|
protectedinherited |
Definition at line 62 of file FileFeatureWriter.h.
|
protectedinherited |
Definition at line 63 of file FileFeatureWriter.h.
|
protectedinherited |
Definition at line 64 of file FileFeatureWriter.h.
|
inherited |
Definition at line 51 of file FeatureWriter.h.
Member Enumeration Documentation
|
protectedinherited |
Enumerator | |
---|---|
SupportOneFilePerTrackTransform | |
SupportOneFilePerTrack | |
SupportOneFileTotal | |
SupportStdOut |
Definition at line 51 of file FileFeatureWriter.h.
Constructor & Destructor Documentation
CSVFeatureWriter::CSVFeatureWriter | ( | ) |
Definition at line 31 of file CSVFeatureWriter.cpp.
|
virtual |
Definition at line 45 of file CSVFeatureWriter.cpp.
Member Function Documentation
|
overridevirtual |
Implements FeatureWriter.
Definition at line 50 of file CSVFeatureWriter.cpp.
|
overridevirtual |
Reimplemented from FeatureWriter.
Definition at line 56 of file CSVFeatureWriter.cpp.
References FeatureWriter::Parameter::description, FileFeatureWriter::getSupportedParameters(), FeatureWriter::Parameter::hasArg, and FeatureWriter::Parameter::name.
|
overridevirtual |
Reimplemented from FeatureWriter.
Definition at line 95 of file CSVFeatureWriter.cpp.
References m_digits, m_endTimes, m_forceEnd, m_omitFilename, m_sampleTiming, m_separator, FileFeatureWriter::setParameters(), SVCERR, and SVDEBUG.
|
overridevirtual |
Implements FeatureWriter.
Definition at line 130 of file CSVFeatureWriter.cpp.
References Transform::getIdentifier(), FileFeatureWriter::getOutputStream(), m_forceEnd, m_pending, m_pendingSummaryTypes, and writeFeature().
|
overridevirtual |
Implements FeatureWriter.
Definition at line 183 of file CSVFeatureWriter.cpp.
References FileFeatureWriter::getOutputStream(), m_pending, m_pendingSummaryTypes, and writeFeature().
|
inlineoverridevirtual |
Implements FeatureWriter.
Definition at line 56 of file CSVFeatureWriter.h.
|
private |
Definition at line 207 of file CSVFeatureWriter.cpp.
References Transform::getSampleRate(), m_digits, m_endTimes, m_omitFilename, m_prevPrintedTrackId, m_sampleTiming, m_separator, FileFeatureWriter::m_singleFileName, FileFeatureWriter::m_stdout, RealTime::realTime2Frame(), and RealTime::toString().
|
overridevirtualinherited |
Throw FailedToOpenOutputStream if we can already tell that we will be unable to write to the output file.
This is called to test the output stream before processing begins. The writer may legitimately succeed here but still fail later – this is really an optimisation to ensure that easy-to-recognise failure cases fail early.
Reimplemented from FeatureWriter.
Definition at line 231 of file FileFeatureWriter.cpp.
References FileFeatureWriter::createOutputFilename(), FileFeatureWriter::m_singleFileName, and FileFeatureWriter::m_stdout.
|
overridevirtualinherited |
Reimplemented from FeatureWriter.
Definition at line 347 of file FileFeatureWriter.cpp.
References FileFeatureWriter::m_prevstream.
|
protectedinherited |
Definition at line 317 of file FileFeatureWriter.cpp.
References FileFeatureWriter::getOutputFile(), FileFeatureWriter::m_prevstream, FileFeatureWriter::m_stdout, and FileFeatureWriter::m_streams.
Referenced by finish(), write(), and RDFFeatureWriter::write().
|
protectedinherited |
Definition at line 249 of file FileFeatureWriter.cpp.
References FileFeatureWriter::m_manyFiles, and FileFeatureWriter::m_singleFileName.
Referenced by FileFeatureWriter::getOutputFile(), and FileFeatureWriter::getOutputFilename().
|
protectedinherited |
Definition at line 170 of file FileFeatureWriter.cpp.
References FeatureWriter::getWriterTag(), FileFeatureWriter::m_append, FileFeatureWriter::m_baseDir, FileFeatureWriter::m_extension, FileFeatureWriter::m_force, FileFeatureWriter::m_manyFiles, FileFeatureWriter::m_singleFileName, FileFeatureWriter::m_stdout, and SVCERR.
Referenced by FileFeatureWriter::getOutputFile(), FileFeatureWriter::getOutputFilename(), and FileFeatureWriter::testOutputFile().
|
protectedinherited |
Definition at line 266 of file FileFeatureWriter.cpp.
References FileFeatureWriter::createOutputFilename(), FileFeatureWriter::getFilenameKey(), and FileFeatureWriter::m_filenames.
|
protectedinherited |
Definition at line 277 of file FileFeatureWriter.cpp.
References FileFeatureWriter::createOutputFilename(), FileFeatureWriter::getFilenameKey(), FileFeatureWriter::m_append, FileFeatureWriter::m_files, FileFeatureWriter::reviewFileForAppending(), SVCERR, and SVDEBUG.
Referenced by FileFeatureWriter::getOutputStream().
|
inlineprotectedvirtualinherited |
Reimplemented in RDFFeatureWriter.
Definition at line 85 of file FileFeatureWriter.h.
Referenced by FileFeatureWriter::getOutputFile().
|
inlinevirtualinherited |
Reimplemented in RDFFeatureWriter.
Definition at line 65 of file FeatureWriter.h.
|
inlinevirtualinherited |
Notify the writer that we are about to start extraction for input file N of M (where N is 1..M).
May be useful when writing multiple outputs into a single file where some syntactic element is needed to connect them.
Definition at line 93 of file FeatureWriter.h.
References FeatureWriter::write().
Member Data Documentation
|
private |
Definition at line 59 of file CSVFeatureWriter.h.
Referenced by setParameters(), and writeFeature().
|
private |
Definition at line 60 of file CSVFeatureWriter.h.
Referenced by setParameters(), and writeFeature().
|
private |
Definition at line 61 of file CSVFeatureWriter.h.
Referenced by setParameters(), and writeFeature().
|
private |
Definition at line 62 of file CSVFeatureWriter.h.
Referenced by setParameters(), and write().
|
private |
Definition at line 63 of file CSVFeatureWriter.h.
Referenced by setParameters(), and writeFeature().
|
private |
Definition at line 64 of file CSVFeatureWriter.h.
Referenced by writeFeature().
|
private |
Definition at line 69 of file CSVFeatureWriter.h.
|
private |
Definition at line 70 of file CSVFeatureWriter.h.
|
private |
Definition at line 78 of file CSVFeatureWriter.h.
Referenced by setParameters(), and writeFeature().
|
protectedinherited |
Definition at line 65 of file FileFeatureWriter.h.
Referenced by FileFeatureWriter::finish(), FileFeatureWriter::getOutputFile(), and FileFeatureWriter::~FileFeatureWriter().
|
protectedinherited |
Definition at line 66 of file FileFeatureWriter.h.
Referenced by FileFeatureWriter::getOutputFilename().
|
protectedinherited |
Definition at line 67 of file FileFeatureWriter.h.
Referenced by FileFeatureWriter::finish(), FileFeatureWriter::getOutputStream(), and FileFeatureWriter::~FileFeatureWriter().
|
protectedinherited |
Definition at line 68 of file FileFeatureWriter.h.
Referenced by FileFeatureWriter::finish(), FileFeatureWriter::flush(), and FileFeatureWriter::getOutputStream().
|
protectedinherited |
Definition at line 87 of file FileFeatureWriter.h.
Referenced by FileFeatureWriter::FileFeatureWriter(), FileFeatureWriter::getSupportedParameters(), and FileFeatureWriter::setParameters().
|
protectedinherited |
Definition at line 88 of file FileFeatureWriter.h.
Referenced by FileFeatureWriter::createOutputFilename(), and FileFeatureWriter::FileFeatureWriter().
|
protectedinherited |
Definition at line 89 of file FileFeatureWriter.h.
Referenced by FileFeatureWriter::createOutputFilename(), and FileFeatureWriter::setParameters().
|
protectedinherited |
Definition at line 90 of file FileFeatureWriter.h.
Referenced by FileFeatureWriter::createOutputFilename(), FileFeatureWriter::FileFeatureWriter(), FileFeatureWriter::getFilenameKey(), and FileFeatureWriter::setParameters().
|
protectedinherited |
Definition at line 91 of file FileFeatureWriter.h.
Referenced by FileFeatureWriter::createOutputFilename(), FileFeatureWriter::FileFeatureWriter(), FileFeatureWriter::finish(), FileFeatureWriter::getFilenameKey(), FileFeatureWriter::setParameters(), FileFeatureWriter::testOutputFile(), RDFFeatureWriter::write(), and writeFeature().
|
protectedinherited |
Definition at line 92 of file FileFeatureWriter.h.
Referenced by FileFeatureWriter::createOutputFilename(), FileFeatureWriter::finish(), FileFeatureWriter::getOutputStream(), FileFeatureWriter::setParameters(), FileFeatureWriter::testOutputFile(), RDFFeatureWriter::write(), and writeFeature().
|
protectedinherited |
Definition at line 93 of file FileFeatureWriter.h.
Referenced by FileFeatureWriter::createOutputFilename(), FileFeatureWriter::getOutputFile(), and FileFeatureWriter::setParameters().
|
protectedinherited |
Definition at line 94 of file FileFeatureWriter.h.
Referenced by FileFeatureWriter::createOutputFilename(), and FileFeatureWriter::setParameters().
The documentation for this class was generated from the following files:
Generated by 1.8.11