guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.0-11-ged4781


From: Neil Jerram
Subject: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.0-11-ged47816
Date: Fri, 18 Feb 2011 22:15:47 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

http://git.savannah.gnu.org/cgit/guile.git/commit/?id=ed478161f38b3c1bbe2a37a18e0b49d92f399df0

The branch, stable-2.0 has been updated
       via  ed478161f38b3c1bbe2a37a18e0b49d92f399df0 (commit)
       via  b0fc1b9f379e31ed5755ff991e9d8c97ce67fc8c (commit)
      from  d9ff8506b32495393a77b7a2d077172d12571a34 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit ed478161f38b3c1bbe2a37a18e0b49d92f399df0
Author: Neil Jerram <address@hidden>
Date:   Fri Feb 18 22:15:11 2011 +0000

    Clean up doc on class redefinition and instance class changing
    
    * doc/ref/goops.texi (Class Redefinition): Deleted, with its material
      all merged into later `Redefining a Class' and `Changing the Class of
      an Instance' sections.

commit b0fc1b9f379e31ed5755ff991e9d8c97ce67fc8c
Author: Neil Jerram <address@hidden>
Date:   Fri Feb 18 20:50:55 2011 +0000

    Merge orphan Class Options section into Class Definition
    
    * doc/ref/goops.texi (Class Definition): Move material from later
      `Class Options' section to here.

-----------------------------------------------------------------------

Summary of changes:
 doc/ref/goops.texi |  206 ++++++++++++++++++----------------------------------
 1 files changed, 70 insertions(+), 136 deletions(-)

diff --git a/doc/ref/goops.texi b/doc/ref/goops.texi
index 890081a..fc114f2 100644
--- a/doc/ref/goops.texi
+++ b/doc/ref/goops.texi
@@ -48,7 +48,6 @@ module.  You can do this at the Guile REPL by evaluating:
 * GOOPS Error Handling::
 * GOOPS Object Miscellany::
 * The Metaobject Protocol::
-* Class Options::
 * Redefining a Class::
 * Changing the Class of an Instance::
 @end menu
@@ -94,8 +93,8 @@ that class --- like ``fields'' or ``member variables'' in 
other object
 oriented systems.  Each @var{slot-description} gives the name of a slot
 and optionally some ``properties'' of this slot; for example its initial
 value, the name of a function which will access its value, and so on.
-Slot descriptions and inheritance are discussed more below.  For class
-options, see @ref{Class Options}.
+Class options, slot descriptions and inheritance are discussed more
+below.
 @cindex slot
 
 @deffn syntax define-class name (super @dots{}) slot-definition @dots{} . 
options
@@ -140,8 +139,28 @@ the predefined class @code{<complex>}; @code{<complex>} is 
the
 superclass of @code{<real>}, and @code{<real>} is the superclass of
 @code{<integer>}.}
 
-The possible slot and class options are described in the following
-sections.
+Slot options are described in the next section.  The possible class
+options are as follows.
+
address@hidden {class option} #:metaclass metaclass
+The @code{#:metaclass} class option specifies the metaclass of the class
+being defined.  @var{metaclass} must be a class that inherits from
address@hidden<class>}.  For the use of metaclasses, see @ref{Metaobjects and
+the Metaobject Protocol} and @ref{Metaclasses}.
+
+If the @code{#:metaclass} option is absent, GOOPS reuses or constructs a
+metaclass for the new class by calling @code{ensure-metaclass}
+(@pxref{Class Definition Protocol,, ensure-metaclass}).
address@hidden deffn
+
address@hidden {class option} #:name name
+The @code{#:name} class option specifies the new class's name.  This
+name is used to identify the class whenever related objects - the class
+itself, its instances and its subclasses - are printed.
+
+If the @code{#:name} option is absent, GOOPS uses the first argument to
address@hidden as the class name.
address@hidden deffn
 
 
 @node Instance Creation
@@ -1792,7 +1811,6 @@ customizing the behaviour of GOOPS itself.
 * Instance Creation Protocol::
 * Class Definition Protocol::
 * Customizing Class Definition::
-* Class Redefinition::
 * Method Definition::
 * Method Definition Internals::
 * Generic Function Internals::
@@ -2496,82 +2514,6 @@ typically it would perform additional class 
initialization steps before
 and/or after calling @code{(next-method)} for the standard behaviour.
 
 
address@hidden Class Redefinition
address@hidden Class Redefinition
-
address@hidden @bullet
-
address@hidden
address@hidden @var{old-class} @var{new-class}} (generic)
-
address@hidden calls @code{class-redefinition} if the variable
-specified by its first argument already held a GOOPS class definition.
address@hidden and @var{new-class} are the old and new class metaobjects.
-The applied method should perform whatever is necessary to handle the
-redefinition, and should return the class metaobject that is to be bound
-to @code{define-class}'s variable.  The default class redefinition
-protocol is described in @ref{Class Redefinition}.
address@hidden itemize
-
-The default @code{class-redefinition} method, specialized for classes
-with the default metaclass @code{<class>}, has the following internal
-protocol.
-
address@hidden (@var{old <class>}) (@var{new <class>})}
-(method)
-
address@hidden @bullet
address@hidden
address@hidden @var{old}} (generic)
-
address@hidden
address@hidden @var{method} @var{old} @var{new}} (generic)
-
address@hidden
address@hidden @var{subclass} @var{old} @var{new}} (generic)
address@hidden itemize
-
-This protocol cleans up things that the definition of the old class
-once changed and modifies things to work with the new class.
-
-The default @code{remove-class-accessors!} method removes the
-accessor methods of the old class from all classes which they
-specialize.
-
-The default @code{update-direct-method!} method substitutes the new
-class for the old in all methods specialized to the old class.
-
-The default @code{update-direct-subclass!} method invokes
address@hidden recursively to handle the redefinition of
-subclasses.
-
-When a class is redefined, any existing instance of the redefined class
-will be modified for the new class definition before the next time that
-any of the instance's slot is referenced or set.  GOOPS modifies each
-instance by calling the generic function @code{change-class}.
-
-The default @code{change-class} method copies slot values from the old
-to the modified instance, and initializes new slots, as described in
address@hidden the Class of an Instance}.  After doing so, it makes a
-generic function invocation that can be used to customize the instance
-update algorithm.
-
address@hidden (@var{old-instance <object>}) (@var{new <class>})} (method)
-
address@hidden @bullet
address@hidden
address@hidden @var{old-instance} @var{new-instance}} (generic)
-
address@hidden invokes @code{update-instance-for-different-class}
-as the last thing that it does before returning.  The applied method can
-make any further adjustments to @var{new-instance} that are required to
-complete or modify the change of class.  The return value from the
-applied method is ignored.
-
-The default @code{update-instance-for-different-class} method does
-nothing.
address@hidden itemize
-
 @node Method Definition
 @subsection Method Definition
 
@@ -2802,30 +2744,6 @@ accessor, passing the setter generic function as the 
value of the
 @end itemize
 
 
address@hidden Class Options
address@hidden Class Options
-
address@hidden {class option} #:metaclass metaclass
-The @code{#:metaclass} class option specifies the metaclass of the class
-being defined.  @var{metaclass} must be a class that inherits from
address@hidden<class>}.  For the use of metaclasses, see @ref{Metaobjects and
-the Metaobject Protocol} and @ref{Metaclasses}.
-
-If the @code{#:metaclass} option is absent, GOOPS reuses or constructs a
-metaclass for the new class by calling @code{ensure-metaclass}
-(@pxref{Class Definition Protocol,, ensure-metaclass}).
address@hidden deffn
-
address@hidden {class option} #:name name
-The @code{#:name} class option specifies the new class's name.  This
-name is used to identify the class whenever related objects - the class
-itself, its instances and its subclasses - are printed.
-
-If the @code{#:name} option is absent, GOOPS uses the first argument to
address@hidden as the class name.
address@hidden deffn
-
-
 @node Redefining a Class
 @section Redefining a Class
 
@@ -2897,8 +2815,8 @@ be address@hidden
 @node Customizing Class Redefinition
 @subsection Customizing Class Redefinition
 
-When @code{define-class} notices that a class is being redefined,
-it constructs the new class metaobject as usual, and then invokes the
+When @code{define-class} notices that a class is being redefined, it
+constructs the new class metaobject as usual, then invokes the
 @code{class-redefinition} generic function with the old and new classes
 as arguments.  Therefore, if the old or new classes have metaclasses
 other than the default @code{<class>}, class redefinition behaviour can
@@ -2917,6 +2835,26 @@ Implements GOOPS' default class redefinition behaviour, 
as described in
 for the new class definition.
 @end deffn
 
+The default @code{class-redefinition} method, for classes with the
+default metaclass @code{<class>}, calls the following generic functions,
+which could of course be individually customized.
+
address@hidden generic remove-class-accessors! old
+The default @code{remove-class-accessors!} method removes the accessor
+methods of the old class from all classes which they specialize.
address@hidden deffn
+
address@hidden generic update-direct-method! method old new
+The default @code{update-direct-method!} method substitutes the new
+class for the old in all methods specialized to the old class.
address@hidden deffn
+
address@hidden generic update-direct-subclass! subclass old new
+The default @code{update-direct-subclass!} method invokes
address@hidden recursively to handle the redefinition of
+subclasses.
address@hidden deffn
+
 An alternative class redefinition strategy could be to leave all
 existing instances as instances of the old class, but accepting that the
 old class is now ``nameless'', since its name has been taken over by the
@@ -2940,34 +2878,18 @@ is specialized for this metaclass:
 When customization can be as easy as this, aren't you glad that GOOPS
 implements the far more difficult strategy as its default!
 
-Finally, note that, if @code{class-redefinition} itself is not customized,
-the default @code{class-redefinition} method invokes three further
-generic functions that could be individually customized:
-
address@hidden @bullet
address@hidden
-(remove-class-accessors! @var{old-class})
-
address@hidden
-(update-direct-method! @var{method} @var{old-class} @var{new-class})
-
address@hidden
-(update-direct-subclass! @var{subclass} @var{old-class} @var{new-class})
address@hidden itemize
-
-and the default methods for these generic functions invoke further
-generic functions, and so address@hidden  The detailed protocol for all of 
these
-is described in @ref{MOP Specification}.
 
 @node Changing the Class of an Instance
 @section Changing the Class of an Instance
 
-You can change the class of an existing instance by invoking the
-generic function @code{change-class} with two arguments: the instance
-and the new class.
+When a class is redefined, any existing instance of the redefined class
+will be modified for the new class definition before the next time that
+any of the instance's slots is referenced or set.  GOOPS modifies each
+instance by calling the generic function @code{change-class}.
 
address@hidden generic change-class
address@hidden deffn
+More generally, you can change the class of an existing instance at any
+time by invoking the generic function @code{change-class} with two
+arguments: the instance and the new class.
 
 The default method for @code{change-class} decides how to implement the
 change of class by looking at the slot definitions for the instance's
@@ -2978,6 +2900,9 @@ discarded.  Slots that are present only in the new class 
are initialized
 using the corresponding slot definition's init function (@pxref{Classes,,
 slot-init-function}).
 
address@hidden generic change-class instance new-class
address@hidden deffn
+
 @deffn {method} change-class (obj <object>) (new <class>)
 Modify instance @var{obj} to make it an instance of class @var{new}.
 
@@ -2989,11 +2914,20 @@ pre-existing slots are initialized according to 
@var{new}'s slot definitions'
 init functions.
 @end deffn
 
+The default @code{change-class} method also invokes another generic
+function, @code{update-instance-for-different-class}, as the last thing
+that it does before returning.  The applied
address@hidden method can make any further
+adjustments to @var{new-instance} that are required to complete or
+modify the change of class.  The return value from the applied method is
+ignored.
+
address@hidden generic update-instance-for-different-class old-instance 
new-instance
+A generic function that can be customized to put finishing touches to an
+instance whose class has just been changed.  The default
address@hidden method does nothing.
address@hidden deffn
+
 Customized change of class behaviour can be implemented by defining
 @code{change-class} methods that are specialized either by the class
 of the instances to be modified or by the metaclass of the new class.
-
-When a class is redefined (@pxref{Redefining a Class}), and the default
-class redefinition behaviour is not overridden, GOOPS (eventually)
-invokes the @code{change-class} generic function for each existing
-instance of the redefined class.


hooks/post-receive
-- 
GNU Guile



reply via email to

[Prev in Thread] Current Thread [Next in Thread]