NCL Composer  0.1.5
 All Classes Functions Variables Pages
ILanguageProfile.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 ILANGUAGE_H
11 #define ILANGUAGE_H
12 
13 #include <QtPlugin>
14 #include <QList>
15 #include <QString>
16 #include <QDebug>
17 
18 #include "IDocumentParser.h"
19 using namespace composer::extension;
20 
21 #include "../util/Utilities.h"
22 using namespace composer::core::util;
23 
24 #include "../model/Project.h"
25 using namespace composer::core::model;
26 
27 #include "../util/AttributeReferences.h"
28 using namespace composer::util;
29 
30 namespace composer {
31  namespace extension {
36 class COMPOSERCORESHARED_EXPORT ILanguageProfile {
37 public:
38  virtual ~ILanguageProfile() {}
39 
40  virtual LanguageType
41  getLanguageType() = 0;
42 
43  virtual QString
44  getProfileName() = 0;
45 
46  virtual QList<QString>
47  getOutputDocumentTypes() = 0;
48 
49  virtual IDocumentParser*
50  createParser(Project *project) = 0;
51 
52  virtual void releaseDocumentParser
53  (IDocumentParser *parser) = 0;
54 
55  //FUNCTIONS RELATED TO LANGUAGE STRUCTURE
56  virtual map <QString, map <QString, char> *>
57  *getNesting() = 0;
58 
59  virtual map <QString, bool>
60  *getAttributes (QString element) = 0;
61 
62  virtual map <QString, char>
63  *getChildren (QString tagname) = 0;
64 
65  virtual vector <AttributeReferences *>
66  getReferences (QString element, QString attr) = 0;
67 };
68 } } //end namespace
69 
70 
75 Q_DECLARE_INTERFACE(ILanguageProfile,
76  "br.telemidia.purcrio.composer.ILanguage")
77 #endif // ILANGUAGE_H