Class create
defines a function that creates new instances like the interface
predicate new/2. The
first argument is either the name of the class to create instances from
or a class object.
The remaining arguments are packed into the code_vector
object
create<-arguments.
Instances may also be created using class ?:
?- new(CreatePoint, ?(@pce, instance, point)). ?- new(CreatePoint, class(point)? instance).
Class create is more comfortable to write, is faster and does not require the class to exist when the create instance is created.
See create<-_execute
for a description of the creation process. See also pce<-instance, class<-instance, @vmi_new
and new/2.
|<-_execute
call.
|function|class,
argument=any|function ...<-arguments. See create<-_execute
for the evaluation of
create objects.
<-class
using create<-arguments. If create<-class
is a name, it is converted into a class object
and the slot is replaced with the class object
to speed up subsequent execution of this create
object.
Function objects
in create<-arguments are expanded (as with message
objects and ? objects) and finally the VMI new() is
activated to create the new instance.
|function->argument