Eclipse CDT
7.0

org.eclipse.cdt.core.dom.ast
Interface IASTNodeSelector


public interface IASTNodeSelector

Interface for searching nodes in a translation unit. An instance of this interface, responsible for one file contained in a translation-unit, can be obtained using IASTTranslationUnit.getNodeSelector(String).

Since:
5.0

Method Summary
 IASTImplicitName findEnclosingImplicitName(int offset, int length)
          Returns the first implicit name enclosing the given range.
 IASTPreprocessorMacroExpansion findEnclosingMacroExpansion(int offset, int length)
          Returns a macro expansion enclosing the given range, or null.
 IASTName findEnclosingName(int offset, int length)
          Returns the smallest name enclosing the given range, or null if there is no such node.
 IASTNode findEnclosingNode(int offset, int length)
          Returns the smallest node enclosing the given range, or null if there is no such node.
 IASTNode findEnclosingNodeInExpansion(int offset, int length)
          Returns the smallest node enclosing the range, or null if there is no such node.
 IASTName findFirstContainedName(int offset, int length)
          Returns the first name contained in the given range, or null if there is no such node.
 IASTNode findFirstContainedNode(int offset, int length)
          Returns the first node contained in the given range, or null if there is no such node.
 IASTNode findFirstContainedNodeInExpansion(int offset, int length)
          Returns the first node contained in the given expansion, or null if there is no such node.
 IASTImplicitName findImplicitName(int offset, int length)
          Returns the implicit name for the exact given range, or null if there is no such node.
 IASTName findName(int offset, int length)
          Returns the name for the exact given range, or null if there is no such node.
 IASTNode findNode(int offset, int length)
          Returns the node for the exact given range, or null if there is no such node.
 IASTNode findNodeInExpansion(int offset, int length)
          Returns the node for the exact given range, or null if there is no such node.
 IASTNode findStrictlyEnclosingNode(int offset, int length)
          Returns the smallest node strictly enclosing the given range, or null if there is no such node.
 

Method Detail

findName

IASTName findName(int offset,
                  int length)
Returns the name for the exact given range, or null if there is no such node. Will not return an implicit name.


findEnclosingName

IASTName findEnclosingName(int offset,
                           int length)
Returns the smallest name enclosing the given range, or null if there is no such node. Will not return an implicit name.


findFirstContainedName

IASTName findFirstContainedName(int offset,
                                int length)
Returns the first name contained in the given range, or null if there is no such node. Will not return an implicit name.


findImplicitName

IASTImplicitName findImplicitName(int offset,
                                  int length)
Returns the implicit name for the exact given range, or null if there is no such node. Note that there can be more than one implicit name in the same location. The implicit name's parent can be used to get all the names at the location.

Since:
5.1

findEnclosingImplicitName

IASTImplicitName findEnclosingImplicitName(int offset,
                                           int length)
Returns the first implicit name enclosing the given range. Note that there can be more than one implicit name in the same location. The implicit name's parent can be used to get all the names at the location.

Since:
5.1

findNode

IASTNode findNode(int offset,
                  int length)
Returns the node for the exact given range, or null if there is no such node.

For nodes with the same location, macro-expansions (IASTPreprocessorMacroExpansion) are preferred over c/c++-nodes and children are preferred over their parents.


findEnclosingNode

IASTNode findEnclosingNode(int offset,
                           int length)
Returns the smallest node enclosing the given range, or null if there is no such node.

For nodes with the same location, macro-expansions (IASTPreprocessorMacroExpansion) are preferred over c/c++-nodes nodes and children are preferred over their parents.


findStrictlyEnclosingNode

IASTNode findStrictlyEnclosingNode(int offset,
                                   int length)
Returns the smallest node strictly enclosing the given range, or null if there is no such node.

For nodes with the same location, macro-expansions (IASTPreprocessorMacroExpansion) are preferred over c/c++-nodes nodes and children are preferred over their parents.

Since:
5.3

findFirstContainedNode

IASTNode findFirstContainedNode(int offset,
                                int length)
Returns the first node contained in the given range, or null if there is no such node.

For nodes with the same location, macro-expansions (IASTPreprocessorMacroExpansion) are preferred over c/c++-nodes nodes and children are preferred over their parents.


findNodeInExpansion

IASTNode findNodeInExpansion(int offset,
                             int length)
Returns the node for the exact given range, or null if there is no such node.

The method never returns a macro expansion (IASTPreprocessorMacroExpansion) or the name for an expansion. Rather than that the expansion itself is searched for a matching node.

Since:
5.1

findEnclosingNodeInExpansion

IASTNode findEnclosingNodeInExpansion(int offset,
                                      int length)
Returns the smallest node enclosing the range, or null if there is no such node.

The method never returns a macro expansion (IASTPreprocessorMacroExpansion) or the name for an expansion. Rather than that the expansion itself is searched for a matching node.

Since:
5.1

findFirstContainedNodeInExpansion

IASTNode findFirstContainedNodeInExpansion(int offset,
                                           int length)
Returns the first node contained in the given expansion, or null if there is no such node.

The method never returns a macro expansion (IASTPreprocessorMacroExpansion) or the name for an expansion. Rather than that the expansion itself is searched for a matching node.

Since:
5.1

findEnclosingMacroExpansion

IASTPreprocessorMacroExpansion findEnclosingMacroExpansion(int offset,
                                                           int length)
Returns a macro expansion enclosing the given range, or null.


Eclipse CDT
7.0

Copyright (c) IBM Corp. and others 2004, 2012. All Rights Reserved.