Previous: Generating names for CLOS classes and accessors, Up: Generating type definitions by introspection
(generate-types-hierarchy-to-file file root-type &key include-referenced prefix package exceptions prologue interfaces enums flags objects exclusions additional-properties)
Generates definitions for all types in a type hierarchy. Recursively scan types hierarchy (starting from root
and objects
and interfaces
) (except types that were specifically excluded) and generate defintion for every mentioned type. Parameters control various aspects of definition generation.
Example of usage:
(generate-types-hierarchy-to-file "gtk.generated-classes.lisp" "GtkObject" :include-referenced t :prefix "Gtk" :package (or (find-package :gtk) (make-package :gtk)) :exceptions `(("GObject" gobject:g-object) ("GtkObject" ,(intern "GTK-OBJECT" (find-package :gtk))) ("GInitiallyUnowned" gobject::g-initially-unowned) ("GtkWindow" ,(intern "GTK-WINDOW" (find-package :gtk))) ("GtkUIManager" ,(intern "UI-MANAGER" (find-package :gtk))) ("GtkUIManagerItemType" ,(intern "UI-MANAGER-ITEM-TYPE" (find-package :gtk)))) :prologue (format nil "(in-package :gtk)") :interfaces '("GtkBuildable" "GtkCellEditable" ...) :objects '("GtkSettings" "GtkRcStyle" ...) :flags '("GtkTextSearchFlags" "GtkAccelFlags" ...) :enums '("GtkTextDirection" "GtkSizeGroupMode" ...) :exclusions '("PangoStretch" "PangoVariant" ...) :additional-properties '(("GtkTreeViewColumn" (:cffi gtk::tree-view gtk::tree-view-column-tree-view g-object "gtk_tree_view_column_get_tree_view" nil) ...) ...))