NCL Composer
0.1.5
|
An abstract interface to document parsers. More...
#include <IDocumentParser.h>
Public Slots | |
virtual void | onEntityAddError (QString error)=0 |
This slot is called when there is an error in the model (commonly after a addEntity call). More... | |
virtual void | onEntityAdded (QString uniqueID, Entity *entity)=0 |
This slot is called after the addEntity has success. More... | |
Signals | |
void | addEntity (QString type, QString parentEntityId, QMap< QString, QString > &atts, bool force) |
Signal emitted when the parser find a new entity. More... | |
Public Member Functions | |
virtual bool | parseDocument ()=0 |
Parses the content of the document. More... | |
virtual bool | parseContent (const QString &str)=0 |
Parses the content of the string passed as parameter. More... | |
virtual QString | getParserName ()=0 |
Returns the name of the Document Parser. More... | |
An abstract interface to document parsers.
Definition at line 24 of file IDocumentParser.h.
|
signal |
Signal emitted when the parser find a new entity.
This function must be implemented by concrete Document Parsers.
type | the type of the entity (XML tagname). |
parentEntityId | uniqueId of the father. |
atts | attributes of this entity. |
force | true if the entity must be added even if this cause an error in the model. |
|
pure virtual |
Returns the name of the Document Parser.
This name should be unique. This function must be implemented by concrete Document Parsers.
Implemented in composer::language::NCLDocumentParser.
|
pure virtualslot |
This slot is called after the addEntity has success.
This function must be implemented by concrete Document Parsers.
uniqueID | the unique id of the entity in the model. |
entity | the pointer to the entity. |
|
pure virtualslot |
This slot is called when there is an error in the model (commonly after a addEntity call).
This function must be implemented by concrete Document Parsers.
error | The description of the error. |
|
pure virtual |
Parses the content of the string passed as parameter.
This function must be implemented by concrete Document Parsers.
Implemented in composer::language::NCLDocumentParser.
|
pure virtual |
Parses the content of the document.
This function must be implemented by concrete Document Parsers.
Implemented in composer::language::NCLDocumentParser.