Class IntegerSpecAttribute
A collection of constants and methods that relate to integer specification attributes.
Inheritance
Inherited Members
Namespace: Flame.TypeSystem
Assembly: Flame.dll
Syntax
public static class IntegerSpecAttribute
Fields
| Improve this Doc View SourceAttributeName
The attribute name for integer specification attributes.
Declaration
public const string AttributeName = "IntegerSpec"
Field Value
Type | Description |
---|---|
System.String |
Methods
| Improve this Doc View SourceCreate(IntegerSpec)
Creates an intrinsic attribute that encodes an integer spec.
Declaration
public static IntrinsicAttribute Create(IntegerSpec specification)
Parameters
Type | Name | Description |
---|---|---|
IntegerSpec | specification | An integer specification. |
Returns
Type | Description |
---|---|
IntrinsicAttribute | An intrinsic attribute. |
GetIntegerSpecOrNull(IType)
Gets a type's integer spec if it has one.
Declaration
public static IntegerSpec GetIntegerSpecOrNull(this IType type)
Parameters
Type | Name | Description |
---|---|---|
IType | type | The type to examine. |
Returns
Type | Description |
---|---|
IntegerSpec | An integer spec if |
IsIntegerType(IType)
Tests if a particular type is an integer type.
Declaration
public static bool IsIntegerType(this IType type)
Parameters
Type | Name | Description |
---|---|---|
IType | type | The type to examine. |
Returns
Type | Description |
---|---|
System.Boolean |
|
IsSignedIntegerType(IType)
Tests if a particular type is a signed integer type.
Declaration
public static bool IsSignedIntegerType(this IType type)
Parameters
Type | Name | Description |
---|---|---|
IType | type | The type to examine. |
Returns
Type | Description |
---|---|
System.Boolean |
|
IsUnsignedIntegerType(IType)
Tests if a particular type is an unsigned integer type.
Declaration
public static bool IsUnsignedIntegerType(this IType type)
Parameters
Type | Name | Description |
---|---|---|
IType | type | The type to examine. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Read(IntrinsicAttribute)
Reads out an integer spec attribute as an integer spec.
Declaration
public static IntegerSpec Read(IntrinsicAttribute attribute)
Parameters
Type | Name | Description |
---|---|---|
IntrinsicAttribute | attribute | The integer spec attribute to read. |
Returns
Type | Description |
---|---|
IntegerSpec | The integer spec described by the attribute. |