feat: dictionary object created with debugging info
This commit is contained in:
parent
56ce72e492
commit
adb557857e
2 changed files with 19 additions and 1 deletions
|
|
@ -1,5 +1,18 @@
|
|||
(in-package :monastery)
|
||||
|
||||
;; instance of the object
|
||||
(defclass dictionary ()
|
||||
((pointer :initarg :pointer :reader dictionary-pointer)
|
||||
(dict-path :initarg :dict-path :reader dictionary-path)
|
||||
(closedp :initform nil :reader dictionary-closed-p)
|
||||
(operation-count :initform 0 :reader dictionary-operation-count)
|
||||
(created-at :initform (get-universal-time) :reader dictionary-created-at)))
|
||||
|
||||
(defmethod print-object ((d dictionary) stream)
|
||||
(print-unreadable-object (d stream :type t :identity t)
|
||||
(format stream "~A (~A)" (slot-value d 'dict-path)
|
||||
(slot-value d 'closedp))))
|
||||
|
||||
;; conditions
|
||||
|
||||
;;; dict-error is the general interface error, when handling conditions
|
||||
|
|
|
|||
|
|
@ -3,8 +3,13 @@
|
|||
(:export
|
||||
#:dict-init #:dict-close #:with-dict
|
||||
|
||||
; error
|
||||
#:dict-error #:dict-initialization-error #:dict-operation-error
|
||||
#:dict-error-message))
|
||||
#:dict-error-message
|
||||
|
||||
;dict object
|
||||
#:dictionary-closed-p #:dictionary-path #:dictionary-operation-count
|
||||
#:dictionary-created-at))
|
||||
|
||||
|
||||
(in-package :monastery)
|
||||
|
|
|
|||
Loading…
Reference in a new issue