NCL Composer  0.1.5
 All Classes Functions Variables Pages
composer::extension::IDocumentParser Class Referenceabstract

An abstract interface to document parsers. More...

#include <IDocumentParser.h>

Inheritance diagram for composer::extension::IDocumentParser:
Collaboration diagram for composer::extension::IDocumentParser:

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...
 

Detailed Description

An abstract interface to document parsers.

Definition at line 24 of file IDocumentParser.h.

Member Function Documentation

void composer::extension::IDocumentParser::addEntity ( QString  type,
QString  parentEntityId,
QMap< QString, QString > &  atts,
bool  force 
)
signal

Signal emitted when the parser find a new entity.

This function must be implemented by concrete Document Parsers.

Parameters
typethe type of the entity (XML tagname).
parentEntityIduniqueId of the father.
attsattributes of this entity.
forcetrue if the entity must be added even if this cause an error in the model.
virtual QString composer::extension::IDocumentParser::getParserName ( )
pure virtual

Returns the name of the Document Parser.

This name should be unique. This function must be implemented by concrete Document Parsers.

Returns
QString the name of the Document Parser.

Implemented in composer::language::NCLDocumentParser.

virtual void composer::extension::IDocumentParser::onEntityAdded ( QString  uniqueID,
Entity entity 
)
pure virtualslot

This slot is called after the addEntity has success.

This function must be implemented by concrete Document Parsers.

Parameters
uniqueIDthe unique id of the entity in the model.
entitythe pointer to the entity.
virtual void composer::extension::IDocumentParser::onEntityAddError ( QString  error)
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.

Parameters
errorThe description of the error.
virtual bool composer::extension::IDocumentParser::parseContent ( const QString &  str)
pure virtual

Parses the content of the string passed as parameter.

This function must be implemented by concrete Document Parsers.

  • str the content to be parsed.
    Returns
    bool returns true if success and false otherwise.

Implemented in composer::language::NCLDocumentParser.

Here is the caller graph for this function:

virtual bool composer::extension::IDocumentParser::parseDocument ( )
pure virtual

Parses the content of the document.

This function must be implemented by concrete Document Parsers.

Returns
bool returns true if success and false otherwise.

Implemented in composer::language::NCLDocumentParser.


The documentation for this class was generated from the following file: