diff --git a/monastery.lisp b/monastery.lisp index af36f3a..1388735 100644 --- a/monastery.lisp +++ b/monastery.lisp @@ -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 diff --git a/package.lisp b/package.lisp index 59359b7..82ca5c9 100644 --- a/package.lisp +++ b/package.lisp @@ -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)