Changeset 2584
- Timestamp:
- 02/21/08 07:41:43 (9 months ago)
- Files:
-
- trunk/bknr/datastore/src/data/object.lisp (modified) (1 diff)
- trunk/bknr/datastore/src/indices/category-index.lisp (modified) (1 diff)
- trunk/bknr/datastore/src/indices/indexed-class.lisp (modified) (4 diffs)
- trunk/bknr/datastore/src/indices/indices.lisp (modified) (5 diffs)
- trunk/bknr/datastore/src/indices/tutorial.lisp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/bknr/datastore/src/data/object.lisp
r2528 r2584 128 128 ((id :initarg :id :reader store-object-id 129 129 :index-type unique-index 130 :index-initargs (:test #'eql :rehash-size 10000 :size 10000)130 :index-initargs (:test #'eql) 131 131 :index-reader store-object-with-id :index-values all-store-objects 132 132 :index-mapvalues map-store-objects)) trunk/bknr/datastore/src/indices/category-index.lisp
r2529 r2584 121 121 (:default-initargs :test #'equal)) 122 122 123 (defmethod initialize-instance :after ((index category-index) &key (tree-test #'eql) &allow-other-keys)123 (defmethod initialize-instance :after ((index category-index) &key (tree-test #'eql)) 124 124 (with-slots (tree) index 125 125 (setf tree (make-category-tree :test tree-test)))) trunk/bknr/datastore/src/indices/indexed-class.lisp
r2508 r2584 93 93 (nreverse result))) 94 94 95 (defmethod direct-slot-definition-class ((class indexed-class) &key index index-type &allow-other-keys)95 (defmethod direct-slot-definition-class ((class indexed-class) &key index index-type) 96 96 (if (or index index-type) 97 97 'index-direct-slot-definition … … 234 234 (reinitialize-class-indices class)) 235 235 236 (defun validate-index-declaration (class indices) 237 (dolist (index indices) 238 (when (and (getf (cdr index) :index) 239 (getf (cdr index) :index-type)) 240 (error "Can't have both :INDEX and :INDEX-TYPE in index ~A of ~A" (car index) class)))) 241 242 (defmethod initialize-instance :before ((class indexed-class) &key class-indices) 243 (validate-index-declaration class class-indices)) 244 245 (defmethod reinitialize-instance :before ((class indexed-class) &key class-indices) 246 (validate-index-declaration class class-indices)) 247 236 248 ;;; avoid late instantiation 237 249 238 250 #+(or allegro cmu openmcl sbcl) 239 (defmethod initialize-instance :after ((class indexed-class) &key &allow-other-keys)251 (defmethod initialize-instance :after ((class indexed-class) &key) 240 252 (compute-class-indices class (indexed-class-index-definitions class)) 241 253 (reinitialize-class-indices class)) 242 254 243 255 #+(or allegro cmu openmcl sbcl) 244 (defmethod reinitialize-instance :after ((class indexed-class) &key &allow-other-keys)256 (defmethod reinitialize-instance :after ((class indexed-class) &key) 245 257 (compute-class-indices class (indexed-class-index-definitions class)) 246 258 (reinitialize-class-indices class)) … … 259 271 (index-holder-index old-holder)))))))) 260 272 261 (defmethod reinitialize-instance :before ((class indexed-class) &key &allow-other-keys)273 (defmethod reinitialize-instance :before ((class indexed-class) &key) 262 274 (setf (indexed-class-old-indices class) (indexed-class-indices class) 263 275 (indexed-class-indices class) nil)) … … 312 324 (defvar *indices-remove-p* t) 313 325 314 (defmethod make-instance :around ((class indexed-class) &rest initargs) 315 (declare (ignore initargs)) 326 (defmethod make-instance :around ((class indexed-class) &key) 316 327 (let* ((*in-make-instance-p* t) 317 328 (object (call-next-method)) trunk/bknr/datastore/src/indices/indices.lisp
r2580 r2584 109 109 ()) 110 110 111 (defmethod initialize-instance :after ((index string-unique-index) &key (test #'equal) &allow-other-keys)111 (defmethod initialize-instance :after ((index string-unique-index) &key (test #'equal)) 112 112 (with-slots (hash-table) index 113 113 (setf hash-table (make-hash-table :test test)))) … … 165 165 :reader class-index-index-superclasses))) 166 166 167 (defmethod initialize-instance :after ((index class-index) &key index-superclasses &allow-other-keys)167 (defmethod initialize-instance :after ((index class-index) &key index-superclasses) 168 168 (setf (slot-value index 'index-superclasses) 169 169 index-superclasses)) … … 232 232 (array :initarg :array :accessor array-index-array))) 233 233 234 (defmethod initialize-instance :after ((index array-index) &key slots dimensions &allow-other-keys)234 (defmethod initialize-instance :after ((index array-index) &key slots dimensions) 235 235 (setf (array-index-array index) (make-array dimensions :initial-element nil) 236 236 (array-index-slot-names index) slots)) … … 321 321 :accessor skip-list-index-index-nil))) 322 322 323 (defmethod initialize-instance :after ((index skip-list-index) &key 324 slots index-nil &allow-other-keys) 323 (defmethod initialize-instance :after ((index skip-list-index) &key slots index-nil) 325 324 (unless (<= (length slots) 1) 326 325 (error "Can not create slot-index with more than one slot.")) … … 375 374 376 375 (defmethod cursor-next ((slc skip-list-cursor) &optional eoc) 376 (declare (ignore eoc)) 377 377 (sl-cursor-next slc)) 378 378 379 379 (defmethod cursor-prev ((slc skip-list-cursor) &optional eoc) 380 (declare (ignore eoc)) 380 381 (sl-cursor-prev slc)) 381 382 trunk/bknr/datastore/src/indices/tutorial.lisp
r1673 r2584 556 556 value, else slots with NIL value are treated as unbound slots."))) 557 557 558 (defmethod initialize-instance :after 559 ((index slot-index) &key (test #'eql) slots index-nil 560 &allow-other-keys) 558 (defmethod initialize-instance :after ((index slot-index) &key (test #'eql) slots index-nil) 561 559 (unless (<= (length slots) 1) 562 560 (error "Can not create slot-index with more than one slot."))
