tracesrv/tracecompiler/src/com.nokia.tracecompiler/src/com/nokia/tracecompiler/engine/SourceContextManagerImpl.java
changeset 56 aa2539c91954
parent 41 838cdffd57ce
equal deleted inserted replaced
54:a151135b0cf9 56:aa2539c91954
       
     1 /*
       
     2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 *
       
    16 * SourceContextManager interface implementation
       
    17 *
       
    18 */
       
    19 package com.nokia.tracecompiler.engine;
       
    20 
       
    21 import com.nokia.tracecompiler.source.SourceContext;
       
    22 
       
    23 /**
       
    24  * SourceContextManager interface implementation
       
    25  * 
       
    26  */
       
    27 final class SourceContextManagerImpl implements SourceContextManager {
       
    28 
       
    29 	/**
       
    30 	 * Active context
       
    31 	 */
       
    32 	private SourceContext activeContext;
       
    33 
       
    34 	/**
       
    35 	 * Converting flag
       
    36 	 */
       
    37 	private boolean isConverting;
       
    38 
       
    39 	/**
       
    40 	 * Constructor
       
    41 	 * 
       
    42 	 * @param sourceEngine
       
    43 	 *            the source engine
       
    44 	 */
       
    45 	SourceContextManagerImpl() {
       
    46 	}
       
    47 
       
    48 	/*
       
    49 	 * (non-Javadoc)
       
    50 	 * 
       
    51 	 * @see com.nokia.tracecompiler.engine.SourceContextManager#getContext()
       
    52 	 */
       
    53 	public SourceContext getContext() {
       
    54 		return activeContext;
       
    55 	}
       
    56 
       
    57 	/*
       
    58 	 * (non-Javadoc)
       
    59 	 * 
       
    60 	 * @see com.nokia.tracecompiler.engine.SourceContextManager#
       
    61 	 *      setContext(com.nokia.tracecompiler.source.SourceContext)
       
    62 	 */
       
    63 	public void setContext(SourceContext context) {
       
    64 		activeContext = context;
       
    65 	}
       
    66 
       
    67 	/*
       
    68 	 * (non-Javadoc)
       
    69 	 * 
       
    70 	 * @see com.nokia.tracecompiler.engine.SourceContextManager#isConverting()
       
    71 	 */
       
    72 	public boolean isConverting() {
       
    73 		return isConverting;
       
    74 	}
       
    75 
       
    76 	/*
       
    77 	 * (non-Javadoc)
       
    78 	 * 
       
    79 	 * @see com.nokia.tracecompiler.engine.SourceContextManager#setConverting(boolean)
       
    80 	 */
       
    81 	public void setConverting(boolean flag) {
       
    82 		this.isConverting = flag;
       
    83 	}
       
    84 }