make-instanceGBBopen Corereset-unit-classnext-class-instance-numberGoTo Top

next-class-instance-number   unit-class-name-or-instance => integer[Generic Function]

Purpose
Increment and return the instance-name counter value associated with a unit class.

Method signatures

next-class-instance-number  (unit-class-name symbol) => integer
next-class-instance-number  (unit-instance standard-unit-instance) => integer

Package   :gbbopen

Module   :gbbopen-core

Arguments and values

unit-class-name-or-instance     A unit instance or a symbol naming a unit class
integer     An integer

Returns
The incremented instance-name counter value associated with the unit class.

See also
    change-class
    class-instances-count
    initial-class-instance-number
    make-instance

Examples
Increment and return the next instance-name number of unit instances of ksa:

  > (next-class-instance-number 'ksa)
  8
  >

Change the class of unit instance hyp from probable-hyp to rejected-hyp:

  > (change-class hyp 'rejected-hyp 
      :instance-name (next-class-instance-number 'rejected-hyp))
  #<rejected-hyp 1409 (896 388) .68>
  >
Note that the :instance-name initarg can be eliminated if both the old and new classes for hyp are using the global instance-name counter.

Note
The next-class-instance-number function increments the global instance-name counter value if the :use-global-instance-name-counter class option is true for the unit class.


The GBBopen Project


make-instanceGBBopen Corereset-unit-classnext-class-instance-numberGoTo Top