Macaulay2 » Documentation
Packages » ForeignFunctions » ForeignType
next | previous | forward | backward | up | index | toc

ForeignType -- abstract foreign type

Description

This is the abstract class from which all other foreign type classes should inherit. All ForeignType objects should have, at minimum, two key-value pairs:

  • Name, a string, a human-readable name of the class for display purposes, used by net(ForeignType).
  • Address, a pointer, a pointer to the corresponding ffi_type object, used by address(ForeignType).

Menu

Subtypes

Types of foreign type:

Methods that use a foreign type:

  • address(ForeignType) -- see address -- pointer to type or object
  • foreignArrayType(ForeignType,ZZ) -- see foreignArrayType -- construct a foreign array type
  • foreignArrayType(String,ForeignType,ZZ) -- see foreignArrayType -- construct a foreign array type
  • ForeignType * ZZ -- see foreignArrayType -- construct a foreign array type
  • ZZ * ForeignType -- see foreignArrayType -- construct a foreign array type
  • foreignFunction(Pointer,String,ForeignType,VisibleList) -- see foreignFunction -- construct a foreign function
  • foreignFunction(SharedLibrary,String,ForeignType,ForeignType) -- see foreignFunction -- construct a foreign function
  • foreignFunction(SharedLibrary,String,ForeignType,VisibleList) -- see foreignFunction -- construct a foreign function
  • foreignFunction(String,ForeignType,ForeignType) -- see foreignFunction -- construct a foreign function
  • foreignFunction(String,ForeignType,VisibleList) -- see foreignFunction -- construct a foreign function
  • foreignPointerArrayType(ForeignType) -- see foreignPointerArrayType -- construct a foreign pointer array type
  • foreignPointerArrayType(String,ForeignType) -- see foreignPointerArrayType -- construct a foreign pointer array type
  • foreignSymbol(SharedLibrary,String,ForeignType) -- see foreignSymbol -- get a foreign symbol
  • foreignSymbol(String,ForeignType) -- see foreignSymbol -- get a foreign symbol
  • net(ForeignType)
  • ForeignType * voidstar -- dereference a voidstar object
  • ForeignType ForeignObject -- cast a foreign object to the given foreign type
  • ForeignType Pointer -- dereference a pointer
  • getMemory(ForeignType) -- see getMemory -- allocate memory using the garbage collector
  • new ForeignType (missing documentation)
  • size(ForeignType) -- size of a foreign type

For the programmer

The object ForeignType is a type, with ancestor classes Type < MutableHashTable < HashTable < Thing.


The source of this document is in ForeignFunctions.m2:828:0.