Package org.eclipse.cdt.core.dom.ast
Interface IASTPreprocessorIncludeStatement
- All Superinterfaces:
IASTNode
,IASTPreprocessorStatement
,IFileNomination
public interface IASTPreprocessorIncludeStatement
extends IASTPreprocessorStatement, IFileNomination
This interface represents a preprocessor #include statement.
- Restriction:
- This interface is not intended to be implemented by clients.
- Restriction:
- This interface is not intended to be extended by clients.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.cdt.core.dom.ast.IASTNode
IASTNode.CopyStyle
-
Field Summary
Modifier and TypeFieldDescriptionstatic final ASTNodeProperty
INCLUDE_NAME
describes the relationship between an include directive and its name.Fields inherited from interface org.eclipse.cdt.core.dom.ast.IASTNode
EMPTY_NODE_ARRAY
Fields inherited from interface org.eclipse.cdt.core.dom.ast.IASTPreprocessorStatement
MACRO_NAME
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returnstrue
, if an attempt will be or has been made to create AST for the target of this inclusion.Returns the file from the index that this include statement has pulled in, ornull
if the include creates AST or is unresolved or skipped.long
Returns a hash-code for the contents of the file included, or0
if the content has not been parsed.long
Returns time when the included file was read.long
Returns the size of the included file, or -1 if the file was not read.long
Returns the modification time of the included file, or -1 if the file was not read.Returns the list of versions of the target file, each of which is identified by its significant macros, that had been included in this translation-unit prior to this statement.getName()
Returns the name of the file as specified in the directive.getPath()
Returns the absolute location of the file found through #include, or an empty string if include was not resolved.boolean
isActive()
Returns whether this include directive was actually taken.boolean
Returnstrue
if I/O errors were encountered while reading the included file.boolean
Returnstrue
if the included file is exported by the including header.boolean
Returns whether this include file was successfully resolved.boolean
Returns whether the inclusion was resolved using a heuristics.boolean
Returns whether this is a system include (one specified with angle brackets).Methods inherited from interface org.eclipse.cdt.core.dom.ast.IASTNode
accept, contains, copy, copy, getChildren, getContainingFilename, getFileLocation, getLeadingSyntax, getNodeLocations, getOriginalNode, getParent, getPropertyInParent, getRawSignature, getSyntax, getTrailingSyntax, getTranslationUnit, isFrozen, isPartOfTranslationUnitFile, setParent, setPropertyInParent
Methods inherited from interface org.eclipse.cdt.core.dom.ast.IFileNomination
getSignificantMacros, hasPragmaOnceSemantics
-
Field Details
-
INCLUDE_NAME
INCLUDE_NAME
describes the relationship between an include directive and its name.
-
-
Method Details
-
getPath
String getPath()Returns the absolute location of the file found through #include, or an empty string if include was not resolved. -
getName
IASTName getName()Returns the name of the file as specified in the directive. Does not include quotes or angle brackets.- Since:
- 4.0
-
isSystemInclude
boolean isSystemInclude()Returns whether this is a system include (one specified with angle brackets).- Since:
- 4.0
-
isActive
boolean isActive()Returns whether this include directive was actually taken. -
isResolved
boolean isResolved()Returns whether this include file was successfully resolved.- Since:
- 4.0
-
isResolvedByHeuristics
boolean isResolvedByHeuristics()Returns whether the inclusion was resolved using a heuristics.- Since:
- 5.1
-
getLoadedVersions
ISignificantMacros[] getLoadedVersions()Returns the list of versions of the target file, each of which is identified by its significant macros, that had been included in this translation-unit prior to this statement.- Restriction:
- This method is not intended to be referenced by clients.
-
getIncludedFileTimestamp
long getIncludedFileTimestamp()Returns the modification time of the included file, or -1 if the file was not read.- Since:
- 5.4
-
getIncludedFileSize
long getIncludedFileSize()Returns the size of the included file, or -1 if the file was not read.- Since:
- 5.4
-
getIncludedFileContentsHash
long getIncludedFileContentsHash()Returns a hash-code for the contents of the file included, or0
if the content has not been parsed.- Since:
- 5.4
-
getIncludedFileReadTime
long getIncludedFileReadTime()Returns time when the included file was read. Corresponds to the start of reading.- Returns:
- time before reading started in milliseconds since epoch
- Since:
- 5.4
-
isErrorInIncludedFile
boolean isErrorInIncludedFile()Returnstrue
if I/O errors were encountered while reading the included file.- Since:
- 5.4
-
isIncludedFileExported
boolean isIncludedFileExported()Returnstrue
if the included file is exported by the including header.- Since:
- 5.5
- See Also:
-
- "https://github.com/include-what-you-use/include-what-you-use/blob/master/docs/IWYUPragmas.md"
-
createsAST
boolean createsAST()Returnstrue
, if an attempt will be or has been made to create AST for the target of this inclusion.- Since:
- 5.4
-
getImportedIndexFile
IIndexFile getImportedIndexFile()Returns the file from the index that this include statement has pulled in, ornull
if the include creates AST or is unresolved or skipped.- Since:
- 5.4
-