Manages the data buffers and interface for the parser.
More...
#include <datamanager.hpp>
List of all members.
Detailed Description
Manages the data buffers and interface for the parser.
This class is used by the parser and should only call local or thread-safe functions.
Constructor & Destructor Documentation
Member Function Documentation
void DataManager::addAttribute |
( |
int |
idTag, |
|
|
const QString & |
attributeName, |
|
|
QString |
attributeValue | |
|
) |
| | |
Adds attribute data to the buffers.
void DataManager::addTag |
( |
const Tag & |
tag |
) |
|
Adds tag data to the buffers.
void DataManager::addText |
( |
const QString & |
text, |
|
|
bool |
separate = false | |
|
) |
| | |
Adds text to the buffer.
- Parameters:
-
| separate | Insert a space if text is going to concatenate two words together |
void DataManager::cancelCurrentFile |
( |
bool |
toError = false |
) |
|
Changes the status of the current file.
- Exceptions:
-
- Parameters:
-
| toError | Set the file to error status instead of waiting status |
int DataManager::currentOffset |
( |
|
) |
const |
Returns the offset of the text.
void DataManager::flushDocument |
( |
bool |
validateSource = false |
) |
|
Sends the current document data to the database.
- Parameters:
-
| validateSource | If set, update the file status to 'parsed'. |
- Exceptions:
-
int DataManager::generateTagId |
( |
|
) |
|
void DataManager::startDocument |
( |
int |
sourceId |
) |
|
Initializes the buffers for a new document.
- Exceptions:
-
int DataManager::tagNameId |
( |
const QString & |
tagName |
) |
|
void DataManager::validateSource |
( |
bool |
rollbackOnError = false |
) |
|
Validates the current source file status.
- Parameters:
-
| rollbackOnError | Will exec a rollback query if an error occurs. |
- Exceptions:
-
Member Data Documentation