CxTypeSimple

Description

sealed class Tinman.Core.Cx.CxTypeSimple

Derived from

CxType abstract

A reference to a simple built-in type that is represented by a single keyword:

bool
char
double
float
int
long
object
sbyte
short
string
void

The CxTypeSimple class has fly-weight instances, so the == / != operators may be used to compare for the same type, instead of calling ICxTypeQuery.IsSameAs1. Also, for resolving a fly-weight instance, the CxType.ResolvedContext method must be used, instead of ICxReference.Resolved

Public / Constants

Bool


[ShutdownSurvive]
public static readonly attribute Bool → (CxTypeSimple)

The boolean type: bool

This is a 32-bit integer type, where 0 maps to false and all other values map to true.

Char


[ShutdownSurvive]
public static readonly attribute Char → (CxTypeSimple)

The unicode character type: char

This is a 16-bit unsigned integer type for UTF-16 characters.

Double


[ShutdownSurvive]
public static readonly attribute Double → (CxTypeSimple)

The 64-bit floating-point number type (IEEE754): double

Float


[ShutdownSurvive]
public static readonly attribute Float → (CxTypeSimple)

The 32-bit floating-point number type (IEEE754): float

Int


[ShutdownSurvive]
public static readonly attribute Int → (CxTypeSimple)

The 32-bit signed integer type: int

Long


[ShutdownSurvive]
public static readonly attribute Long → (CxTypeSimple)

The 64-bit signed integer type: long

Null


[ShutdownSurvive]
public static readonly attribute Null → (CxTypeSimple)

The pseudo-type for null reference values.

For this type, Keyword returns ? and TypeName returns CxName.Invalid. The type cannot be used in source code. It is only used internally, for example by the null literal expressions to report its type.

Obj


[ShutdownSurvive]
public static readonly attribute Obj → (CxTypeSimple)

The root reference type: object

All non-struct types (see CxDeclarationType) are assignable to this type.

SByte


[ShutdownSurvive]
public static readonly attribute SByte → (CxTypeSimple)

The 8-bit signed integer type: sbyte

Short


[ShutdownSurvive]
public static readonly attribute Short → (CxTypeSimple)

The 16-bit signed integer type: short

Str


[ShutdownSurvive]
public static readonly attribute Str → (CxTypeSimple)

The string type: string

Void


[ShutdownSurvive]
public static readonly attribute Void → (CxTypeSimple)

The void type (i.e. no type): void

Public / Constructors

For​Keyword


public static method ForKeyword → (1)

keyword in : string

The type keyword, see Keyword.

returns → CxTypeSimple

The CxTypeSimple object or null if keyword in is not a type keyword.

Returns the CxTypeSimple object for the given type keyword.

Public / Attributes

Keyword


[Constant]
public attribute Keyword → (get)

value : string

[not-empty]
The type keyword.

The simple type keyword.

Type​Name


[Constant]
public attribute TypeName → (get)

value : CxName

The type name.

Returns the fully-qualified type name of this simple type.