PCE version 4C man_modulenamespaceid_tablemodified current_idOIxN predicatesN referenceC hash_tablerefersizeOIxNbothI/sNspypceCman_predicate_card identifiermodule last_modifiednamesummary descriptionsee_alsoinherit diagnosticsOIxNspypceRICdateOIx.ðg Nspypce(+Behaviour)CstringOIx&Put Prolog spy-point on implementationOIx¸Put Prolog spy-point on implementation. Behaviour is of the form `class ->send_method' or `class <-get_method'. This predicate locates the method, determines the Prolog predicate implementing the method and calls spy/1 to put a Prolog spy-point on this predicate. Can only be used on methods defined using the Prolog class definition mechanism realised using pce_begin_class/[2,3] and pce_end_class. See also tracepce/1 and breakpce/1.nnnsN send_listOIxN send_listRIOIx,ËýN#send_list(+Ref, +Selector [, +Arg])OI xSend to Cartesian productOI xqThe utility predicate send_list/[2,3] is similar to send/[2,3], but any of the argument may be a list. For each member of the Cartesian product a message is sent: send_list([Box,Circle], pen, 2) Is equivalent to send(Box, pen, 2), send(Circle, pen, 2). The send_list/3 predicate is often used to append menu_items to a menu: send_list(Menu, append, [ menu_item(quit, message(@arg1, free)), , menu_item(hide, message(@arg1, hide)) ]). Is equivalent to send(Menu, append, menu_item(quit, message(@arg1, free)), send(Menu, append, menu_item(hide, message(@arg1, hide)).nnnsNportrayOI xNportrayRIOI x(Ì€×N portray(+Ref)OI x&Like portray/2; prints on the terminalnCchainsizeOIxIeN $tools$16EIXnnsN get_superOIxN get_superRIOIx6¤¨ßN%get_super(+Object, +Message, -Answer)OIx!Invoke metehod on the super-classnnnnsN delegate_toOIxN delegate_toRIOIx+'&žNdelegate_to(+Variable)OIx"Delegate messages to this variableOIxÅThe term `delegate_to(+VariableName)' is expanded by the PCE/Prolog class compiler. It adds the indicated instance-variable to the list of delegate variables of the class (see `class <->delegate').nnnsNpce_image_directoryOIxNpce_image_directoryRIOIx5}WCNpce_image_directory(+Spec)OIx&Define alternate directory with imagesOIxƒThis predicate modifies the value of the class_variable object image.path, adding the path `Spec' expanded using Prolog's path specification mechanism to the search path for images. See also `image ->load', `image->initialise' and `image <-convert'. In addition, it adds the specification at the start of the file_search_path/2 specification for `image'. Normally used as a directive.nnnsNpce_begin_classOIxNpce_begin_classRIOIx2$<N*:- pce_begin_class(+Term, +Super [, +Doc])OIxStart declaration of a classOIx#This declaration, together with `:- pce_end_class.' brackets the definition of a Prolog defined class. A Prolog source module may contain any number of these pairs, defining any number of PCE classes. The arguments are: * Term The first argument defines both the class-name and the term structure of the term when an instance of the class is transformed to a Prolog term. The term is of the form +Class(...+Selector...) of course, `Class' denotes the classname. The (optional) list of selectors denote the (argument free) get behaviours used to obtain the arguments of the term representation. See `T Object -> Term'. The description term may be prefixed using with the `meta-class' to be used. For example, the following declaration ensure the meta-class is `my_meta_class'. my_meta_class:myobject * Super Name of the super-class. This must be the name of a defined PCE class (or a with pce_autoload/2 declared class). * Doc An about 40 characters long summary documentation string that will be visible in this manual tool.OIxIeIeN $examples$12eN $topics$127eIeN $topics$69eIeN $topics$87EN $topics$86XnnsN chain_listOIxN chain_listRIOI x*Üfor_all', `chain <-find_all', etc.OI#xIEN $topics$6XnnsN notracepceOI$xN notracepceRIOI%x.ðg»Nnotracepce(+Behaviour)OI&xRemove an XPCE trace-pointOI'x8Remove an XPCE trace-point. See tracepce/1 for details.nnnsNdefaultOI(xNdefaultRIOI)x0µÅÉNdefault(+Arg, +Default, -Value)OI*x#Handle default arguments in methodsOI+x}The predicate default/3 is only used in the context of a user-defined method declaration. It specifies the value of an omitted (default) argument. If `Arg' is not omitted, its value will be returned in `Value'. Otherwise `Value' will be unified with `Default', the default value for the argument. `Default' may take the form resource(Object, ResourceName) in which case `Value' will be bound to the result of `object <-resource_value: ResourceName'. Note the the message passing kernel passes omitted arguments as @default. Example: image(R, I:[image]) :-> "Set image of object":: default(I, image('pce.bm'), Image), ...nnnsNclass_variableOI,xNclass_variableRIOI-x5u6±N.class_variable(+Name, +Type, +Default, [+Doc])OI.xDeclare a class-variableOI/xThe term class_variable/[3,4] is expanded by the XPCE class-compiler and associates a class_variable object with the current class. This declaration supersedes resource/4. Unlike with the resource/4 declaration, `Default' is a term that is translated as the arguments to send/[2-12].nnnsNvariableOI0xNvariableRIOI1x(U7ûN'variable(+Name, +Type, +Access[, +Doc])OI2xDeclare an instance variableOI3xyNormally, immediately following the `:- pce_begin_class/[2,3]' call, the additional instance variables (slots, attributes) are declared. The arguments are the following: * Name Name of the instance variable. Note that this name must be unique for this class (which implies it cannot be a name that is already used in the super-class as well). * Type Type specification of the possible fillers. See `T Types'. * Access Access to this slot by the `send' and `get' operations. Valid values are: none No access (only via `Object <->slot') get May be fetched with get/3, can be set only with `Object ->slot' send May be set with send/3, can be fetched only with `Object <-slot' (used very rarely). both May be set with send/3, fetched with get/3. * Doc This optional argument is the summary documentation of the variable as can be seen in this manual tool.OI4xIeN $topics$89eN($class/class$M.class.S.instance_variableeN $topics$94EN $topics$127XnnsNsendOI5xNsendRIOI6x6¤®qNsend(+Object, +Message)OI7xInvoke behaviour on an objectOI8xInvoke a send-method on `Object'. `Object' is processed as the initialisation arguments described with new/2. This implies that a complex term is translated into an object before the method is invoked. An atom is translated into an PCE name object. `Message' is an atom or complex term. The functor defines the `selector': the name of the operation to invoke. The arguments are processed as the initialisation arguments described with new/2. Sending a message is composed of the following steps: # Resolve the receiving object For this `Object' is translated into a true XPCE object. # Resolve the selector For this, the functor of the `Message' is determined and translated into an XPCE name object. # Resolve the implementation This can be a send_method object, a variable object or one of the defined object-level implementations. This step also resolves a description of the required arguments. # Translate the arguments of the message to data that satisfies the resolved argument description. # Invoke the implementation If the implementation is defined in Prolog, the interface will make a direct call to it. Otherwise it calls an XPCE interface function for this. If all these steps are executed successfully and running the implementation succeeds, send/2 succeeds. If anything fails, an error is raised through `object ->error'. If the error has `error <-feedback: throw', a Prolog exception is raised. Otherwise the error will be reported by XPCE itself. See also get/3, send_class/3, send_super/2, new/2 and free/1. Novices should seriously consider browsing the user guide named `Programming in XPCE/Prolog' to learn about the basics.nnnsNcheckpceOI9xNcheckpceRIOI:x-®YNcheckpceOI;x Validate consistency of databaseOI_check' on this chain. This will find all visual objects (because they can be found from @display_manager), all classes (though @classes) and all other globally defined objects as well as objects referred from them. * `Unresolved' types. See `@pce <-unresolved_types'. Types that have a Prolog pce_autoload/2 declaration are omitted. The predicate succeeds if no errors where found and fails otherwise. The error messages are written to the host-language window.OI=xIeN$errors$!.checked_objectsEN$class/object$M.object.S._checkXnnsNmanpceOI>xNmanpceRIOI?x.ðdšNmanpce([What])OI@x Start online manual (on subject)OIAx!Start the XPCE online manual tools. Without arguments, this just opens the `PCE Manual' main window. If the argument is the name of a class, it will start the ClassBrowser on this class. If the argument describes a method or variable, it will open the CardViewer on the described object. Syntax: class ->send_method Describes a send-method class <-get_method Describes a get-method class -variable Describes an instance variable For example ?- manpce(button->message). will start the CardViewer on this method. See also editpce/1nnnsN pce_globalOIBxN pce_globalRIOICx/ÎùÐN:- pce_global(+Ref, +Pred|New)OIDxDeclare predicate to create RefOIExThe directive pce_global/2 is part of PCE's facility to create objects only when they are actually needed. Using this approach, the startup-time of large applications can remain short. pce_global/2 is used to declare globally used, often reusable, objects. It records information with an exception handler for undefined objects, creating the object when it is needed. The first argument is the global reference declared. The second is either the name of a predicate capable to create the object or a term nested in new/1 representing the object. Examples: :- pce_global(@center, new(spatial(xref = x+w/2, yref = y+h/2, xref = x+w/2, yref = y+h/2))). :- pce_global(@pce_icon, make_pce_icon). make_pce_icon(Ref) :- new(Ref, bitmap), send(Ref, load, 'pce.bm').OIFxIeIeI eN $examples$10eN $topics$86XnnsN auto_callOIGxN auto_callRIOIHx.œTeNauto_call(+Goal)OIIxCall Goal using autoloadingOIJx Make an `autoload' call, even on Prolog systems that lack this facility. Prologs with autoload will just define this using call/1. Other Prologs can use the require/1 primitive: auto_call(Goal) :- functor(Goal, Name, Arity), require([Name/Arity]), call(Goal).nnnsN pce_serverOIKxN pce_serverRIOILx/Ê-}Npce_server(+Address)OIMxCreate a socket-based serverOINxêThis predicate resides in the library(pce_server). It creates a server socket object at the specified address. This socket may be connected by other processes to give Prolog commands to this XPCE image. pce_server/1 implements a simple generic server. Its sources may be used as a starting point to write dedicated servers for your own XPCE applications. The Unix command xpce-client may be used to connect to xpce sockets. Below is an example of using this library: % xpce ?- pce_server(gnat). yes % xpce-client gnat (pce) send(new(P, picture), open). P = @364728 (pce) exit % The reserved command `exit' causes the server socket to close, closing *only* *this* connection.nnnsNpce_catch_errorsOIOxNpce_catch_errorsRIOIPx,ËýNpce_catch_errors(+Id, +Goal)OIQxHandle PCE errors in codeOIRxThis predicates allows the application to handle errors occurring while `Goal' is called. `ErrorIds' is either an atom representing the id of an error object or a chain of such id's. If one of the given errors occurs the goal will silently fail and `@pce <-last_error' holds the id of the trapped error. Any other error that occurs during the execution of `Goal' will be handled by PCE's normal error handling mechanism. Note that exceptions are `repairable' errors. Exception-handlers may be installed in `@pce <-exception_handlers'.nnnsN send_classOISxN send_classRIOITx6¤³ƒN%send_class(+Object, +Class, +Message)OIUx!Invoke behaviour on another classOIVxLike send/2, but the implementation of the indicated `Class' (possibly inherited from an even higher class) is used rather then the implementation of the class to which `Object' belongs. `Class' must be a super-class of the class to which `Object' belongs. This construct is normally not used directly by the application-programmer. Instead, send_super/2 should be used, which is translated at compile time to a proper send_class/3 call. In exceptional cases, send_class/2 can be used to `skip' the definition of the immediate super-class. This however is bad practice as it may interfere with assumptions made in the class whose behaviour is skipped.nnnsNpce_extend_classOIWxNpce_extend_classRIOIXx,}FN:- pce_extend_class(+ClassName)OIYx*Extend the definition of an existing classOIZxPrepare for the declaration of methods for an already existing PCE class. One should be careful with extending built-in classes as it is easy to corrupt the internal consistency of the extended class or one of its subclasses. The class extension is terminated with pce_end_class/0.OI[xIeI EIXnnsNpce_autoload_allOI\xNpce_autoload_allRIOI]x?K¹÷Npce_autoload_allOI^x-Autoload all classes declared for autoloadingOI_xÏAutoload all classes declared for autoloading. This predicate is normally used before qsave_program/2 to load all classes declared with pce_autoload/2, so qsave_program/2 includes them into the saved state.nnnsNresourceOI`xNresourceRIOIax6¤¨N"resource(:Name, +Class, +FileSpec)OIbxDefine data for a resourcennnnsNeditpceOIcxNeditpceRIOIdx.ðeÄNeditpce(+What)OIex!Start PceEmacs on method or classOIfxóStart PceEmacs on method or class. This only works for classes and methods defined in Prolog, unless ran from a system with the XPCE C-sources installed. Syntax: classname Start editor on class. class->send_method Edit send method class<-get_method Edit get method class-variable Edit class The construct `class-variable' edits the class that defines the variable. If the variable is inherited from the specified class the editor is started on the class the variable is inherited from.nnnsNportray_objectOIgxNportray_objectRIOIhx(U?Nportray_object(+Ref, -Term)OIix2Like object/2, but heuristically expands argumentsnOIjxIeIEN $tools$11XnnsNpce_class_directiveOIkxNpce_class_directiveRIOIlx6n×N:- pce_class_directive(+Goal)OImx&Execute directive on constructed classOInx\This directive is used between pce_begin_class/[2,3] and pce_end_class/0 to invoke additional behaviour on the defined class. XPCE classes are not created immediately at loading a Prolog file holding a class definition. Instead, the specification is translated into a Prolog facts. If, at a later stage, a reference is made to the class, the XPCE class counterpart is created. This schema makes it not possible to invoke behaviour on the class being defined using normal prolog directives. If a goal is declared using pce_class_directive/1, it is stored with the Prolog class definition. When class object is actually created, the declared class-directives are executed. During the execution, @class is a var object referring to the class being build. The preprocessor automatically tags directives of the form :- send(@class, ...) with this directive.nnnsNfreeOIoxNfreeRIOIpx.ë}N free(+Ref)OIqxRemove an objectOIrxÜSend ->free to Ref if it is a valid reference. Defined as free(Ref) :- object(Ref), !, send(Ref, free). free(_). This definition implies free/1 only fails if the object may not be freed (see `object ->protect').nnnsN nobreakpceOIsxN nobreakpceRIOItx6¤¨tNnobreakpce(+Behaviour)OIuxRemove an XPCE break-pointOIvx7Remove an XPCE break-point. See spypce/1 for details.nnnsN pce_groupOIwxN pce_groupRIOIxx0µ¨ÒN:- pce_group(+GroupName)OIyxStart a functional groupOIzxkThis directive may be used while defining an XPCE class, i.e. it can appear between pce_begin_class/[2,3] and pce_end_class/0. Method declarations following this declaration will be given the specified group identifier, facilitating a better overview of the class through the online manual tools (ClassBrowser). The value @default (pushed by pce_begin_class/[2,3]) will assign a method to the same group as an inherited method of the same name or the group miscellaneous if no such method exists. This declaration has no semantic implications. See also pce_begin_class/[2,3], pce_extend_class/1 and `method<-group'.nnnsN send_superOI{xN send_superRIOI|x6¤´RNsend_super(+Object, +Message)OI}x Invoke method on the super-classOI~x»The goal send_super/2 is actually not a predicate. It can be used as such in the context of a method declaration (see :->/2), and will be expanded by the class-compiler into an appropriate send_class/3 predicate-call. Here is a typical example: :- pce_begin_class(myapp, frame). initialise(A) :-> send_super(A, initialise, 'My 1st application'), send(A, append, new(D, dialog)), ... See also send_class/3, send/2 and get_super/3.nnnsN in_pce_threadOIxN in_pce_threadRIOI€x?†žNin_pce_thread(:Goal)OIx Post goal to thread running XPCEOI‚xVThis goal supports XPCE running in the foreground thread, taking care of the GUI and short application oriented actions, while one or more background threads take care of computation and other background tasks. These background threads can call in_pce_thread(Goal) to insert a Prolog goal in the main thread's event-loop. I.e. the Goal is placed in the normal X11 or Windows event-queue. The predicate in_pce_thread/1 returns immediately in the calling thread. In a typical setup, the background thread will compute a result and ask the GUI to present this. The result itself may be passed as an argument to Goal or be represented in the state of dynamic predicates. Note that both threads continue in parallel and therefore update/read of the shared dynamic data must be properly coordinated. If tthe calling thread wishes to wait until the GUI has completed it may use a message queue to achieve this: sync_call(Goal) :- thread_self(Me), in_pce_thread(make_sync_goal(Goal, Me)), thread_get_message(sync_goal(Result, Binding)), ( Result == true -> Goal = Binding ; Result == exception -> throw(Binding) ). make_sync_goal(Goal, Thread) :- ( catch(Goal, E, true) -> ( var(E) -> Msg = sync_goal(true, Goal) ; Msg = sync_goal(exception, E) ) ; Msg = sync_goal(false, _) ), thread_send_message(Thread, Msg).nnnsNpce_openOIƒxNpce_openRIOI„x; N!pce_open(+Object, +Mode, -Stream)OI…xOpen object as Prolog streamOI†xThe predicate pce_open/3 opens an XPCE object as a Prolog stream, so you can use the normal Prolog I/O predicates for reading from, or writing to the object. This predicate works on any object that implements the *as_file methods. Currently these are the subclasses of class source_sink. `source_sink <-read_as_file' `source_sink <-size_as_file' `source_sink ->truncate_as_file' `source_sink ->write_as_file' In addition, the following methods implement partial support: `char_array<-read_as_file' `char_array<-size_as_file' `stream->write_as_file' The stream handle is discarded using Prolog's close/1 predicate. For example, to write to a view, one could use: ... pce_open(View, append, Stream), format(Stream, 'Hello World~n', []), close(View), ... See also `text_buffer ->format'. Reading from a stream is used by the PceEmacs editor to verify the syntax of an entered clause. See also class resource, class text_buffer, class_file and class source_sink, as well as the documentation on stream-handling of your Prolog system.nnnsNbreakpceOI‡xNbreakpceRIOIˆx.ðgfNbreakpce(+Behaviour)OI‰x*Put XPCE break-point on method or variableOIŠxàPut XPCE break-point on method or variable. Functionality is like tracepce/1, but the system will break into the interactive tracer when the behaviour is called. See also `program_object->break', spypce/1 and nobreakpce/1.nnnsNgetOI‹xNgetRIOIŒx6¤²?Nget(+Object, +Message, -Answer)OIx"Invoke behaviour returning a valueOIŽx The predicate get/3 is like send/2, but where send-behaviour acts as a boolean procedure, get/3 acts as a function, requesting a value from the receiving object. In general, get-behaviour does not modify the object base, with the possible exception of creating new instances that serve as answer to the query. Send-behaviour is intended to modify the receiving object. Nothing in the implementation however enforces this, and some get-behaviour has side-effects beyond creating the answer. The answer of get-behaviour can be an attribute of an object (e.g. `graphical<-area' returns the area object associated with the graphical object), or it can be a freshly created object (e.g. `graphical<-size' returns a new size object reflecting the size of the graphical). The documentation is the only source for this detail. Knowing this can be important. For example, modifying the size object returned by `graphical<-size' is valid but does not effect the graphical that returned the object.. Modifying the area returned by a graphical however will leave the graphical in an incoherent state. The area of graphical objects should be manipulated on the object itself using `graphical ->set' or one of the many variations thereof. Some objects have bi-directional relations with their parts. In this case it is allowed to manipulate the part directly and assume the part will inform the `whole' of possible consequences. Under normal circumstances, there is no need to ->free or otherwise discard the object returned by a get-operation. If the object is not referred too, it will automatically be discarded by the incremental garbage collector at the moment that it's scope of creation ends and the object is not locked or related to another object. See also get_class/4, get_super/3, get_object/3 and get_chain/3.nnnsN get_objectOIxN get_objectRIOIx*FòÚN.get_object(+Ref, +Selector, ...Args..., -Term)OI‘x*Invoke `get' behaviour, return object termOI’xúThe utility predicate get_object/[3-13] is similar to get/[3-13]. Only where get/[3-13] normally returns an object reference, get_object/[3-13] by default returns a term similar to object/2. Normally used for debugging for the interactive toplevel.OI“xIEN $topics$5XnnsN get_chainOI”xN get_chainRIOI•x*FñæN!get_chain(+Ref, +Selector, -List)OI–x#Invoke `get' behaviour, return listOI—x‰The utility predicate get_chain/3 is defined as: get_chain(Ref, Selector, List) :- get(Ref, Selector, Chain), chain_list(Chain, List).OI˜xIEN $topics$6XnnsNhandleOI™xNhandleRIOIšx+q*Nhandle(+X, +Y, +Kind, +Name)OI›x#Declare a handle for this graphicalOIœx©The term `handle(X, Y, Kind, Name)' attaches a handle object at the class level when between :- pce_begin_class/[2,3] and :- pce_end_class/0. See also `class ->handle'.OIxIeN$class/class$M.class.S.handleeN $topics$91eN $topics$127eN$class/handle$C.handleXnnsNpcereferOIžxNpcereferRIOIŸx.«”DNpcerefer(+Ref)OI xFind referring objectsOI¡x-The predicate pcerefer/1 scans the XPCE object base for objects that have references to the argument object. It is most commonly used in combination with checkpce/0. If checkpce/0 refers an object to be in inconsistent state, pcerefer/1 may be used to analyse the context of the inconsistent object.nnnsNtracepceOI¢xNtracepceRIOI£x.ðf3Ntracepce(+Behaviour)OI¤xTrace particular behaviourOI¥x~Put a trace-point on the indicated behaviour object. This will make the system print entries and completion of this object. `Behaviour' is specified as: `class ->selector' or `class <-selector' Which will either put a trace-point on the indicated send_method or variable. Example: ?- tracepce(box->event). Trace method: graphical ->event See also spypce/1 and breakpce/1.OI¦xIEIXnnsNuse_class_templateOI§xNuse_class_templateRIOI¨x0µ®lN$:- use_class_template(TemplateClass)OI©x!Import methods from TemplateClassOIªx:The directive :- use_class_template/1 provides a simple mechanism for sharing method and variable definitions over multiple classes. Suppose an application requires specialisations of a number of primitive built-in graphical classes. There are three ways to achieve this. One is to use pce_expand_class/1 on one of the super-classes of the classes that need to be expanded. This is unsave as the methods will become available to all users of these classes. The other possibility is to make subclasses of all classes for which this is needed and duplicate the text. Duplication of source code is always a bad idea as it makes maintenance a lot harder. use_class_template/1 provides a more elegant way out. First create a subclass of class template and define all variables and methods that need to be attached to the target class. Then do: :- pce_begin_class(mybox, box). :- use_class_template(my_graphical_extensions). :- pce_end_class. This will behave exactly as if all text defining my_graphical_extensions is duplicated at the :- use_class_template/1 call. The method implementation (the Prolog predicate) is shared between the classes that use the template. Note that you can normally *not* create instances of the template class itself as class template may not provide the methods you are refining. Note that you can *not* further refine a method imported from a template in the *same* class. The import behaves as if the text was duplicated, and thus a new definition will simply overwrite the one of the template. You *can* refine the method in a subclass though.nnnsN get_classOI«xN get_classRIOI¬x6¤§¾N-get_class(+Object, +Class, +Message, -Answer)OI­x!Invoke methods from another classnnnnsNnewOI®xNnewRIOI¯x0´\[Nnew(?Ref, +Class(...Args...))OI°xCreate object from termOI±xœCreate an instance of `Class', using `...Args...' as initialisation arguments. See `Class <-instance' for details. See also pce_global/2 and class create.OI²xIeN#$class/object$M.object.S.initialiseeN$class/class$M.class.G.instanceeN$class/pce$M.pce.G.instanceeN%$class/class$V.class.created_messageseIeN'$class/object$M.object.S.name_referenceeN$$class/object$M.object.S.lock_objectEN $topics$5XnnsN pce_end_classOI³xN pce_end_classRIOI´x9âõñN:- pce_end_class(+Class)OIµxEnd declaration of named classOI¶xÚFinishes the defintion of a class opened using pce_begin_class/3 or pce_extend_class/1 like :- pce_end_class/0. This version provides additional documentation and error checking and it recomended over pce_end_class/0.nnnsN pce_requireOI·xN pce_requireRIOI¸x.œSñN:- pce_require(+ListOfPreds)OI¹x Declare we need these predicatesOIºx–This, together with auto_call/1 is part of the portability-layer of XPCE. `ListOfPreds' is a list of / pairs. It tells the Prolog system that this module requires these predicates to be defined. Prolog systems with a library-predicate autoloader have an empty definition for this predicates. Other Prolog systems can search the library index and call use_module/2 to import the predicates.nnnsNHeadOI»xNHeadRIOI¼x*Ü;ôN Head :<- BodyOI½xDeclare a get methodOI¾x¦Declare a get-method for the current class. The arguments are processed as in `Head :->Body' (declaring a send-method). Like get/[3-13], an additional argument is added for handling the return value. Example: :- pce_extend_class(display). pixels(D, Pixels:int) :<- "Determine the number of pixels on the screen":: get(D, size, Size), get(Size, width, W), get(Size, height, H), Pixels is W * H. :- pce_end_class.OI¿xIeN$class/method$V.method.summaryeN!$class/class$M.class.S.get_methodeIeN $topics$94EN $topics$127XnnsN pce_autoloadOIÀxN pce_autoloadRIOIÁx?Kº4Npce_autoload(+Class)OIÂxAutoload a classOIÃxrAutoload the given class if it has been declared using the pce_autoload/2 directive. See also pce_autoload_all/0.nnnsNobjectOIÄxNobjectRIOIÅx5ˆÑPNobject(+Reference, [-Term])OIÆx%Test object existence/describe objectOIÇxÏobject(+Reference) The Prolog predicate object/1 is an extension of the Prolog type-test predicates. It succeeds if `Reference' refers to a valid object-reference. That is, a term of the form @/1, whose first argument is an atom denoting the name of a global object, or an integer referring to an existing object. In all other cases, this predicates fails silently. Please note that, if term is of the form @, heuristics are used to determine the indicated memory location refers to a valid object location. See also object/2, `@pce <-object_from_reference' and `object ->name_reference'. object(+Reference, -Term) Convert an object into a descriptive term. See the UserGuide for complete information.nnnXaCnumberOIÈx%x