Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 5732bf1ecb325e511f33337ad8e25104b1d81057 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*******************************************************************************
 * Copyright (c) 2000, 2006 QNX Software Systems and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     QNX Software Systems - Initial API and implementation
 *     Markus Schorn (Wind River Systems)
 *******************************************************************************/
package org.eclipse.cdt.core.testplugin;

import java.util.Collections;
import java.util.Map;

import org.eclipse.cdt.core.parser.ExtendedScannerInfo;

public class TestScannerInfo extends ExtendedScannerInfo {
	private static final String[] EMPTY = {};
	private String[] fIncludes;
	private String[] fIncludeFiles;
	private String[] fMacroFiles;
	private Map<String, String> fDefinedSymbols;

	public TestScannerInfo(String[] includes, String[] macroFiles, String[] includeFiles,
			Map<String, String> definedSymbols) {
		fIncludes= includes;
		fIncludeFiles= includeFiles;
		fMacroFiles= macroFiles;
		fDefinedSymbols= definedSymbols;
	}

	@Override
	public Map getDefinedSymbols() {
		return fDefinedSymbols == null ? Collections.emptyMap() : fDefinedSymbols;
	}

	@Override
	public String[] getIncludePaths() {
		return fIncludes == null ? EMPTY : fIncludes;
	}

	@Override
	public String[] getIncludeFiles() {
		return fIncludeFiles == null ? EMPTY: fIncludeFiles;
	}

	@Override
	public String[] getLocalIncludePath() {
		return null;
	}

	@Override
	public String[] getMacroFiles() {
		return fMacroFiles == null ? EMPTY: fMacroFiles;
	}
}

Back to the top