GrData

Contains type information and D linked functions. \ Must be the same between the compilation and the runtime. ___ Only use the *add*X() functions ***before*** compilation happen, else they won't be linked.

class GrData {}

Members

Functions

addEnum
GrType addEnum(string name, string[] fields, uint fileId, bool isPublic)

Define an enum type.

addIntConstant
GrType addIntConstant(string name, int value)

Primitive global constants, call registerIntConstant at the start of the parser. \ Not used for now.

addLibrary
void addLibrary(GrLibrary library)

Add types and primitives defined in the library

addTemplateAlias
GrType addTemplateAlias(string name, GrType type, uint fileId, bool isPublic)

Define an alias of another type.

addTypeAlias
GrType addTypeAlias(string name, GrType type, uint fileId, bool isPublic)

Define an alias of another type.

clearTemplateAliases
void clearTemplateAliases()
Undocumented in source. Be warned that the author may not have intended to support it.
getClass
GrClassDefinition getClass(string mangledName, uint fileId, bool isPublic)

Return the class definition.

getEnum
GrEnumDefinition getEnum(string name, uint fileId)

Return the enum definition.

getForeign
GrForeignDefinition getForeign(string mangledName)

Return the user-type definition.

getPrimitive
GrPrimitive getPrimitive(string mangledName)
GrPrimitive getPrimitive(string name, GrType[] signature)

Returns the declared primitive definition.

getTypeAlias
GrTypeAliasDefinition getTypeAlias(string name, uint fileId)

Return the type alias definition.

isClass
bool isClass(string name, uint fileId, bool isPublic)

Is the class defined ?

isEnum
bool isEnum(string name, uint fileId, bool isPublic)

Is the enum defined ?

isForeign
bool isForeign(string name)

Is the user-type defined ?

isPrimitiveDeclared
bool isPrimitiveDeclared(string mangledName)

Is the primitive already declared ?

isSignatureCompatible
bool isSignatureCompatible(GrType[] first, GrType[] second, uint fileId, bool isPublic)

Check if the first signature match or can be upgraded (by inheritance) to the second one.

isTypeAlias
bool isTypeAlias(string name, uint fileId, bool isPublic)

Is the type alias defined ?

isTypeDeclared
bool isTypeDeclared(string name, uint fileId, bool isPublic)

Is a type already declared in this file

registerClass
void registerClass(string name, uint fileId, bool isPublic, string[] templateVariables, uint position)
Undocumented in source. Be warned that the author may not have intended to support it.
reifyPrimitive
GrPrimitive reifyPrimitive(GrPrimitive templatePrimitive, GrType[] signature)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

_abstractClassDefinitions
GrClassDefinition[] _abstractClassDefinitions;

Abstract object types.

_abstractForeignDefinitions
GrAbstractForeignDefinition[] _abstractForeignDefinitions;

Abstract foreign types.

_abstractPrimitives
GrPrimitive[] _abstractPrimitives;

All primitives, used for both the compiler and the runtime.

_aliasDefinitions
GrTypeAliasDefinition[] _aliasDefinitions;

Type aliases

_anyData
GrAnyData _anyData;

Used to validate special primitives.

_callbacks
GrCallback[] _callbacks;
Undocumented in source.
_classDefinitions
GrClassDefinition[] _classDefinitions;

Object types.

_enumDefinitions
GrEnumDefinition[] _enumDefinitions;

Enum types.

_foreignDefinitions
GrForeignDefinition[] _foreignDefinitions;

Opaque pointer types. \ They're pointer only defined by a name. \ Can only be used with primitives.

_primitives
GrPrimitive[] _primitives;

All primitives, used for both the compiler and the runtime.

_templateAliasDefinitions
GrTypeAliasDefinition[] _templateAliasDefinitions;

Type aliases

_variableDefinitions
GrVariableDefinition[] _variableDefinitions;

Variable types

Meta