- All Superinterfaces:
ObjectType,Type,UnqualifiedObjectType
- All Known Subinterfaces:
EnumerationType,FloatingType,IntegerType,SignedIntegerType,SignedOrUnsignedIntegerType,StandardBasicType,StandardSignedIntegerType,StandardUnsignedIntegerType,UnsignedIntegerType
The arithmetic types are "char", the signed and unsigned integer types,
enumeration types, and the floating types (which include the real and the
complex floating types).
The arithmetic type hierarchy can best be described by the following outline,
which defines a directed acyclic graph. Note that it is not a tree, as the
IntegerType and StandardBasicType categories have in their
intersection the type char and the
SignedOrUnsignedIntegerTypes.
UnqualifiedObjectType
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.civl.abc.ast.type.IF.Type
Type.TypeKind -
Method Summary
Modifier and TypeMethodDescriptionbooleanIs this type in the complex domain? The arithmetic types are partitioned into the real and the complex domains.booleanIs this type in the real domain? The arithmetic types are partitioned into the real and the complex domains.booleanIs this an enumeration type? If true, this object can be safely cast to EnumerationType.booleanIs this a floating type? This includes the three real floating types and the three complex floating types.booleanIs this an integer type? Note that this includes "signed char" and "unsigned char".Methods inherited from interface dev.civl.abc.ast.type.IF.ObjectType
hasKnownConstantSize, isComplete, isConstantQualifiedMethods inherited from interface dev.civl.abc.ast.type.IF.Type
compatibleWith, equivalentTo, getId, ignoreQualifiersAtomic, isScalar, isVariablyModified, kind, print
-
Method Details
-
isInteger
boolean isInteger()Is this an integer type? Note that this includes "signed char" and "unsigned char". This method is equivalent to isSigned() || isUnsigned, but is provided for convenience.- Returns:
- true iff this is a signed or unsigned integer type
-
isFloating
boolean isFloating()Is this a floating type? This includes the three real floating types and the three complex floating types. If true, this object can be safely cast to FloatingType. $real is also included.- Returns:
- true iff this is a floating type
-
isEnumeration
boolean isEnumeration()Is this an enumeration type? If true, this object can be safely cast to EnumerationType.- Returns:
- true iff this is an enumeration type
-
inRealDomain
boolean inRealDomain()Is this type in the real domain? The arithmetic types are partitioned into the real and the complex domains. The complex domain includes the three complex types. Everything else (enumerations, signed and unsigned integer types, char) falls under the real domain.- Returns:
- true iff this type is in the real domain
-
inComplexDomain
boolean inComplexDomain()Is this type in the complex domain? The arithmetic types are partitioned into the real and the complex domains. The complex domain includes the three complex types. Everything else (enumerations, signed and unsigned integer types, char) falls under the real domain.- Returns:
- true iff this type is in the complex domain
-