| 
									
										
										
										
											2012-10-02 09:12:39 +02:00
										 |  |  | /****************************************************************************
 | 
					
						
							| 
									
										
										
										
											2010-07-09 15:47:07 +02:00
										 |  |  | ** | 
					
						
							| 
									
										
										
										
											2013-01-28 17:12:19 +01:00
										 |  |  | ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). | 
					
						
							| 
									
										
										
										
											2012-10-02 09:12:39 +02:00
										 |  |  | ** Contact: http://www.qt-project.org/legal
 | 
					
						
							| 
									
										
										
										
											2010-07-09 15:47:07 +02:00
										 |  |  | ** | 
					
						
							| 
									
										
										
										
											2012-10-02 09:12:39 +02:00
										 |  |  | ** This file is part of Qt Creator. | 
					
						
							| 
									
										
										
										
											2010-07-09 15:47:07 +02:00
										 |  |  | ** | 
					
						
							| 
									
										
										
										
											2012-10-02 09:12:39 +02:00
										 |  |  | ** Commercial License Usage | 
					
						
							|  |  |  | ** Licensees holding valid commercial Qt licenses may use this file in | 
					
						
							|  |  |  | ** accordance with the commercial license agreement provided with the | 
					
						
							|  |  |  | ** Software or, alternatively, in accordance with the terms contained in | 
					
						
							|  |  |  | ** a written agreement between you and Digia.  For licensing terms and | 
					
						
							|  |  |  | ** conditions see http://qt.digia.com/licensing.  For further information
 | 
					
						
							|  |  |  | ** use the contact form at http://qt.digia.com/contact-us.
 | 
					
						
							| 
									
										
										
										
											2010-07-09 15:47:07 +02:00
										 |  |  | ** | 
					
						
							|  |  |  | ** GNU Lesser General Public License Usage | 
					
						
							| 
									
										
										
										
											2012-10-02 09:12:39 +02:00
										 |  |  | ** Alternatively, this file may be used under the terms of the GNU Lesser | 
					
						
							|  |  |  | ** General Public License version 2.1 as published by the Free Software | 
					
						
							|  |  |  | ** Foundation and appearing in the file LICENSE.LGPL included in the | 
					
						
							|  |  |  | ** packaging of this file.  Please review the following information to | 
					
						
							|  |  |  | ** ensure the GNU Lesser General Public License version 2.1 requirements | 
					
						
							|  |  |  | ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 | 
					
						
							|  |  |  | ** | 
					
						
							|  |  |  | ** In addition, as a special exception, Digia gives you certain additional | 
					
						
							|  |  |  | ** rights.  These rights are described in the Digia Qt LGPL Exception | 
					
						
							| 
									
										
										
										
											2010-12-17 16:01:08 +01:00
										 |  |  | ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. | 
					
						
							|  |  |  | ** | 
					
						
							| 
									
										
										
										
											2012-10-02 09:12:39 +02:00
										 |  |  | ****************************************************************************/ | 
					
						
							| 
									
										
										
										
											2010-07-09 15:47:07 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-01-28 14:53:53 +01:00
										 |  |  | #ifndef QMLJSLINK_H
 | 
					
						
							|  |  |  | #define QMLJSLINK_H
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-02-02 15:55:17 +01:00
										 |  |  | #include <qmljs/qmljsdocument.h>
 | 
					
						
							| 
									
										
										
										
											2011-07-05 12:06:41 +02:00
										 |  |  | #include <qmljs/qmljscontext.h>
 | 
					
						
							| 
									
										
										
										
											2010-01-28 14:53:53 +01:00
										 |  |  | #include <qmljs/parser/qmljsastfwd_p.h>
 | 
					
						
							| 
									
										
										
										
											2011-02-25 16:16:37 +01:00
										 |  |  | #include <languageutils/componentversion.h>
 | 
					
						
							| 
									
										
										
										
											2010-01-28 14:53:53 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-02-15 10:42:41 +01:00
										 |  |  | #include <QCoreApplication>
 | 
					
						
							| 
									
										
										
										
											2010-01-28 14:53:53 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | namespace QmlJS { | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-02-04 10:19:37 +01:00
										 |  |  | class NameId; | 
					
						
							| 
									
										
										
										
											2010-09-16 15:29:37 +02:00
										 |  |  | class LinkPrivate; | 
					
						
							| 
									
										
										
										
											2010-02-04 10:19:37 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-02-02 15:55:17 +01:00
										 |  |  | /*
 | 
					
						
							| 
									
										
										
										
											2010-02-04 10:19:37 +01:00
										 |  |  |     Helper for building a context. | 
					
						
							| 
									
										
										
										
											2010-02-02 15:55:17 +01:00
										 |  |  | */ | 
					
						
							| 
									
										
										
										
											2010-03-31 10:03:18 +02:00
										 |  |  | class QMLJS_EXPORT Link | 
					
						
							| 
									
										
										
										
											2010-01-28 14:53:53 +01:00
										 |  |  | { | 
					
						
							| 
									
										
										
										
											2011-06-28 12:01:56 +02:00
										 |  |  |     Q_DISABLE_COPY(Link) | 
					
						
							| 
									
										
										
										
											2010-05-19 13:42:56 +02:00
										 |  |  |     Q_DECLARE_TR_FUNCTIONS(QmlJS::Link) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-01-28 14:53:53 +01:00
										 |  |  | public: | 
					
						
							| 
									
										
										
										
											2011-06-28 12:01:56 +02:00
										 |  |  |     Link(const Snapshot &snapshot, const QStringList &importPaths, const LibraryInfo &builtins); | 
					
						
							| 
									
										
										
										
											2011-05-06 13:31:30 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     // Link all documents in snapshot, collecting all diagnostic messages (if messages != 0)
 | 
					
						
							| 
									
										
										
										
											2011-08-08 12:47:49 +02:00
										 |  |  |     ContextPtr operator()(QHash<QString, QList<DiagnosticMessage> > *messages = 0); | 
					
						
							| 
									
										
										
										
											2011-04-21 11:09:29 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     // Link all documents in snapshot, appending the diagnostic messages
 | 
					
						
							|  |  |  |     // for 'doc' in 'messages'
 | 
					
						
							| 
									
										
										
										
											2011-08-08 12:47:49 +02:00
										 |  |  |     ContextPtr operator()(const Document::Ptr &doc, QList<DiagnosticMessage> *messages); | 
					
						
							| 
									
										
										
										
											2010-02-02 15:55:17 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-04-21 11:09:29 +02:00
										 |  |  |     ~Link(); | 
					
						
							| 
									
										
										
										
											2010-03-25 14:47:28 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-01-28 14:53:53 +01:00
										 |  |  | private: | 
					
						
							| 
									
										
										
										
											2011-09-13 13:32:29 +02:00
										 |  |  |     LinkPrivate *d; | 
					
						
							|  |  |  |     friend class LinkPrivate; | 
					
						
							| 
									
										
										
										
											2010-01-28 14:53:53 +01:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | } // namespace QmlJS
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #endif // QMLJSLINK_H
 |