Ginga  0.13.6
 All Classes Namespaces Functions Variables
NclDocumentParser.h
1 /******************************************************************************
2 Este arquivo eh parte da implementacao do ambiente declarativo do middleware
3 Ginga (Ginga-NCL).
4 
5 Direitos Autorais Reservados (c) 1989-2007 PUC-Rio/Laboratorio TeleMidia
6 
7 Este programa eh software livre; voce pode redistribui-lo e/ou modificah-lo sob
8 os termos da Licenca Publica Geral GNU versao 2 conforme publicada pela Free
9 Software Foundation.
10 
11 Este programa eh distribuido na expectativa de que seja util, porem, SEM
12 NENHUMA GARANTIA; nem mesmo a garantia implicita de COMERCIABILIDADE OU
13 ADEQUACAO A UMA FINALIDADE ESPECIFICA. Consulte a Licenca Publica Geral do
14 GNU versao 2 para mais detalhes.
15 
16 Voce deve ter recebido uma copia da Licenca Publica Geral do GNU versao 2 junto
17 com este programa; se nao, escreva para a Free Software Foundation, Inc., no
18 endereco 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
19 
20 Para maiores informacoes:
21 ncl @ telemidia.puc-rio.br
22 http://www.ncl.org.br
23 http://www.ginga.org.br
24 http://www.telemidia.puc-rio.br
25 ******************************************************************************
26 This file is part of the declarative environment of middleware Ginga (Ginga-NCL)
27 
28 Copyright: 1989-2007 PUC-RIO/LABORATORIO TELEMIDIA, All Rights Reserved.
29 
30 This program is free software; you can redistribute it and/or modify it under
31 the terms of the GNU General Public License version 2 as published by
32 the Free Software Foundation.
33 
34 This program is distributed in the hope that it will be useful, but WITHOUT ANY
35 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
36 PARTICULAR PURPOSE. See the GNU General Public License version 2 for more
37 details.
38 
39 You should have received a copy of the GNU General Public License version 2
40 along with this program; if not, write to the Free Software
41 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
42 
43 For further information contact:
44 ncl @ telemidia.puc-rio.br
45 http://www.ncl.org.br
46 http://www.ginga.org.br
47 http://www.telemidia.puc-rio.br
48 *******************************************************************************/
49 
50 #ifndef NCLDOCUMENTPARSER_H_
51 #define NCLDOCUMENTPARSER_H_
52 
53 #include "../DocumentParser.h"
54 using namespace ::br::pucrio::telemidia::converter::framework;
55 
56 #include "NclConnectorsParser.h"
57 #include "NclImportParser.h"
58 #include "NclTransitionParser.h"
59 #include "NclPresentationControlParser.h"
60 #include "NclComponentsParser.h"
61 #include "NclStructureParser.h"
62 #include "NclPresentationSpecificationParser.h"
63 #include "NclLayoutParser.h"
64 #include "NclInterfacesParser.h"
65 #include "NclLinkingParser.h"
66 #include "NclMetainformationParser.h"
67 
68 #include "ncl/NclDocument.h"
69 using namespace ::br::pucrio::telemidia::ncl;
70 
71 #include <xercesc/dom/DOM.hpp>
72 XERCES_CPP_NAMESPACE_USE
73 
74 #include <iostream>
75 #include <string>
76 using namespace std;
77 
78 namespace br {
79 namespace pucrio {
80 namespace telemidia {
81 namespace converter {
82 namespace framework {
83 namespace ncl {
85  protected:
86  NclConnectorsParser *connectorsParser;
87  NclImportParser *importParser;
88  NclTransitionParser* transitionParser;
89  NclPresentationControlParser *presentationControlParser;
90  NclComponentsParser *componentsParser;
91  NclStructureParser *structureParser;
92  NclPresentationSpecificationParser *presentationSpecificationParser;
93  NclLayoutParser *layoutParser;
94  NclInterfacesParser *interfacesParser;
95  NclLinkingParser *linkingParser;
96  NclMetainformationParser* metainformationParser;
97  IDeviceLayout* deviceLayout;
98 
99  public:
100  NclDocumentParser(IDeviceLayout* deviceLayout);
101  virtual ~NclDocumentParser();
102 
103  protected:
104  void setDependencies();
105 
106  public:
107  NclTransitionParser* getTransitionParser();
108  NclConnectorsParser *getConnectorsParser();
109  void setConnectorsParser(NclConnectorsParser *connectorsParser);
110  NclImportParser *getImportParser();
111  void setBaseReuseParser(NclImportParser *importParser);
112  NclPresentationControlParser *getPresentationControlParser();
113  void setPresentationControlParser(
114  NclPresentationControlParser *presentationControlParser);
115 
116  NclComponentsParser *getComponentsParser();
117  void setComponentsParser(NclComponentsParser *componentsParser);
118  NclStructureParser *getStructureParser();
119  void setStructureParser(NclStructureParser *structureParser);
121  getPresentationSpecificationParser();
122 
123  void setPresentationSpecificationParser(
125  presentationSpecificationParser);
126 
127  NclLayoutParser *getLayoutParser();
128  void setLayoutParser(NclLayoutParser *layoutParser);
129  NclInterfacesParser *getInterfacesParser();
130  void setInterfacesParser(NclInterfacesParser *interfacesParser);
131  NclMetainformationParser* getMetainformationParser();
132  void setMetainformationParser(
133  NclMetainformationParser* metainformationParser);
134 
135  NclLinkingParser *getLinkingParser();
136  void setLinkingParser(NclLinkingParser *linkingParser);
137 
138  protected:
139  virtual void* parseRootElement(DOMElement *rootElement);
140  virtual void initialize()=0;
141  };
142 }
143 }
144 }
145 }
146 }
147 }
148 
149 #endif /*NCLDOCUMENTPARSER_H_*/