Class Ffi-Generator

This class encapsulates the generation of FFI bindings from XML files generated by GCC-XML.

Part of:

class cffi-generator, package c2ffi

Direct Subclass

cffi-generatorThis class generates bindings for CFFI.

Slot

bindingsReader:ffi-bindings; Type:list.
nameInitform:ffi, Initargs::name; Accessors:ffi-name.
name-mappingsInitform:(make-hash-table test #'equal); Reader:ffi-name-mappings.
output-fileInitargs::output-file; Accessors:ffi-output-file.
parse-treeInitargs::parse-tree; Accessors:ffi-parse-tree; Type:list.
type-mappingsInitform:(make-hash-table test #'equal); Reader:ffi-type-mappings.
xml-fileInitargs::xml-file; Accessors:ffi-xml-file.

Direct Method

bindings-for-nodeReturns a list of FFI binding forms for node. Type-key should be a keyword symbol of the node ty...
ffi-output-file
files-to-ignoreGCC-XML includes standard definitions from its own header files. These should probably be ignore...
generate-bindingsGenerates bindings from the XML-File, if the slot is set, or from the parse-tree. If neither XML...
make-ffi-bindingsSets the bindings slot to a list of FFI bindings.
make-id-mappingsCreates name and type-mappings from FFI-GEN's parse-tree.
name-with-idReturns a name associated with ID. This is necessary when a struct or union (and others?) are de...
parse-xmlParses an XML file created by GCC-XML and sets FFI-GEN's parse-tree slot to a Lisp tree as genera...
sort-bindingsSorts the FFI bindings so that prerequisite definitions are before where they are needed. I'm no...
translate-typeTranslates a C typedef to an FFI type. Returns nil if node is not a type definition, a symbol or...
type-with-idReturns the FFI type for the given id string. This tracks down any necessary references.
write-bindingsWrites the generated bindings out to output-file.