Eclipse CDT
Pre-release 3.0

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

All Known Subinterfaces:
ICCompositeTypeScope, ICFunctionPrototypeScope, ICFunctionScope, ICPPBlockScope, ICPPClassScope, ICPPFunctionScope, ICPPNamespaceScope, ICPPScope, ICPPTemplateScope, ICScope, IProblemBinding

public interface IScope


Method Summary
 IBinding[] find(String name)
          This is the general lookup entry point.
 IBinding getBinding(IASTName name, boolean resolve)
          Get the binding in this scope that the given name would resolve to.
 IBinding[] getBindings(IASTName name, boolean resolve, boolean prefixLookup)
          Get the bindings in this scope that the given name or prefix could resolve to.
 IScope getParent()
          Scopes are arranged hierarchically.
 org.eclipse.cdt.core.dom.IName getScopeName()
          Get the IName for this scope, may be null
 

Method Detail

getScopeName

public org.eclipse.cdt.core.dom.IName getScopeName()
                                            throws DOMException
Get the IName for this scope, may be null

Returns:
Throws:
DOMException

getParent

public IScope getParent()
                 throws DOMException
Scopes are arranged hierarchically. Lookups will generally flow upward to find resolution.

Returns:
Throws:
DOMException

find

public IBinding[] find(String name)
                throws DOMException
This is the general lookup entry point. It returns the list of valid bindings for a given name. The lookup proceeds as an unqualified lookup. Constructors are not considered during this lookup and won't be returned. No attempt is made to resolve potential ambiguities or perform access checking.

Returns:
List of IBinding
Throws:
DOMException

getBinding

public IBinding getBinding(IASTName name,
                           boolean resolve)
                    throws DOMException
Get the binding in this scope that the given name would resolve to. Could return null if there is no matching binding in this scope, if the binding has not yet been cached in this scope, or if resolve == false and the appropriate binding has not yet been resolved.

Parameters:
name -
resolve - : whether or not to resolve the matching binding if it has not been so already.
Returns:
: the binding in this scope that matches the name, or null
Throws:
DOMException

getBindings

public IBinding[] getBindings(IASTName name,
                              boolean resolve,
                              boolean prefixLookup)
                       throws DOMException
Get the bindings in this scope that the given name or prefix could resolve to. Could return null if there is no matching bindings in this scope, if the bindings have not yet been cached in this scope, or if resolve == false and the appropriate bindings have not yet been resolved.

Parameters:
name -
resolve - : whether or not to resolve the matching bindings if they have not been so already.
prefixLookup - whether the lookup is for a full name or a prefix
Returns:
: the bindings in this scope that match the name or prefix, or null
Throws:
DOMException

Eclipse CDT
Pre-release 3.0

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