PCE version 4C man_modulenamespaceid_tablemodified current_idOIxN class/objectN referenceC hash_tablerefersizeOIxNbothIWsNM.object.G.print_nameCman_method_card identifiermodule last_modifiednamesummary descriptionsee_alsoinherit diagnosticsdefaultsbugsOIxNM.object.G.print_nameRICdateOIx,¹<ÞN print_namenCstringOIx"The method <-print_name is intended to convert an object into a textual representation. It serves two purposes: * Implement the %N special sequence in `string ->format' * Realise `text_item <-print_name_of_value'. This method is redefined by various subclasses. `Object <-print_name' itself performs the following steps: * If the object accepts <-name and the return value can be converted into a char_array object, return this converted value. * Otherwise return a new string holding the internal debugger representation of objects.nnnnnsNM.object.G.all_send_methodsOIxNM.object.G.all_send_methodsRIOIx,~ ¸Nall_send_methodsnnCchainsizeOIxIeNM.object.S.send_methodeN $class/send_method$C.send_methodENV.object.interceptorXOI xIENM.object.G.all_attributesXnnnsNM.object.G.lock_objectOI xNM.object.G.lock_objectRIOI x6ž {N lock_objectnOI xÜWhen @on, PCE's garbage collector will not remove this object, even if it has no references. Globally named objects are by default locked, as are most reusable objects for which the class maintains a table: types, names, modifiers, etc. A locked object is destroyed by ->free. To protect an object against ->free, use ->protect. When @off, the lock is removed from the object. If the object has no references, it will be ->free'd. If this is not desirable, use <-unlock.OI xIeNM.object.S.protecteNM.object.S.doneENM.object.S.lock_objectXnnnnsNM.object.S.send_methodOIxNM.object.S.send_methodRIOIx+³N send_methodnOIxÒAdd a send-method to this individual object. Object-level defined send-methods overrule Class-defined send-methods. An object level method may refer to its corresponding class level method using ->send_class.OIxI eNM.object.S.send_classeN"$class/method_group$C.method_groupeN$class/method$C.methodeNM.object.G.all_send_methodseNM.object.S.sloteN"$class/class$M.class.S.send_methodeNM.object.S.get_methodeN $examples$4ENV.object.interceptorXnnnnsNM.object.G.storage_referenceOIxNM.object.G.storage_referenceRIOIx/Àv²Nstorage_referencenOIxÐThis method is used by `object ->save_in_file' to handle shared object resources (colours, fonts, etc.). If this method is executed successfully, ->save_in_file stores the classname of the the object and the returned object. `file <-object' loads the classname, converts the classname to a type object, loads the returned `reference object' and attempts `type <-check' to produce an object of the requested type. See `colour <-storage_reference' for an example.nnnnnsNM.object.G.all_hypersOIxNM.object.G.all_hypersRIOIx,~ ªN all_hypersnnOIxIeN$class/hyper$C.hypereNM.object.S.hypereNM.object.S.delete_hyperENV.object.interceptorXOIxIENM.object.G.all_attributesXnnnsNM.object.G.all_constraintsOIxNM.object.G.all_constraintsRIOIx,~ ™Nall_constraintsnnOIxIeN$class/connection$C.connectioneN$class/constraint$C.constraintENV.object.interceptorXOIxIENM.object.G.all_attributesXnnnsNM.object.S.send_subOIxNM.object.S.send_subRIOIx*ÃD Nsend_subnOIxnSend to @receiver, using behaviour at the level of the class @receiver is an instance of. See also <-get_sub.nnnnnsNM.object.G.get_vectorOI xNM.object.G.get_vectorRIOI!x(NäN get_vectornOI"xjInvokes a get-method on the object itself. The first element of the vector is used as a selector, the subsequent ones are used as arguments to the behaviour. E.g. get(@prolog, get_vector, vector(plus, 1, 1), X). Is a very complicated way to add 1 and 1. This behaviour is intended to deal with delegating messages trapped via the ->get_catch_all behaviour.OI#xIENM.object.S.send_vectorXnnnnsNM.object.G.hyperedOI$xNM.object.G.hyperedRIOI%x,~)€NhyperednOI&xgFind a hyper-related object. Name is the name of the hyper (seen from the side of the receiver). Test is an optionally additional test. If present, this test is executed using the following arguments: @arg1 This object @arg2 The hyper object @arg3 The object at the other end of the hyper The first matching object is returned. See also <-all_hypers.nnnnnsNM.object.S.for_slot_referenceOI'xNM.object.S.for_slot_referenceRIOI(x)Ì–Nfor_slot_referencenOI)xÆThis method is intended to help writing analysis programs for the database. It scans all slot-references of the receiving object. When the argument is @on or @default, it will continue recursively over the slot-fillers. For each slot-reference, code is executed with the following bindings: @arg1 The instance @arg2 Type of slot reference @arg3 The slot @arg4 The value of the slot The `Type of slot reference' is one of: # slot For normal objects. @arg3 is bound to the name of this variable # cell For chains. @arg3 is bound to the 1-based index of the cell # element For vectors. @arg3 is bound to the index # key For hash_tables. @arg3 is bound to the key; @arg4 to the related value.OI*xIENM.object.S._checkXnnnnsNM.object.G.convertOI+xNM.object.G.convertRIOI,x,~•NconvertnOI-xThe method <-convert is called by `type <-translate', part of the generic type-checking and type conversion system. It is not a normal method not the *receiver*, but the *result* is an instance of the class on which the method is defined. The receiver is normally the class. The task of the <-convert method is to translate the argument into an instance of the requested type. For class object itself no translation is necessary as anything in PCE already is an instance of class object. This method will therefore never be called directly by the PCE type conversion system. This method translates a text (char_array object) of the form `@' into an object if is a valid object reference. This method is useful for defining other conversion functions.nnnnnsNM.object.G._argOI.xNM.object.G._argRIOI/x(NPàN_argnOI0xThe nth argument (1-based) of the term description. Unless overruled at the object level, this is equivalent to: get(Obj, ?(Obj?class?term_names, element, N), Arg). This behaviour is intended to remain reserved for system usage. Do not rely on its definition.OI1xIeN$class/chain$M.chain.G._argeNM.object.G.functoreNM.object.G._arityeN$class/class$V.class.term_nameseN$class/obtain$C.?EN $topics$69XnnnnsNM.object.G.protectOI2xNM.object.G.protectRIOI3x(Nˆ NprotectnnOI4xIENM.object.S.protectXOI5xIENM.object.S.protectXnnnsNM.object.S.not_has_valueOI6xNM.object.S.not_has_valueRIOI7x,·N not_has_valuennOI8xIENM.object.S.has_valueXOI9xIENM.object.S.has_valueXnnnsNM.object.G._class_nameOI:xNM.object.G._class_nameRIOI;x(NOsN _class_namennOIxNM.object.G._man_idRIOI?x,}ÿN_man_idnnnOI@xIENM.object.G._classXnnnsNM.object.G._inspectOIAxNM.object.G._inspectRIOIBx(NOsN_inspectnnOICxIeNM.object.G.inspectEN$class/obtain$C.?XOIDxIENM.object.G._classXnnnsNM.object.S.attach_hyperOIExNM.object.S.attach_hyperRIOIFx:­ ‚N attach_hypernOIGxCCalled from class hyper as part of `hyper ->initialise' and `hyper ->unlink'. These methods should *never* be called directly by the user. It is however possible to redefine these methods to intercept the creation and destruction of hyper-links. A redefinition should *always* call this method. See also ->delete_hypers.nnnnnsNM.object.G.object_referenceOIHxNM.object.G.object_referenceRIOIIx2ˆžàNobject_referencenOIJxœReference name of the object (see ->name_reference) or integer reference for objects that have no named reference. See also `@pce <-object_from_reference'.OIKxIEN($class/pce$M.pce.G.object_from_referenceXnnnnsNM.object.S.is_onOILxNM.object.S.is_onRIOIMx,¶éNis_onnnOINxIeN$class/equal$C.==ENM.object.S.has_valueXOIOxIENM.object.S.has_valueXnnnsNM.object.G.unlockOIPxNM.object.G.unlockRIOIQx>ž„hNunlocknOIRxÅUnlock object and return <-self. If, after unlocking, the object has no references, it will be pushed on the `anser stack', making it visible to the incremental garbage collector. In combination with ->lock_object, this method may be used to disconnect an object from its environment, handing it back to the incremental garbage collector. An example can be found in `emacs_window<-prompt', a part of PceEmacs. Assume we have a chain object holding a point and we want to delete the object from the chain without deleting the point. Direct usage of `chain->delete' may destroy the point. The following code avoids this: send(Point, lock_object, @on), send(Chain, delete, Point), get(Point, unlock, _).nnnnnsNM.object.G.report_toOISxNM.object.G.report_toRIOITx.ì‘N report_tonOIUxˆObject for ->report. The default for non-visual objects is the receiver of the current event (@event). See also `visual <-report_to'.nnnnnsNM.object.S.freeOIVxNM.object.S.freeRIOIWx2$(ONfreenOIXx¾Remove an object from the PCE object base. This behaviour is the normal way to get rid of existing objects. ->free performs the following steps: * Invoke `object ->unlink'. This allows a class to unlink the object from the environment. * Removes all attribute references by setting all slot values that contain an object to @nil. * Removes the global name association if this existed. * Reclaim the memory if the object has no <-references. Otherwise reclaim is delayed. See `@pce <-deferred_unalloced'. `Object ->unlink' is often defined on objects that need to inform some other object that they are destroyed. For example, graphical objects inform their device to allow the device to remove the object from the display and update their book-keeping. The method `object ->unlinking' is provided as a test whether or not ->free is in progress on the receiver. See also `visual ->destroy' to destroy entire hierarchies of (visual) objects.OIYxIeNM.object.S.unlinkeN $class/visual$M.visual.S.destroyeN $topics$105eNM.object.S.protecteNM.object.S.destroyeNM.object.S.demolishENM.object.S._freeXnOIZx(Fails silently if <->protect equals @on.nOI[xxWindow ->free should just delete the window from it's <-frame. In new code, please delete frames using `frame ->free'.sNM.object.G.inspectOI\xNM.object.G.inspectRIOI]x,Û²NinspectnnOI^xIENM.object.S.inspecteNM.object.G._inspectXOI_xIENM.object.S.inspectXnnnsNM.object.G.get_hyperOI`xNM.object.G.get_hyperRIOIax,~'N get_hypernOIbxyPerform a `broadcast' get operation on objects <-hypered to this object. If a hyper_name is given only hypers with this name are considered. Otherwise all hypers are considered. As soon as one of the hypered objects returns a value, this method returns with this value. Otherwise the method fails. Example: ?- new(@o, object), new(_, hyper(@o, bitmap('pce.bm'), bitmap)), new(_, hyper(@o, text(hello), text)). ?- pce_catch_error(no_behaviour, get(@o, get_hyper, @default, string, S). S = hello ?- pce_catch_error(no_behaviour, get(@o, get_hyper, @default, pixel, 3, 5, P). P = @off The first query is answered by the text object, while the latter is answered by the bitmap object (delegated to the `bitmap <-image'). Note the use of pce_catch_error/2 to avoid an error while broadcasting to objects that do not understand the method.nnnnnsNM.object.S.delete_hyperOIcxNM.object.S.delete_hyperRIOIdx,´íN delete_hypernnOIexIeNM.object.S.hyperENM.object.G.all_hypersXOIfxIENM.object.S.attach_hyperXnnnsNM.object.S._instance_ofOIgxNM.object.S._instance_ofRIOIhx,}ÿN _instance_ofnnnOIixIENM.object.G._classXnnnsNM.object.S.save_in_fileOIjxNM.object.S.save_in_fileRIOIkx,ËÑN save_in_filenOIlx!Save an object and all objects that can be reached from it to a file. This method takes care of cyclic structures. The save-format is binary. The object may be reloaded in this or in another PCE process using `file <-object'. When the object is reloaded in this PCE process, the combined functionality is similar to `object <-clone'. When the data, manipulated by the application is stored in PCE, the normal way is to attach all this information to a single object (normally a hash_table, sheet or chain) and save this object to a file. All attached objects (i.e. all data needed by the application to save its `persistent' data) are then saved in the file. PCE's save and load functionality has a limited way to deal with versions. The conversion activities are described with `file <-object'.OImxIeN$errors$!.cannot_save_objecteN!$class/file$M.file.S.check_objecteNM.object.G.cloneeN$class/file$M.file.G.objecteN$class/class$V.class.save_styleEN $topics$106XnOInxQDo not know how to save Object cannot be saved because it contains alien references and no defined behaviour to take care of them. This is the case with most objects that refer directly to the X-window system (e.g. windows, cursors, etc.). Diagnostics related to opening, writing and closing a file are applicable as well.nOIoxQ * User-defined classes currently cannot define private save and load behaviour.sNM.object.S.has_valueOIpxNM.object.S.has_valueRIOIqx,ÚN has_valuenOIrxÙExecute the get operation <-Name and compare the result to the argument. Succeed if they are equal (have same reference), fail otherwise. This method is intended to test on attribute values. Similar and more powerful results can be obtained using class ==.. It's usage is to be preferred. The following code objects and Prolog fragments all test whether the `point <-x' of the point object @p equals 3: Prolog: get(@p, x, 3) % Uses Prolog unification send(@p, has_value, x, 3) Code fragments: message(@p, has_value, x, 3) @p?x == 3 ->not_has_value is equivalent to ->has_value, but returns the inverse result. ->is_on is equivalent to ->has_value: @on and ->is_off is equivalent to ->has_value: @off.OIsxIENM.object.S.is_oneNM.object.S.is_offeN $examples$5eN$class/noteq$C.\==eNM.object.S.not_has_valueeN$class/equal$C.==XnnnnsNM.object.G.functorOItxNM.object.G.functorRIOIux0Å”îNfunctornOIvxeFunctor of the term description of the object. Unless overruled, this is equivalent to <-class_name.OIwxIeN $topics$69eN!$class/class$V.class.term_functoreNM.object.G._arityENM.object.G._argXnnnnsNM.object.S.equalOIxxNM.object.S.equalRIOIyx5¤4NequalnOIzx±Succeeds if the argument has the same reference. Note that this method is redefined by various classes. Equality may also be tested using class ==. See also ->same_reference.OI{xIeN$class/noteq$C.\==EN$class/equal$C.==XnnnOI|x0The notion of equality is not very clear in PCE.sNM.object.G.create_contextOI}xNM.object.G.create_contextRIOI~x?jNcreate_contextnOIxÿIf the receiver is executing ->initialise, scan the goal stack searching for a receiver higher in the goal stack for which condition succeeds. Condition is executed with the following arguments: @receiver: receiving object @arg1: receiver of message of parent goal @arg2: implementation of message of parent goal This method is intended to find the context in which an object (often a graphical) is created, allowing it to query the context for additional information. See also `visual <-contained_in'.nnnnnsNM.object.G.classOI€xNM.object.G.classRIOIx*Ã(¬NclassnOI‚xÓInstance of class class to which this object belongs. The normal way to test that an object is of some particular class is either ->instance_of or <-class_name. In most situations the first is to be preferred.OIƒxIeNM.object.G.class_nameeNM.object.G._classENM.object.S.same_classXnnnnsNM.object.S.send_hyperOI„xNM.object.S.send_hyperRIOI…x,µN send_hypernOI†xòPerform a broadcast send-operation to all (named) <-hypered objects. Similar to <-get_hyper, but does not stop if the method is received successfully. Succeeds if there was at least one hypered object accepting the message, fails otherwise.nnnnnsNM.object.S.send_classOI‡xNM.object.S.send_classRIOIˆx*ÃDwN send_classnOI‰x‡Invoke send behaviour of the class, bypassing object-level send_method objects attached to this object. See <-get_class for details..OIŠxIENM.object.S.send_methodXnnnnsNM.object.S.doneOI‹xNM.object.S.doneRIOIŒx0µ¹(NdonenOIxThis method is used to help the PCE garbage collector and should normally be invoked after the program is done with the answer of a get operation and wants to be sure that the returned object is deleted when no longer referenced: ..... get(Area, size, Size), .... send(Size, done). The receiving object will be deleted from the object base as with ->free if the receiver has no <-references, <-lock_object is @off and <-protect is @off. In the example above ->done is equivalent to ->free as the size object returned by `area <-size' is created by this method (provided the .... computation does not lock, protect or make the size an attribute of some other object. In the example below, using ->free will corrupt PCE's database: .... get(Graphical, area, Area), .... free(Area). % ==> ERROR!!! The area object will be deleted and the slot `graphical <-area' will be pointing in the dark (checkpce/0 will find such problems). Using ->done is often not necessary. After a user-event has been processed all unreferenced and unlocked objects will be deleted from the object base automatically. Unreferenced objects created during the execution of a user-defined method for a PCE class are also deleted automatically. ->done is useful when a lot of garbage objects are created in a loop.OIŽxIENM.object.G.lock_objectXnnnnsNM.object.S.delete_hypersOIxNM.object.S.delete_hypersRIOIx3¡?N delete_hypersnOI‘x€Delete all hypers matching the name and condition. See <-find_hyper for the interpretation of the name and condition arguments.nnnnnsNM.object.S.send_super_vectorOI’xNM.object.S.send_super_vectorRIOI“x*ÃENsend_super_vectornOI”xÏCombines ->send_super and ->send_vector, creating an argument vector from the leading arguments and vector and invoking behaviour defined at the super-class. See ->send_super and ->send_vector for details.OI•xIeNM.object.S.send_superENM.object.S.send_vectorXnnnnsNM.object.G.selfOI–xNM.object.G.selfRIOI—x(N‰iNselfnOI˜xQReturns the object itself. Hardly ever necessary within the architecture of PCE.nnnnnsNM.object.S.delete_attributeOI™xNM.object.S.delete_attributeRIOIšx3Ëo{Ndelete_attributenOI›x|Delete (named) attribute that has previously be attached using ->attribute. Fails silently if the attribute is not present.OIœxIENM.object.S.attributeXnOIx1Fails (silently) if the attribute is not defined.nnsNM.object.S._inspectOIžxNM.object.S._inspectRIOIŸx(NOsN_inspectnnOI xIEN$class/obtain$C.?XOI¡xIENM.object.G._classXnnnsNM.object.S.unlinkOI¢xNM.object.S.unlinkRIOI£x0µ`NunlinknOI¤xIThe method ->unlink is called by `object ->free'. Its task is to unlink the instance from its environment. The ->unlink method may not be called directly by the user. The user should provide an unlink method when writing a user-defined class that requires specialised unlink behaviour. Some examples: * Graphicals notify their device when they are destroyed, so the device can delete them from `device <-graphicals' and update the display. * A window will destroy the associated Xt-widget realising the window in X. * A char_array will unalloc the associated C-data-structure representing the text. NOTE: Unlink should *never* be called directly by the user. Any user-defined ->unlink method should invoke the method of the super-class (see `object ->send_super'). See also ->free, ->done, `visual ->destroy' and ->unlinkingOI¥xIENM.object.S.freeXnnnnsNM.object.S.initialiseOI¦xNM.object.S.initialiseRIOI§x>øGhN initialisenOI¨xŽNo-operation (just succeeds). Implemented to allow any class perform a send_super(Self, initialise). Any class should have a method ->initialise. This method is invoked from PCE's virtual machine to initialise an object from the parameters given to the object creation operation (new/2. class create, `class <-instance'. The creation of objects is discussed in detail with `class <-instance'.OI©xIeN $predicates$1eN$class/class$M.class.G.instanceEN $topics$104XnnnnsNM.object.G.class_variable_valueOIªxNM.object.G.class_variable_valueRIOI«x5}PˆNclass_variable_valuenOI¬x°Get value of associated class_variable object. See also class_variable/4. Note that, in the absence of a method or variable with the name name, `Object <-Name' is equivalent.nnnnnsNM.object.G.attributeOI­xNM.object.G.attributeRIOI®x2#+N attributenOI¯xdGet the value of an attribute associated to the object using `object ->attribute'. The attribute may also me requested using a plain get operation: ?- new(@o, object), send(@o, attribute, gnus, 4). ?- get(@o, attribute, gnus, G). ?- get(@o, gnus, G). The two are equivalent, except that the latter gives an error if no such attribute is defined.nnnnnsN M.object.S.convert_loaded_objectOI°xN M.object.S.convert_loaded_objectRIOI±x*Ã,[Nconvert_loaded_objectnOI²xÄCalled by `file <-object' if the current save version is not the same as save version when the file was loaded. The two arguments are the old and the new save versions. See `pce <-save_version'.OI³xIENM.object.S.initialise_new_slotXnnnnsNC.objectCman_class_card identifiermodule last_modifiednamesummary descriptionsee_alsoinherituser_interfacebugsOI´xNC.objectRIOIµx9þÝ•NobjectnOI¶xòClass object is the root of the class hierarchy. It defines common behaviour, mainly to do with object management: Creating objects ->initialise Destroying objects ->free, ->done Cloning objects <-clone Saving objects on file ->save_in_file Adding attributes ->attribute Programming ->send_method, ->get_method Any class in PCE must be a sub-class of class object and therefore any object listens to the methods defined on this class. It is allowed to create instances of class object and extend the instance using object-level programming to realise a single object meeting some specification. See: ->attribute Define object-level attributes ->send_method Add object-level `send' method ->get_method Add object-level `get' methodOI·xIeN $class/interceptor$C.interceptorEN $topics$97XnnnsNM.object.G.all_attributesOI¸xNM.object.G.all_attributesRIOI¹x0µœšNall_attributesnOIºxBReturn a chain holding all the object-level extensions to the object of the given type. If `create' equals @on, this call will always succeed, possibly returning an empty chain. Otherwise the call might fail. The following extensions are defined: ->attribute Object-level `instance variable' constraint Binary constraint between two objects hyper Binary relation (two-way attribute) ->recogniser Handler for event objects (class graphical) ->send_method Object-level method (send) ->get_method Object-level method (get) See also class constraint and class hyper.OI»xIeNM.object.S.attributeeNV.object.interceptorXnnnnsNM.object.G._arityOI¼xNM.object.G._arityRIOI½x(NQIN_aritynOI¾x‚Number or arguments to the term description. Unless overruled, this is the size of the term_names vector of the associated class.OI¿xIeN$class/chain$M.chain.G._arityeNM.object.G.functoreNM.object.G._argeN$class/obtain$C.?EN $topics$69XnnnnsNM.object.G._flagsOIÀxNM.object.G._flagsRIOIÁx(NWzN_flagsnOIÂxhReturns a name with the three characters indicating the status of the object with regard to the object manager. The flags are: `P' Indicate object is protected `L' Indicate object is locked 'A' Indicate OMS has not yet decided on the status of the object. This method is used by the `Inspector' to generate the indicators at the top-right of the cards.OIÃxIeN $tools$11eN $topics$105eNM.object.S.lock_objecteNM.object.S.protectEN$class/obtain$C.?XOIÄxIENM.object.G._classXnnnsNM.object.S.attributeOIÅxNM.object.S.attributeRIOIÆx,ßTN attributenOIÇxAttach an instance variable to an object rather than to a class. If an attribute with this name is already present, the value of the original attribute is replaced. An error is raised if the class already defines an instance variable with the same name.OIÈxIeN$$class/graphical$M.graphical.S.popupeN$class/sheet$C.sheeteNM.object.G.all_attributeseN $examples$4eN&$class/attribute$M.attribute.G.convertEN$class/attribute$C.attributeeNV.object.interceptorXnnnnsNM.object.S._freeOIÉxNM.object.S._freeRIOIÊx(NOsN_freennOIËxIeN$class/obtain$C.?ENM.object.S.freeXOIÌxIENM.object.G._classXnnnsNM.object.G.all_get_methodsOIÍxNM.object.G.all_get_methodsRIOIÎx,~ ¡Nall_get_methodsnnOIÏxIeNM.object.S.get_methodENV.object.interceptorXOIÐxIENM.object.G.all_attributesXnnnsNM.object.S.protectOIÑxNM.object.S.protectRIOIÒx+RfNprotectnOIÓxëProtect an object against destruction with ->free or one of the other objects destruction methods. The global PCE objects @pce, @prolog, etc. are protected this way. There is no way to unprotect protected objects or to destroy them.OIÔxIeN $class/visual$M.visual.S.destroyENM.object.G.protecteNM.object.G._flagseN $topics$105eNM.object.S.lock_objecteNM.object.S.freeeNM.object.S.destroyeNM.object.S.demolishXnnnnsNM.object.S.same_referenceOIÕxNM.object.S.same_referenceRIOIÖx5¤Nsame_referencenOI×xTest if i'm the same object as the argument. This method verifies both objects have the same identity. The method `object ->equal' performs the same test, but is refined by various classes to test for `same properties'. See -for example- `point ->equal'.nnnnnsNM.object.S.is_offOIØxNM.object.S.is_offRIOIÙx,¶æNis_offnnOIÚxIeN$class/equal$C.==ENM.object.S.has_valueXOIÛxIENM.object.S.has_valueXnnnsNM.object.G.get_methodOIÜxNM.object.G.get_methodRIOIÝxattribute'). * `Class <-send_method' * Delegation. See `class <-delegate' The `tuple <-first' contains the receiver, which is either the object itself or the object the message will be delegated to. The `tuple <-second' contains the behaviour object that implements the method. Examples: ?- new(@p, point), get(@p, send_method, mirror, tuple(Object, Impl)). Object = @p/point Impl = @632241/send_method ?- new(@v, view), get(@v, send_method, append, tuple(Object, Impl)). Object = @833889/editor Impl = @749374/send_method The second example indicates that, when a message ->append is sent to @v it will be delegated to the editor @833889. See also ->has_get_method, ->has_send_method and <-all_send_methods.nnnnnsNM.object.G.class_nameOIßxNM.object.G.class_nameRIOIàx.íÈPN class_namenOIáx^Name of the class the object belongs to. Shorthand for: get(Object?class, name, ClassName).OIâxIeNM.object.G.classENM.object.G._class_nameXnnnnsNM.object.S.has_send_methodOIãxNM.object.S.has_send_methodRIOIäx5¦&ŽNhas_send_methodnOIåxøTest whether object implements the specified send/get behaviour. This test is equivalent to testing whether {<-get_method, <-send_method} returns a value but avoids the creation of a tuple. See also `class <-send_method' and `class <-get_method'.nnnnnsNM.object.G.send_methodOIæxNM.object.G.send_methodRIOIçx,~+N send_methodnnnOIèxIENM.object.G.get_methodXnnnsNM.object.S.unlinkingOIéxNM.object.S.unlinkingRIOIêx0µ£ŸN unlinkingnOIëx‚Succeeds if the object is in currently being ->unlink'ed. Intended as a test in ->unlink methods to avoid unnecessary computation.nnnnnsNM.object.S.initialise_new_slotOIìxNM.object.S.initialise_new_slotRIOIíx*ÃB Ninitialise_new_slotnOIîxmPart of saved-object conversion (see `file <-object'). Called when -while loading an instance from a file-, the current definition of the class has a new instance variable (compared to when the instance was saved to file using ->save_in_file). The argument is the new variable object from the class. May be used to initialise the new slot to some sensible value.OIïxIEN M.object.S.convert_loaded_objectXnnnnsNM.object.G.get_classOIðxNM.object.G.get_classRIOIñx*Ã?¢N get_classnOIòx¿Invoke get_method on object, bypassing possible object-level get_methods associated with ->get_method. This method serves a similar purpose as ->get_super when using class-level programming.OIóxIENM.object.S.get_methodXnnnnsNM.object.S.has_get_methodOIôxNM.object.S.has_get_methodRIOIõx,~*‹Nhas_get_methodnnnOIöxIENM.object.S.has_send_methodXnnnsNM.object.G.find_hyperOI÷xNM.object.G.find_hyperRIOIøx.«‹¾N find_hypernOIùx†Find hyper-object from specifications. `hyper_name' is the name of the hyper, seen from the receiver of this message. If hyper_name is @default, all hypers are considered. `test' is a code object. If it is not @default, it is executed using the following arguments: @arg1: Receiver of this message @arg2: Hyper object @arg3: Object at other end of the hyper. See also <-hypered.nnnnnsNM.object.S.lock_objectOIúxNM.object.S.lock_objectRIOIûx,~ N lock_objectnnOIüxIENM.object.G.lock_objecteNM.object.G._flagseN$predicates$15eN $predicates$1eNM.object.S.protectXOIýxIENM.object.G.lock_objectXnnnsNM.object.S.instance_ofOIþxNM.object.S.instance_ofRIOIÿx/ç"}N instance_ofnOIxŽSucceeds if the object is an instance of the argument class or one of its subclasses. Note that `class <-convert' converts class-names to class objects: send(Obj, instance_of, graphical) is the advised way to verify that `Obj' is a graphical. The method `pce <-convert' may be used to combine testing with possible type conversion. See also `type ->validate' and `type <-check'. If one wants to test whether an object is a graphical object, a node object or @nil, the following two test are equivalent: ( send(Obj, instance_of, graphical) ; send(Obj, instance_of, node) ; Obj == @nil ) or send(type('graphical|node*'), validate, Obj)OIxIEN$class/pce$M.pce.G.convertXnnnnsNM.object.S.send_superOIxNM.object.S.send_superRIOIx(NOsN send_supernOIx’Invoke behaviour of the super-class. This behaviour is intended to be used only for using behaviour of the super-class when defining new classes.OIxIeNM.object.G.get_supereN $examples$6eN $topics$47EN $topics$96XnnnnsNM.object.G.referencesOIxNM.object.G.referencesRIOIx(NˆœN referencesnOIxüPCE uses reference counts for the incremental garbage collector. The number of references is the number of slot relations towards this object. Note that PCE does not know which objects have references to an object; slot-relations are uni-directional.OI xIeN $tools$11eN $topics$110ENM.object.G._referencesXnnnnsNM.object.G._classOI xNM.object.G._classRIOI x0µÁN_classnOI xThese methods starting with an '_' (underscore) are defined both on class function and class object. Their behaviour is equivalent to the counterpart with the leading underscore deleted for normal objects. As these methods are explicitly defined on class function however, invoking one of these methods to a function will cause the function itself to handle the message instead of the evaluation. Example: ?- new(O, @display?size), get(O, '_class_name', C1), get(O, class_name, C2). C1 = ? C2 = sizeOI xIeNM.object.G.classEN$class/obtain$C.?XnnnOIxqIt is probably more elegant to introduce a separate send- and get- operation that does not evaluate the receiver.sNM.object.S.name_referenceOIxNM.object.S.name_referenceRIOIx6¤¥Nname_referencenOIxaGive/change the global named reference associated with the object. See also <-object_reference.OIxIeN#$class/pce$M.pce.S.rename_referenceeNM.object.G.name_referenceeN $predicates$1eN$predicates$15EN $topics$20XnOIxYName reference already in use The requested new name-reference is already in use.nOIxUUnlike with the predicate new/2, no exception is raised if the object already exists.sNM.object.S.slotOIxNM.object.S.slotRIOIx,‚ NslotnOIxÜSet the value of a (class-defined) slot without activating the corresponding method. The slot specification (first argument) is either the slot-name, or the offset in the object (1-based). The latter possibility is for very specific (internal) use. This method should only be used from a send-method that has the same name (selector) as the slot and serves as a `wrapper' around the slot to deal with side-effects: :- pce_begin_class(person, object). variable(date_of_birth, date, get, "When person was born"). ... date_of_birth(Person, Date:date) :-> ( send(Date, after, new(date)) -> send(Person, report, error, 'Cannot be born in the future!'), fail ; send(Person, slot, date_of_birth, Date) ).OIxIeN$class/variable$C.variableeNM.object.G.sloteN"$class/class$M.class.S.send_methodeNM.object.S.send_methodXnnnOIx\This message should also apply to object-level defined attributes (see `object ->attribute'.sN M.object.G.find_all_send_methodsOIxN M.object.G.find_all_send_methodsRIOIx,~*?Nfind_all_send_methodsnOIxICompute a chain with all behaviour objects that may be used to invoke send behaviour on this object. It will analyse: * Attributes * Class' variables and send methods * Delegation Overruled behaviour is automatically deleted from the chain. The additional conditions is executed binding @arg1 to the implementation object.nnnnnsNM.object.G._slotOIxNM.object.G._slotRIOIx(NOsN_slotnnOIxIeNM.object.G.slotEN$class/obtain$C.?XOI xIENM.object.G._classXnnnsNM.object.G.get_subOI!xNM.object.G.get_subRIOI"x*Ã@MNget_subnOI#xšInvoke message on @receiver, using the definition from the object's own class instead of the current class. See `class ->get_method' for further details.nnnnOI$xsActually, a normal get operation executed in a method already performs a <-get_sub. Reserved fro future extension.sNM.object.S.reportOI%xNM.object.S.reportRIOI&x.ì1NreportnOI'xÜReport a message related to the specified object. This method locates the visual object from which the user invoked the current command using `@event <-receiver' and invokes `visual ->report' on this object. If @event is unbound the error is caused by a query from the host-language interaction window and PCE thus prints the message using `@pce ->format'. Some classes redefine this method because they *know* they are related to some visual object. See also <-report_to.OI(xIEN$class/visual$M.visual.S.reportXnnnnsNM.object.S.inspectOI)xNM.object.S.inspectRIOI*x,Û‹NinspectnOI+xÙIf @on *and* the class of the object has one of the change trapping messages attached to it, changes to the object are forwarded (to the application) via these change messages. If @off, these messages have no effect.OI,xIeN%$clasS/class$V.class.changed_messagesENM.object.G.inspecteN $topics$109eN$$class/class$M.class.S.freed_messageeN&$class/class$M.class.S.created_messageeN&$class/class$M.class.S.changed_messageXnnnnsNM.object.S._checkOI-xNM.object.S._checkRIOI.x0µzN_checknOI/xValidate the type of the instance variables. If the argument is @on or @default, validation continues recursively over instance variables that contain objects. This method is protected against loops in the data-structures. Normally invoked through the Prolog predicate checkpce/0.OI0xI eN$errors$!.freed_value_valueeN$errors$!.freed_key_valueeN$errors$!.freed_element_valueeN$errors$!.freed_cell_valueeN$errors$!.freed_slot_valueeN$errors$!.bad_slot_valueeN$errors$!.creatingeN$errors$!.no_variableeN$errors$!.checked_objectseNM.object.S.for_slot_referenceeN$predicates$25EN$class/type$C.typeXnOI1xSee related error objectsnnsNM.object.G.cloneOI2xNM.object.G.cloneRIOI3x0µª”NclonenOI4xÝObject <-clone creates a clone of an object. The semantics of cloning objects in general are difficult to define. Which related objects are to be cloned and which are to be shared between the clone and the original object? The approach taken by PCE is not particularly neat. We do not recommend heavy use of this facility. Object are cloned `recursively'. This implies all objects that can be reached from this object are cloned as well. The algorithm deals correctly with cyclic structures. While executing a recursive clone, two flags may influence the result: `variable <-clone_style' Defines the type of relation `class <-clone_style' Defines the type of object Please consult the documentation of these for details.OI5xIeN $class/class$V.class.clone_styleENM.object.S.save_in_fileXnnnOI6xÚThe semantics are ill defined. Be *very* carefull with `plain' cloning and study this description carefully before going ahead. When in doubt, use the `inspector' tool from the main menu to find out about the result.sNM.object.G._referencesOI7xNM.object.G._referencesRIOI8x(NOsN _referencesnnOI9xIeNM.object.G.referencesEN$class/obtain$C.?XOI:xIENM.object.G._classXnnnsNM.object.S.same_classOI;xNM.object.S.same_classRIOIxIeNM.object.G.classEN$class/class$M.class.S.is_aXnnnnsNM.object.S.send_vectorOI?xNM.object.S.send_vectorRIOI@x,‚õN send_vectornOIAx=`Object ->send_vector' supports the implementation of methods with variable argument list. Its format is: unchecked..., Vector, [shift] First, a list is created containing the following arguments: * The objects from `unchecked...' * The elements of the vector, with the first [shift] elements skipped. Next, the first element of this list is used as the selector and the remaining arguments as the arguments to the message. Examples: * send(@prolog, send_vector, vector(write_ln, 'Hello World')). * send(@prolog, send_vector, write_ln, vector('Hello World')).OIBxIeN$errors$!.bad_vector_usageeN#$class/code$M.code.S.forward_vectoreNM.object.S.send_super_vectoreNM.object.G.get_vectoreN $topics$114XnOICx1Fails silently if the selector cannot be created,OIDxShift defaults to 0.nsNM.object.G.get_superOIExNM.object.G.get_superRIOIFx+³ÀN get_supernOIGxbInvoke behaviour of the super-class. This behaviour is intended to be used only for using behaviour of the superclass when defining new classes. This method is only valid in the context of class-defined methods. The receiver should be the same object as the receiver of the executing method (i.e. <-get_super is always to `it self'). See also <-slot.OIHxIeN $topics$47eN $topics$96ENM.object.S.send_superXnnnnsNM.object.S.get_methodOIIxNM.object.S.get_methodRIOIJx+³N get_methodnOIKxÎAdd a get-method to this individual object. Object-level defined get-methods overrule Class-defined get-methods. An object level method may refer to its corresponding class level method using ->get_class.OILxI eNM.object.G.get_classeN"$class/method_group$C.method_groupeN$class/method$C.methodeNM.object.G.sloteNM.object.G.all_get_methodseNM.object.S.send_methodeN $examples$4eN!$class/class$M.class.S.get_methodENV.object.interceptorXnnnnsNM.object.G.slotOIMxNM.object.G.slotRIOINx*ÃE´NslotnOIOxAGet the value of the named slot, bypassing protection. When given an integer, get the value of the nth-slot (counting from 1). This method is used in the implementation of get_method objects if the get method wants to access a slot with the same name without interaction from the method. See also `class ->get_method'.OIPxIeN$class/variable$C.variableeN!$class/class$M.class.S.get_methodeNM.object.S.get_methodeNM.object.S.sloteNM.object.G._slotXnnnnsNM.object.S.errorOIQxNM.object.S.errorRIOIRx,Ú×NerrornOISxéRaise an error (exception) on this object. Error (normally specified by its `error <-id' and converted by `error <-convert') is the error to be raised. The remaining context arguments provide context information about this error. Performs the following steps: # if `error <-kind' equals `ignored', silently fail. # assigns `@pce <-last_error'. # If the error is not catched (`@pce ->catched'), it invokes `error ->display' on the error object. See also class error and ->report.OITxIeN$class/visual$M.visual.S.reporteN$class/pce$M.pce.S.catchedEN$class/error$V.error.idXnOIUx/Diagnostics depend on the error object invoked.nnXaCnumberOIVxx