Package org.eclipse.cdt.core.dom.ast
Interface IASTSimpleDeclSpecifier
- All Superinterfaces:
IASTAttributeOwner
,IASTDeclSpecifier
,IASTNode
- All Known Subinterfaces:
ICASTSimpleDeclSpecifier
,ICPPASTSimpleDeclSpecifier
,IGCCASTSimpleDeclSpecifier
,IGPPASTSimpleDeclSpecifier
This represents a declaration specifier for a built-in type.
- 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
Modifier and TypeFieldDescriptionstatic final ASTNodeProperty
static final int
auto c = expression;
static final int
Represents a boolean type (bool in c++, _Bool in c)static final int
char c;
static final int
char16_t c;
static final int
char32_t c;
static final int
char8_t c;
static final int
_Decimal128 i;
static final int
_Decimal32 i;
static final int
_Decimal64 i;
static final int
decltype('c') c;
static final int
decltype(auto) c = expression;
static final int
double d;
static final int
float f;
static final int
__float128 i;
static final int
int i;
static final int
__int128 i;
static final int
typeof 'c' c;
static final int
Used for omitted declaration specifiers.static final int
void x();
static final int
wchar_t c;
Fields inherited from interface org.eclipse.cdt.core.dom.ast.IASTAttributeOwner
ATTRIBUTE, ATTRIBUTE_SPECIFIER
Fields inherited from interface org.eclipse.cdt.core.dom.ast.IASTDeclSpecifier
ALIGNMENT_SPECIFIER, sc_auto, sc_extern, sc_mutable, sc_register, sc_static, sc_typedef, sc_unspecified
Fields inherited from interface org.eclipse.cdt.core.dom.ast.IASTNode
EMPTY_NODE_ARRAY
-
Method Summary
Modifier and TypeMethodDescriptioncopy()
Returns a mutable copy of the tree rooted at this node.Returns the expression for simple declaration specifiers of typet_decltype
ort_typeof
.int
getType()
Returns the built-in type for the declaration.boolean
_Complex t
;boolean
_Imaginary t
;boolean
isLong()
long int l;
boolean
long long int l;
boolean
isShort()
short int s;
boolean
isSigned()
signed char c;
boolean
unsigned int u;
void
setComplex
(boolean value) Not allowed on frozen ast.void
setDeclTypeExpression
(IASTExpression expression) Not allowed on frozen ast.void
setImaginary
(boolean value) Not allowed on frozen ast.void
setLong
(boolean value) Not allowed on frozen ast.void
setLongLong
(boolean value) Not allowed on frozen ast.void
setShort
(boolean value) Not allowed on frozen ast.void
setSigned
(boolean value) Not allowed on frozen ast.void
setType
(int type) Not allowed on frozen ast.void
setType
(IBasicType.Kind kind) Not allowed on frozen ast.void
setUnsigned
(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.IASTDeclSpecifier
copy, getAlignmentSpecifiers, getStorageClass, isConst, isInline, isRestrict, isVolatile, setAlignmentSpecifiers, setConst, setInline, setRestrict, setStorageClass, setVolatile
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 Details
-
DECLTYPE_EXPRESSION
- Since:
- 5.2
-
t_unspecified
static final int t_unspecifiedUsed for omitted declaration specifiers. E.g. for declaration of constructors, or in plain c, where this defaults to an integer.- See Also:
-
t_void
static final int t_voidvoid x();
- See Also:
-
t_char
static final int t_charchar c;
- See Also:
-
t_int
static final int t_intint i;
- See Also:
-
t_float
static final int t_floatfloat f;
- See Also:
-
t_double
static final int t_doubledouble d;
- See Also:
-
t_bool
static final int t_boolRepresents a boolean type (bool in c++, _Bool in c)- Since:
- 5.2
- See Also:
-
t_wchar_t
static final int t_wchar_twchar_t c;
- Since:
- 5.2
- See Also:
-
t_typeof
static final int t_typeoftypeof 'c' c;
- Since:
- 5.2
- See Also:
-
t_decltype
static final int t_decltypedecltype('c') c;
- Since:
- 5.2
- See Also:
-
t_auto
static final int t_autoauto c = expression;
- Since:
- 5.2
- See Also:
-
t_char16_t
static final int t_char16_tchar16_t c;
- Since:
- 5.2
- See Also:
-
t_char32_t
static final int t_char32_tchar32_t c;
- Since:
- 5.2
- See Also:
-
t_int128
static final int t_int128__int128 i;
- Since:
- 5.5
- See Also:
-
t_float128
static final int t_float128__float128 i;
- Since:
- 5.5
- See Also:
-
t_decimal32
static final int t_decimal32_Decimal32 i;
- Since:
- 5.10
- See Also:
-
t_decimal64
static final int t_decimal64_Decimal64 i;
- Since:
- 5.10
- See Also:
-
t_decimal128
static final int t_decimal128_Decimal128 i;
- Since:
- 5.10
- See Also:
-
t_decltype_auto
static final int t_decltype_autodecltype(auto) c = expression;
- Since:
- 6.1
- See Also:
-
t_char8_t
static final int t_char8_tchar8_t c;
- Since:
- 8.2
- See Also:
-
-
Method Details
-
copy
IASTSimpleDeclSpecifier copy()Description copied from interface:IASTNode
Returns 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)
.- Specified by:
copy
in interfaceIASTDeclSpecifier
- Specified by:
copy
in interfaceIASTNode
- Since:
- 5.1
-
getType
int getType()Returns the built-in type for the declaration. The type is then refined by qualifiers for signed/unsigned and short/long. The type could also be unspecified which usually means int. -
isSigned
boolean isSigned()signed char c;
-
isUnsigned
boolean isUnsigned()unsigned int u;
-
isShort
boolean isShort()short int s;
-
isLong
boolean isLong()long int l;
-
isLongLong
boolean isLongLong()long long int l;
- Since:
- 5.2
-
isComplex
boolean isComplex()_Complex t
;- Since:
- 5.2
-
isImaginary
boolean isImaginary()_Imaginary t
;- Since:
- 5.2
-
getDeclTypeExpression
IASTExpression getDeclTypeExpression()Returns the expression for simple declaration specifiers of typet_decltype
ort_typeof
. Other simple declaration specifiers will returnnull
.- Since:
- 5.2
-
setType
void setType(int type) Not allowed on frozen ast.- See Also:
-
setType
Not allowed on frozen ast. Sets this declaration specifier to the type based onIBasicType.Kind
.- Since:
- 5.2
-
setSigned
void setSigned(boolean value) Not allowed on frozen ast.- See Also:
-
setUnsigned
void setUnsigned(boolean value) Not allowed on frozen ast.- See Also:
-
setShort
void setShort(boolean value) Not allowed on frozen ast.- See Also:
-
setLong
void setLong(boolean value) Not allowed on frozen ast.- See Also:
-
setLongLong
void setLongLong(boolean value) Not allowed on frozen ast.- Since:
- 5.2
- See Also:
-
setComplex
void setComplex(boolean value) Not allowed on frozen ast.- Since:
- 5.2
- See Also:
-
setImaginary
void setImaginary(boolean value) Not allowed on frozen ast.- Since:
- 5.2
- See Also:
-
setDeclTypeExpression
Not allowed on frozen ast.- Since:
- 5.2
- See Also:
-