NCL Composer  0.1.5
 All Classes Functions Variables Pages
IDocumentParser.h
1 /* Copyright (c) 2011 Telemidia/PUC-Rio.
2  * All rights reserved. This program and the accompanying materials
3  * are made available under the terms of the Eclipse Public License v1.0
4  * which accompanies this distribution, and is available at
5  * http://www.eclipse.org/legal/epl-v10.html
6  *
7  * Contributors:
8  * Telemidia/PUC-Rio - initial API and implementation
9  */
10 #ifndef IDOCUMENTPARSER_H
11 #define IDOCUMENTPARSER_H
12 
13 #include <QObject>
14 
15 #include "../model/Project.h"
16 using namespace composer::core::model;
17 
18 namespace composer {
19  namespace extension {
20 
24  class COMPOSERCORESHARED_EXPORT IDocumentParser : public QObject
25  {
26  Q_OBJECT
27 
28  public:
29  virtual ~IDocumentParser(){}
36  virtual bool parseDocument() = 0;
37 
45  virtual bool parseContent(const QString &str) = 0;
46 
54  virtual QString getParserName() = 0;
55 
56  signals:
67  void addEntity( QString type, QString parentEntityId,
68  QMap<QString,QString>& atts, bool force);
69 
70  public slots:
78  virtual void onEntityAddError(QString error) = 0;
86  virtual void onEntityAdded(QString uniqueID, Entity *entity) = 0;
87  };
88  } } //end namespace
89 
90 #endif // IDOCUMENTPARSER_H