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

# Interface ICPPEnumeration

All Superinterfaces:
  `Cloneable`, `org.eclipse.core.runtime.IAdaptable`, `IBinding`, `ICPPBinding`, `IEnumeration`, `IType`

All Known Subinterfaces:
  `ICPPEnumerationSpecialization`

public interface ICPPEnumeration extends IEnumeration, ICPPBinding
C++ specific version of enumerations.

Since:
  5.2
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 inherited from interface org.eclipse.cdt.core.dom.ast.IBinding

`EMPTY_BINDING_ARRAY`

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

`EMPTY_TYPE_ARRAY, TYPE_MATCHER`

## Method Summary

Modifier and Type
Method
Description
`ICPPScope`
`asScope()`
Returns the scope containing the enumerators.
`IType`
`getFixedType()`
Returns the underlying type of the enumeration if it is fixed, or `null` otherwise.
`boolean`
`isNoDiscard()`
Returns weather the enum is marked as 'nodiscard'
`boolean`
`isScoped()`
Returns whether this enumeration is scoped.

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

`getAdapter`

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

`getLinkage, getName, getNameCharArray, getOwner, getScope`

### 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.IEnumeration

`getEnumerators, getMaxValue, getMinValue`

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

`clone, isSameType`

## Method Details

### isScoped

boolean isScoped()
Returns whether this enumeration is scoped. An enumeration can only be scoped in C++.

### getFixedType

IType getFixedType()
Returns the underlying type of the enumeration if it is fixed, or `null` otherwise. The underlying type can only be fixed in C++.

### asScope

ICPPScope asScope()
Returns the scope containing the enumerators. By the standard the scope is only defined for scoped enums, however it will be returned for any enum. In case the enum has no definition (just opaque declarations) an empty scope will be returned.

### isNoDiscard

boolean isNoDiscard()
Returns weather the enum is marked as 'nodiscard'

Since:
  7.0