Commit 5cff6c7a authored by Liam Healy's avatar Liam Healy

GSL objects: export make-* symbol, other fixes to defmobject

In the defmobject expansion, export the make-<class> symbol, include
keywords in call to make-instance, add a docstring.
parent ed5ce113
;; Definition of GSL objects and ways to use them.
;; Liam Healy, Sun Dec 3 2006 - 10:21
;; Time-stamp: <2008-12-14 23:15:01EST gsl-objects.lisp>
;; Time-stamp: <2008-12-15 18:21:19EST gsl-objects.lisp>
;; $Id$
(in-package :gsl)
......@@ -18,7 +18,8 @@
(variables-used-in-c-arguments allocation-args))
(variables-used-in-c-arguments initialize-args)))
(variables-used-in-c-arguments initialize-args))
(settingp (make-symbol "SETTINGP")))
(defclass ,class (gsl-object)
......@@ -49,21 +50,28 @@
:export nil
:index (reinitialize-instance ,class))
(export ',maker)
(defun ,maker
,@(cons (list (first cl-initialize-args) nil 'settingp)
,@(cons (list (first cl-initialize-args) nil settingp)
(rest cl-initialize-args)))
(let ((object (make-instance 'hankel size)))
(when settingp
,(format nil "Create the GSL object representing a ~a (class ~a)."
description class)
(let ((object
(make-instance ',class ,@(symbol-keyword-symbol cl-alloc-args))))
(when ,settingp
(lambda (sym)
(list (intern (symbol-name sym) :keyword) sym))
,@(symbol-keyword-symbol cl-initialize-args)))
(defun symbol-keyword-symbol (symbol)
(if (listp symbol)
(mapcan #'symbol-keyword-symbol symbol)
(list (intern (symbol-name symbol) :keyword)
;;; To make-load-form
;;; (make-basis-spline (bspline-order bspline) (number-of-breakpoints bspline))
;;; Then initialize by making a vector from (breakpoint i bspline)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment