PCE version 4C man_modulenamespaceid_tablemodified current_idOIxN class/methodN referenceC hash_tablerefersizeOIxNbothIsN V.method.nameCman_variable_card identifiermodule last_modifiednamesummary descriptionsee_alsoinheritdefaultsOIxN V.method.nameRICdateOIx(¯É²NnamenCstringOIxSelector or name of the method.nnnsNM.method.S.traceCman_method_card identifiermodule last_modifiednamesummary descriptionsee_alsoinherit diagnosticsdefaultsbugsOIxNM.method.S.traceRIOIx(̉§NtracennCchainsizeOIxIeN $topics$148eN$class/pce$M.pce.S.debugEN$class/pce$V.pce.trace_messageXnnnnsNM.method.S.initialiseOI xNM.method.S.initialiseRIOI x/›eÍN initialisenOI x˜Create a new method object. Methods come in two flavours: send_method objects for `procedures' and get_method objects for `functions'. Method objects may be associated to a class or to an individual object using the methods `class ->send_method', `class ->get_method', `object ->send_method' or `object ->get_method'. The arguments to ->initialise are: <-name Name of the `selector' to handle <-types Vector of type objects for arguments implementation <-message implementing the method <-summary Online manual summary description <-source Source-file location of the definition <-group Functional group of the method Messages to classes are normally associated using the class definition interface implemented by pce_begin_class/[2,3], pce_end_class/0 and various macros defined by these predicates. The example below defines a move_gesture object that is only active if the window in which the graphical to be moved defines an attribute (get_method) <-mode that yields the value `edit'. ..., new(G, move_gesture), send(G, send_method, send_method(verify, vector(event), @arg1?window?mode == edit)), ... The alternative would be to define a new class for move gestures that only operate in windows that are editabe: :- pce_begin_class(move_if_editable_gesture, move_gesture). verify(_G, Ev:event) :-> "Test if the window is editable":: get(Ev?window, mode, edit). :- pce_end_class.nnnnnsNV.method.summaryOI xNV.method.summaryRIOI x0µ˜ÛNsummarynOIx'Summary description of the method. It should be a string of about 45 characters maximum width describing the function implemented by the method. The summary attribute is used by the summary lists of methods, etc. displayed by these manual tools. It is defined for all built-in methods and may be defined in the body of a Prolog defined method. If the slot contains @default, and the <-context is a class object, the method will extract the summary from a variable with the same name or a method on a super-class with the same name (in this order).OIxIeN$predicates$22eN$predicates$21EN $tools$13XnnsNV.method.groupOIxNV.method.groupRIOIx,…äîNgroupnOIx Conceptual group of the method. Used for structuring the reference manual. If the variable is @default, <-group will 1) check for an instance variable of the same name 2) check for a <-inherited_from method. and return the first non @default value encountered.nnnsNC.methodCman_class_card identifiermodule last_modifiednamesummary descriptionsee_alsoinherituser_interfacebugsOIxNC.methodRIOIx,…âNmethodnOIx€Methods are used by the PCE message passing algorithm to map the combination of an object/class, the type of the message (`send' or `get') and the selector of message onto executable code. Additionally, methods define the expected argument types and the argument names of the operation. The PCE message passing algorithm uses this information to verify and if necessary and possible convert the types of the arguments presented, The implementation of a method is either a C-function pointer (used for system-defined methods), or a PCE code object (used for user-defined methods). While executing the latter, the following arguments are forwarded: @receiver Receiver of the message @arg1 ... arg Arguments to the message See also class behaviour, `send_method ->send', `get_method <-get', `class ->send_method', `class ->get_method', `object ->send_method' and `object <-get_method'.OIxI eN $topics$116eN $class/send_method$C.send_methodeN$class/get_method$C.get_methodeN$$class/object$M.object.S.send_methodeN#$class/object$M.object.S.get_methodeN"$class/class$M.class.S.send_methodeN!$class/class$M.class.S.get_methodeN$class/class$C.classeN$class/code$C.codeEN $topics$115XnnnsNM.method.G.groupOIxNM.method.G.groupRIOIx,…ä…NgroupnnnOIxIENV.method.groupXnnnsNV.method.contextOIxNV.method.contextRIOIx(¯ÇÔNcontextnOIx¨When attached to a class, `Method <-context' refers to this class. When member of a method_group, attached to an interceptor or not attached at all, its value is @nil.nnnsNV.method.sourceOIxNV.method.sourceRIOIx0µ˜ÉNsourcenOIxSourcefile and linenumber where this method is defined. The Prolog defined class compiler fills this argument. The source editor of this manual uses it to find the sources. This editor uses the TAGS file in the PCE source directory to find the sources of PCE's built-in methods.OI xIeN($class/source_location$C.source_locationEN $tools$14XnOI!x%@nil (location of sources is unknown)sNM.method.G.print_nameOI"xNM.method.G.print_nameRIOI#x,…ã†N print_namenOI$xqTextual representation of the method of the form: See also `variable <-print_name'.nnnnnsNM.method.G.inherited_fromOI%xNM.method.G.inherited_fromRIOI&x0µ¬ZNinherited_fromnOI'x;If method is a method of a class, this method will return a method of the same type (send_method or get_method) of a super-class with the same selector. This method may be regarded as a redefinition (usually refinement) of the returned method. Used by the reference manual to generate the `Refinement of:' lines.nnnnnsNV.method.functionOI(xNV.method.functionRIOI)x(¯ÈNfunctionnOI*x¦When implemented in the C-language, this slot contains a pointer to the implementing C-function. When implemented with a code object, the value of this slot is NULL.nnnsNV.method.typesOI+xNV.method.typesRIOI,x0µª¨NtypesnOI-xThe `Method <-types' slot describes the type-checking performed when the method is invoked. it is a vector of type objects. The elements of the vector denote the argument types for the corresponding argument positions. When a C-function is invoked the arguments are the receiver, followed by the arguments that activated the method. When a code object is invoked, @receiver is bound to the receiver, @arg1 is bound to the first argument, @arg2 to the second, etc. See also class type and `send_method ->send'.OI.xIeN $topics$118EN $topics$117XnnsNV.method.messageOI/xNV.method.messageRIOI0x/›cNmessagenOI1x£Implementation of the method object. This slot cooperates with the -function variable: # @nil In this case the -function is a pointer to a C-function implementing the method. This function will be passed the receiver and the arguments of the method. If the last type of the method denotes multiple arguments (...), the C-function will be passed an integer for the number of arguments and a pointer to an array of objects for the actual arguments. Internal use only. # c_pointer object The value of the c_pointer object is a handle provided by the host language that normally refers to a procedure in the host language. See also pce_predicate_reference/2. # A code object If the method is a get_method object, this must be a function object. If the method is executed, @receiver points to the receiver of the message and @arg1, ... point to the arguments provided to the message. See also ->initialise.nnnXaCnumber O I2xx