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

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

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

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

See also

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

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

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.

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