Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: d1a14002d1f9e56c05056817e8f29c12fc525041 (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
/*******************************************************************************
 * Copyright (c) 2007, 2010 Wind River Systems, Inc. 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:
 *     Markus Schorn - initial API and implementation
 *******************************************************************************/ 
package org.eclipse.cdt.internal.core.pdom;

import org.eclipse.cdt.core.index.IIndexFileLocation;

/**
 * Abstract class for resolving paths as computed by the parser.
 */
public abstract class ASTFilePathResolver {
	/**
	 * Resolve a path as stored in the AST.
	 * @return an index file location.
	 */
	public abstract IIndexFileLocation resolveASTPath(String astFilePath);

	/**
	 * Resolve a path for an inclusion as computed by the preprocessor. Check for existence
	 * and return <code>null</code> if the file does not exist. 
	 * @return an index file location or <code>null</code> if the file does not exist.
	 */
	public abstract IIndexFileLocation resolveIncludeFile(String includePath);
	
	/**
	 * Check for existence of an inclusion as computed by the preprocessor.
	 */
	public abstract boolean doesIncludeFileExist(String includePath);
	
	/**
	 * Convert an index file location to the path as it will be stored in the AST.
	 */
	public abstract String getASTPath(IIndexFileLocation ifl);

	/**
	 * Answers whether this file is considered to be a source file (vs. a header file).
	 */
	public abstract boolean isSource(String astFilePath);
	
	/**
	 * Returns the size of the file in bytes, or -1 if it cannot be determined
	 */
	public abstract long getFileSize(String astFilePath);
	
	/**
	 * Returns whether the file-system is case insensitive.
	 */
	public abstract boolean isCaseInsensitiveFileSystem();
}

Back to the top