DeltaQt
Version 0.2.0 End user documentation
A C++/Qt library for parsing DELTA (DEscription Language for TAxonomy) files
|
#include <deltaparser.h>
Public Member Functions | |
DeltaParser () | |
bool | parse (DeltaDataset *dataset, const QStringList &filenames, bool abortOnAnyReadError=false) |
bool | parse (DeltaDataset *dataset, const QString &fname) |
const DeltaParseLog & | parseLog (void) const |
Friends | |
class | DeltaParserPhase2 |
DeltaParser::DeltaParser | ( | ) |
bool DeltaParser::parse | ( | DeltaDataset * | dataset, |
const QStringList & | filenames, | ||
bool | abortOnAnyReadError = false |
||
) |
Parse each of the files in filenames and the results are stored in dataset
dataset is cleared by this function regardless of whether parse errors occur or not (to read more than one set of files use different DeltaDataset objects).
The files are parsed in the same order as they are in filenames.
If abortOnAnyReadError == false (the default) then errors occurring when parsing a file does not cause the processing of subsequent files to be skipped, although the contents of the dataset may be incorrect (if the errors are simply "file not found" then the data read is correct).
The parse log is cleared when calling this function. If you need to retain the parse log from prior calls make a copy of it first.
Returns true on success, otherwise false. This function (currently) has no other way of reporting errors apart from the parse log.
After each of the files in filenames is read, Phase2 parsing is invoked.
bool DeltaParser::parse | ( | DeltaDataset * | dataset, |
const QString & | fname | ||
) |
Parse a single file, storing the result in dataset. In most instances it is not necessary to directly call this function (use parse(DeltaDataset* dataset, const QStringList& filenames, bool abortOnAnyReadError). However, if this function is called directly, the following points should be noted:
const DeltaParseLog & DeltaParser::parseLog | ( | void | ) | const |
friend class DeltaParserPhase2 [friend] |