Package org.eclipse.cdt.core.dom.ast
Interface IASTDeclSpecifier
-
- All Superinterfaces:
IASTAttributeOwner,IASTNode
- All Known Subinterfaces:
IASTCompositeTypeSpecifier,IASTElaboratedTypeSpecifier,IASTEnumerationSpecifier,IASTNamedTypeSpecifier,IASTSimpleDeclSpecifier,ICASTCompositeTypeSpecifier,ICASTDeclSpecifier,ICASTElaboratedTypeSpecifier,ICASTEnumerationSpecifier,ICASTSimpleDeclSpecifier,ICASTTypedefNameSpecifier,ICPPASTCompositeTypeSpecifier,ICPPASTDeclSpecifier,ICPPASTElaboratedTypeSpecifier,ICPPASTEnumerationSpecifier,ICPPASTNamedTypeSpecifier,ICPPASTSimpleDeclSpecifier,ICPPASTTypeTransformationSpecifier,IGCCASTSimpleDeclSpecifier,IGPPASTDeclSpecifier,IGPPASTSimpleDeclSpecifier
public interface IASTDeclSpecifier extends IASTAttributeOwner
This is the base interface that represents a declaration specifier sequence.- Restriction:
- This interface is not intended to be implemented by clients.
- Restriction:
- This interface is not intended to be extended by clients.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.cdt.core.dom.ast.IASTNode
IASTNode.CopyStyle
-
-
Field Summary
Fields Modifier and Type Field Description static ASTNodePropertyALIGNMENT_SPECIFIERDeprecated.Not used.static intsc_autostatic intsc_externstatic intsc_mutablestatic intsc_registerstatic intsc_staticstatic intsc_typedefstatic intsc_unspecifiedNo storage class specified.-
Fields inherited from interface org.eclipse.cdt.core.dom.ast.IASTAttributeOwner
ATTRIBUTE, ATTRIBUTE_SPECIFIER
-
Fields inherited from interface org.eclipse.cdt.core.dom.ast.IASTNode
EMPTY_NODE_ARRAY
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description IASTDeclSpecifiercopy()Returns a mutable copy of the tree rooted at this node.IASTDeclSpecifiercopy(IASTNode.CopyStyle style)Returns a mutable copy of the tree rooted at this node.IASTAlignmentSpecifier[]getAlignmentSpecifiers()Deprecated.Use ICASTDeclSpecifier.getAlignmentSpecifiers() for C code.intgetStorageClass()Returns the storage class, which is one of the constants sc_...booleanisConst()booleanisInline()booleanisRestrict()booleanisVolatile()voidsetAlignmentSpecifiers(IASTAlignmentSpecifier[] alignmentSpecifiers)Deprecated.Use ICASTDeclSpecifier.setAlignmentSpecifiers() for C code.voidsetConst(boolean value)Not allowed on frozen ast.voidsetInline(boolean value)Not allowed on frozen ast.voidsetRestrict(boolean value)Not allowed on frozen ast.voidsetStorageClass(int storageClass)Not allowed on frozen ast.voidsetVolatile(boolean value)Not allowed on frozen ast.-
Methods inherited from interface org.eclipse.cdt.core.dom.ast.IASTAttributeOwner
addAttribute, addAttributeSpecifier, getAttributes, getAttributeSpecifiers
-
Methods inherited from interface org.eclipse.cdt.core.dom.ast.IASTNode
accept, contains, getChildren, getContainingFilename, getFileLocation, getLeadingSyntax, getNodeLocations, getOriginalNode, getParent, getPropertyInParent, getRawSignature, getSyntax, getTrailingSyntax, getTranslationUnit, isActive, isFrozen, isPartOfTranslationUnitFile, setParent, setPropertyInParent
-
-
-
-
Field Detail
-
sc_unspecified
static final int sc_unspecified
No storage class specified.- See Also:
- Constant Field Values
-
sc_typedef
static final int sc_typedef
- See Also:
- Constant Field Values
-
sc_extern
static final int sc_extern
- See Also:
- Constant Field Values
-
sc_static
static final int sc_static
- See Also:
- Constant Field Values
-
sc_auto
static final int sc_auto
- See Also:
- Constant Field Values
-
sc_register
static final int sc_register
- See Also:
- Constant Field Values
-
sc_mutable
static final int sc_mutable
- Since:
- 5.2
- See Also:
- Constant Field Values
-
ALIGNMENT_SPECIFIER
@Deprecated static final ASTNodeProperty ALIGNMENT_SPECIFIER
Deprecated.Not used.- Since:
- 5.10
- Restriction:
- This field is not intended to be referenced by clients.
-
-
Method Detail
-
getStorageClass
int getStorageClass()
Returns the storage class, which is one of the constants sc_...
-
isConst
boolean isConst()
-
isVolatile
boolean isVolatile()
-
isRestrict
boolean isRestrict()
- Since:
- 5.2
-
isInline
boolean isInline()
-
getAlignmentSpecifiers
@Deprecated IASTAlignmentSpecifier[] getAlignmentSpecifiers()
Deprecated.Use ICASTDeclSpecifier.getAlignmentSpecifiers() for C code. In C++ code, alignment specifiers are now stored in the attribute specifier sequence.- Since:
- 5.10
- Restriction:
- This method is not intended to be referenced by clients.
-
copy
IASTDeclSpecifier copy()
Description copied from interface:IASTNodeReturns a mutable copy of the tree rooted at this node. The following postconditions hold:copy.getParent() == null copy.getPropertyInParent() == null copy.isFrozen() == false
Preprocessor nodes do not currently support being copied. Implicit name nodes are not copied, instead they can be regenerated if required.Calling this method is equivalent to
copy(CopyStyle.withoutLocations).
-
copy
IASTDeclSpecifier copy(IASTNode.CopyStyle style)
Description copied from interface:IASTNodeReturns a mutable copy of the tree rooted at this node. The following postconditions hold:copy.getParent() == null copy.getPropertyInParent() == null copy.isFrozen() == false
Preprocessor nodes do not currently support being copied. Implicit name nodes are not copied, instead they can be regenerated if required.- Specified by:
copyin interfaceIASTNode- Parameters:
style-IASTNode.CopyStylecreate a copy with or without locations. Please seeIASTNode.CopyStylefor restrictions on copies with Locations.- Since:
- 5.3
-
setStorageClass
void setStorageClass(int storageClass)
Not allowed on frozen ast.
-
setConst
void setConst(boolean value)
Not allowed on frozen ast.
-
setVolatile
void setVolatile(boolean value)
Not allowed on frozen ast.
-
setRestrict
void setRestrict(boolean value)
Not allowed on frozen ast.- Since:
- 5.2
-
setInline
void setInline(boolean value)
Not allowed on frozen ast.
-
setAlignmentSpecifiers
@Deprecated void setAlignmentSpecifiers(IASTAlignmentSpecifier[] alignmentSpecifiers)
Deprecated.Use ICASTDeclSpecifier.setAlignmentSpecifiers() for C code. In C++ code, alignment specifiers are now stored in the attribute specifier sequence.- Since:
- 5.10
- Restriction:
- This method is not intended to be referenced by clients.
-
-