tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/utils/DocumentFactory.java
changeset 56 aa2539c91954
parent 41 838cdffd57ce
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/utils/DocumentFactory.java	Fri Oct 08 14:56:39 2010 +0300
@@ -0,0 +1,57 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+* Factory class to create document interfaces
+*
+*/
+package com.nokia.tracecompiler.utils;
+
+import com.nokia.tracecompiler.source.SourceDocumentFactory;
+import com.nokia.tracecompiler.source.SourceDocumentMonitor;
+
+/**
+ * Factory class to create document interfaces
+ * 
+ */
+public final class DocumentFactory {
+
+	/**
+	 * Document monitor
+	 */
+	private static SourceDocumentMonitor monitor;
+
+
+	/**
+	 * Registers a document framework to be used by the engine
+	 * 
+	 * @param monitor
+	 *            the document monitor
+	 * @param factoryClass
+	 *            the document factory class
+	 */
+	public static void registerDocumentFramework(SourceDocumentMonitor monitor,
+			Class<? extends SourceDocumentFactory> factoryClass) {
+		DocumentFactory.monitor = monitor;
+	}
+
+	/**
+	 * Gets the document monitor
+	 * 
+	 * @return the monitor
+	 */
+	public static final SourceDocumentMonitor getDocumentMonitor() {
+		return monitor;
+	}
+}