org.eclipse.cdt.core.dom.ast.cpp

## Interface ICPPTemplateParameter

All Superinterfaces:
  org.eclipse.core.runtime.IAdaptable, IBinding, ICPPBinding

All Known Subinterfaces:
  ICPPTemplateNonTypeParameter, ICPPTemplateTemplateParameter, ICPPTemplateTypeParameter

    public interface ICPPTemplateParameter
    extends ICPPBinding

Base interface for all template parameters (non-type, type and template). All template parameters should implement ICPPUnknownBinding as well (but ICPPTemplateParameter cannot extend ICPPUnknownBinding because ICPPUnknownBinding is not API).

Restriction:
  This interface is not intended to be implemented by clients.
Restriction:
  This interface is not intended to be extended by clients.

### Field Summary

Fields
`static ICPPTemplateParameter[]` `EMPTY_TEMPLATE_PARAMETER_ARRAY`

### Fields inherited from interface org.eclipse.cdt.core.dom.ast.IBinding

`EMPTY_BINDING_ARRAY`

### Method Summary

All Methods Instance Methods Abstract Methods
`ICPPTemplateArgument` `getDefaultValue()` Returns the default value for this template parameter, or `null`.
`int` `getParameterID()` Returns `(getTemplateNestingLevel() << 16) + getParameterPosition()`.
`short` `getParameterPosition()` Returns the zero-based position of this parameter within the template parameter list it belongs to.
`short` `getTemplateNestingLevel()` Returns the nesting-level of the template declaration this parameter belongs to.
`boolean` `isParameterPack()` Returns whether this template parameter is a parameter pack.

### Methods inherited from interface org.eclipse.cdt.core.dom.ast.cpp.ICPPBinding

`getQualifiedName, getQualifiedNameCharArray, isGloballyQualified`

### Methods inherited from interface org.eclipse.cdt.core.dom.ast.IBinding

`getLinkage, getName, getNameCharArray, getOwner, getScope`

### Methods inherited from interface org.eclipse.core.runtime.IAdaptable

`getAdapter`

### Field Detail

#### EMPTY_TEMPLATE_PARAMETER_ARRAY

    static final ICPPTemplateParameter[] EMPTY_TEMPLATE_PARAMETER_ARRAY

### Method Detail

#### getParameterPosition

    short getParameterPosition()

Returns the zero-based position of this parameter within the template parameter list it belongs to.

Since:
  5.1

#### getTemplateNestingLevel

    short getTemplateNestingLevel()

Returns the nesting-level of the template declaration this parameter belongs to.

The nesting level is determined by counting enclosing template declarations, for example:

     namespace ns {
        template<typename T> class X {       // nesting level 0
           template<typename U> class Y1 {   // nesting level 1
           };
           class Y2 {
              template typename<V> class Z { // nesting level 1
                 void m();
              };
           };
        };
     }
     template<typename T>                    // nesting level 0
        template <typename V>                // nesting level 1
           void ns::X<T>::Y2::Z<V>::m() {}

Since:
  5.1

#### getParameterID

    int getParameterID()

Returns `(getTemplateNestingLevel() << 16) + getParameterPosition()`.

Since:
  5.1

#### getDefaultValue

    ICPPTemplateArgument getDefaultValue()

Returns the default value for this template parameter, or `null`.

Since:
  5.1

#### isParameterPack

    boolean isParameterPack()

Returns whether this template parameter is a parameter pack.

Since:
  5.2