clear-space-instancesBlackboard Repositorydefine-space-classconfirm-if-blackboard-repository-not-empty-pGoTo Top

confirm-if-blackboard-repository-not-empty-p   &key describe-non-empty-repository pending-action => boolean[Function]

Purpose
Obtain confirmation if the blackboard repository is not empty.

Package   :gbbopen

Module   :gbbopen-core

Arguments and values

describe-non-empty-repository     A generalized boolean (default is nil)
pending-action     A string (default is "deleted")
boolean     A generalized boolean

Returns
True if the blackboard repository is empty or the user has confirmed positively; otherwise nil.

Description
If the blackboard repository is not empty and describe-non-empty-repository is true, the blackboard repository is described (using describe-blackboard-repository) when asking for confirmation.

The pending-action string is used to indicate to the user what is to happen if confirmed positively.

See also
    empty-blackboard-repository-p

Examples

  > (confirm-if-blackboard-repository-not-empty-p)
  The blackboard repository is not empty.
  Continue anyway (the current contents will be deleted) [y or n]? n
  nil
  > (confirm-if-blackboard-repository-not-empty-p 
       describe-non-empty-repository 't)

  Space Instance                        Contents
  --------------                        --------
  known-world                           53 instances (52 location; 1 path)

  Unit Class                            Instances
  ----------                            ---------
  control-shell                                 1 *
  ks                                            4 +
  ksa-queue                                     2 +
  location                                     52  
  ordered-ksa-queue                             1 +
  path                                          1  
  standard-space-instance                       1  
                                        ---------
                                               62 instances
  The above blackboard repository is not empty.
  Continue anyway (the current contents will be deleted) [y or n]? n
  nil
  > (confirm-if-blackboard-repository-not-empty-p :pending-action "happy")
  The blackboard repository is not empty.
  Continue anyway (the current contents will be happy) [y or n]? y
  t
  >


The GBBopen Project


clear-space-instancesBlackboard Repositorydefine-space-classconfirm-if-blackboard-repository-not-empty-pGoTo Top