Eclipse CDT
Pre-release 3.0

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

All Superinterfaces:
IBinding
All Known Subinterfaces:
ICPPField, ICPPParameter, ICPPTemplateNonTypeParameter, ICPPVariable, IField, IParameter

public interface IVariable
extends IBinding

Interface for all sorts of variables: local, parameter, global, field.


Field Summary
 
Fields inherited from interface org.eclipse.cdt.core.dom.ast.IBinding
EMPTY_BINDING_ARRAY
 
Method Summary
 IValue getInitialValue()
          Returns the value for a variable with an initializer, or null otherwise.
 IType getType()
          Returns the type of the variable
 boolean isAuto()
          Returns whether this variable is an automatic variable.
 boolean isExtern()
          Returns whether this variable is declared extern.
 boolean isRegister()
          Returns whether this variable is declared register.
 boolean isStatic()
          Returns whether this variable is declared static.
 
Methods inherited from interface org.eclipse.cdt.core.dom.ast.IBinding
getLinkage, getName, getNameCharArray, getOwner, getScope
 

Method Detail

getType

IType getType()
              throws DOMException
Returns the type of the variable

Throws:
DOMException

getInitialValue

IValue getInitialValue()
Returns the value for a variable with an initializer, or null otherwise.

Since:
5.1

isStatic

boolean isStatic()
                 throws DOMException
Returns whether this variable is declared static.

Throws:
DOMException

isExtern

boolean isExtern()
                 throws DOMException
Returns whether this variable is declared extern.

Throws:
DOMException

isAuto

boolean isAuto()
               throws DOMException
Returns whether this variable is an automatic variable.

Throws:
DOMException

isRegister

boolean isRegister()
                   throws DOMException
Returns whether this variable is declared register.

Throws:
DOMException

Eclipse CDT
Pre-release 3.0

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