Type

The base type for all type structures.

Constructors

this
this(Type next, TYP tid)

Constructs a Type object.

Members

Functions

alignSizeOf
size_t alignSizeOf(TargetTInfo tti = null)

Returns the align size of this type. Returns 0 if it could not be determined.

arrayOf
TypeDArray arrayOf()

Returns a dynamic array type using this type as its base.

arrayOf
TypeAArray arrayOf(Type key)

Returns an associative array type using this type as its base.

arrayOf
TypeSArray arrayOf(size_t size)

Returns a static array type using this type as its base.

baseType
Type baseType()

Returns the base type if this is an enum or typedef, or itself otherwise.

flagsOf
TypeFlags flagsOf()

Returns the flags of this type.

hasBaseType
bool hasBaseType()

Returns true if this type has a base type (enum or typedef.)

hasBoolVal
bool hasBoolVal()

Returns true if this type has a boolean value.

hasSymbol
bool hasSymbol()

Returns true if this type has a symbol.

isAArray
bool isAArray()

Returns true if associative array type.

isBaseBool
bool isBaseBool()

Like isBool(). Also checks base types of typedef/enum.

isBaseComplex
bool isBaseComplex()

Like isComplex(). Also checks base types of typedef/enum.

isBaseFloating
bool isBaseFloating()

Like isFloating(). Also checks base types of typedef/enum.

isBaseImaginary
bool isBaseImaginary()

Like isImaginary(). Also checks base types of typedef/enum.

isBaseReal
bool isBaseReal()

Like isReal(). Also checks base types of typedef/enum.

isBaseScalar
bool isBaseScalar()

Like isScalar(). Also checks base types of typedef/enum.

isBasic
bool isBasic()

Returns true if this is a basic type.

isBool
bool isBool()

Returns true if bool type.

isClass
bool isClass()

Returns true if class type.

isComplex
bool isComplex()

Returns true if this type is a complex number type.

isConst
bool isConst()

Returns true if const type. D2.

isDArray
bool isDArray()

Returns true if dynamic array type.

isDelegate
bool isDelegate()

Returns true if Delegate type.

isDorSArray
bool isDorSArray()

Returns true if dynamic or static array type.

isEnum
bool isEnum()

Returns true if enum type.

isError
bool isError()

Returns true if error type.

isFloating
bool isFloating()

Returns true if this type is a floating point number type.

isFunction
bool isFunction()

Returns true if function type.

isIdentifier
bool isIdentifier()

Returns true if identifier type.

isImaginary
bool isImaginary()

Returns true if this type is an imaginary number type.

isImmutable
bool isImmutable()

Returns true if immutable type. D2.

isIntegral
bool isIntegral()

Returns true if this type is an integral number type.

isParameter
bool isParameter()

Returns true if parameter type.

isParameters
bool isParameters()

Returns true if parameters type.

isPointer
bool isPointer()

Returns true if pointer type.

isReal
bool isReal()

Returns true if this type is a real number type.

isReference
bool isReference()

Returns true if reference type.

isSArray
bool isSArray()

Returns true if static array type.

isScalar
bool isScalar()

Returns true for scalar types.

isSigned
bool isSigned()

Returns true if the type is signed.

isStruct
bool isStruct()

Returns true if struct type.

isTInstance
bool isTInstance()

Returns true if template instance type.

isTuple
bool isTuple()

Returns true if tuple type.

isTypedef
bool isTypedef()

Returns true if typedef type.

isUnsigned
bool isUnsigned()

Returns true if the type is unsigned.

isZeroInit
bool isZeroInit()

Returns true if this type is initialized with zero(s).

mangleChar
char mangleChar()

Returns the mangle character for this type.

mangledTypeInfoIdent
Identifier* mangledTypeInfoIdent(IdTable idtable)

Returns the mangled TypeInfo identifier for this type.

opEquals
bool opEquals(Type other)

Returns true if this type equals the other one.

ptrTo
TypePointer ptrTo()

Returns a pointer type to this type.

sizeOf
size_t sizeOf(TargetTInfo tti = null)

Returns the byte size of this type. Returns 0 if it could not be determined.

to
Class to()

Casts the type to Class.

toMangle
cstring toMangle()

Returns the mangled name of this type.

toText
cstring toText()

Returns the type as a human-readable string.

Variables

mangled
cstring mangled;

The mangled identifier of the type.

next
Type next;

The next type in the type structure.

symbol
Symbol symbol;

Not null if this type has a symbol.

tid
TYP tid;

The ID of the type.

Meta