Copyright (C) 2000-2012 |
GNU Info (slib.info)Yasos interfaceInterface --------- - Syntax: define-operation `('opname self arg ...`)' DEFAULT-BODY Defines a default behavior for data objects which don't handle the operation OPNAME. The default behavior (for an empty DEFAULT-BODY) is to generate an error. - Syntax: define-predicate opname? Defines a predicate OPNAME?, usually used for determining the "type" of an object, such that `(OPNAME? OBJECT)' returns `#t' if OBJECT has an operation OPNAME? and `#f' otherwise. - Syntax: object `((NAME SELF ARG ...) BODY)' ... Returns an object (an instance of the object system) with operations. Invoking `(NAME OBJECT ARG ...' executes the BODY of the OBJECT with SELF bound to OBJECT and with argument(s) ARG.... - Syntax: object-with-ancestors `(('ancestor1 init1`)' ...`)' operation ... A `let'-like form of `object' for multiple inheritance. It returns an object inheriting the behaviour of ANCESTOR1 etc. An operation will be invoked in an ancestor if the object itself does not provide such a method. In the case of multiple inherited operations with the same identity, the operation used is the one found in the first ancestor in the ancestor list. - Syntax: operate-as component operation self arg ... Used in an operation definition (of SELF) to invoke the OPERATION in an ancestor COMPONENT but maintain the object's identity. Also known as "send-to-super". - Procedure: print obj port A default `print' operation is provided which is just `(format PORT OBJ)' (Note: Format) for non-instances and prints OBJ preceded by `#<INSTANCE>' for instances. - Function: size obj The default method returns the number of elements in OBJ if it is a vector, string or list, `2' for a pair, `1' for a character and by default id an error otherwise. Objects such as collections (Note: Collections) may override the default in an obvious way. automatically generated by info2www version 1.2.2.9 |