tracking: register container instance after creation, item-head-fields as slot
This commit is contained in:
parent
98d21061f5
commit
989a380a53
1 changed files with 10 additions and 5 deletions
|
@ -35,19 +35,24 @@
|
|||
|
||||
(defclass container ()
|
||||
((item-class :reader item-class :initarg :item-class :initform 'track)
|
||||
(short-name :reader short-name :initarg :short-name)
|
||||
(short-name :reader short-name :initarg :short-name :initform :track)
|
||||
(table-name :reader table-name :initarg :table-name :initform :tracks)
|
||||
(index-factory :reader index-factory :initarg :index-factory
|
||||
:initform #'default-indexes)
|
||||
(force-insert-when :reader force-insert-when
|
||||
:initarg :force-insert-when :initform nil)
|
||||
(storage :reader storage :initarg :storage)))
|
||||
(storage :reader storage :initarg :storage)
|
||||
(item-head-fields :accessor item-head-fields)))
|
||||
|
||||
(defun make-container (st)
|
||||
(make-instance 'container :short-name :tr :storage st))
|
||||
(make-instance 'container :short-name :trk :storage st))
|
||||
|
||||
(defun item-head-fields (cont)
|
||||
(shape:head-fields (make-instance (item-class cont))))
|
||||
(defmethod initialize-instance :after ((cont container) &key &allow-other-keys)
|
||||
(setf (gethash (short-name cont) *containers*) cont)
|
||||
(setf (item-head-fields cont) (shape:head-fields (make-instance (item-class cont)))))
|
||||
|
||||
;(defun item-head-fields (cont)
|
||||
; (shape:head-fields (make-instance (item-class cont))))
|
||||
|
||||
(defun make-item (cont &rest head)
|
||||
(make-instance (item-class cont) :head head :container cont))
|
||||
|
|
Loading…
Add table
Reference in a new issue