ClassDefinitionChange.st
author Claus Gittinger <cg@exept.de>
Tue, 06 Jul 1999 12:37:02 +0200
changeset 784 1e50cc7fd07d
parent 772 8e638e1b2da3
child 787 5d49bd054fc2
permissions -rw-r--r--
added compare methods #sameAs: and #isForSameAs:

"
 COPYRIGHT (c) 1993 by Claus Gittinger
	      All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"

ClassChange subclass:#ClassDefinitionChange
	instanceVariableNames:'definition'
	classVariableNames:''
	poolDictionaries:''
	category:'System-Changes'
!

!ClassDefinitionChange class methodsFor:'documentation'!

copyright
"
 COPYRIGHT (c) 1993 by Claus Gittinger
	      All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"
!

documentation
"
    instances represent class definition-changes. They are typically
    held in a ChangeSet.

    [author:]
        Claus Gittinger
"
! !

!ClassDefinitionChange methodsFor:'accessing'!

class:aClass 
    className := aClass name.
    source := aClass definition

    "Created: 3.12.1995 / 14:02:40 / cg"
    "Modified: 3.12.1995 / 14:06:33 / cg"
! !

!ClassDefinitionChange methodsFor:'comparing'!

isForSameAs:changeB
    "return true, if the given change represents a change for the same
     thingy as the receiver (i.e. same method, same definition etc.)."

    "/ I am a methodChange - B must be as well.
    changeB isClassDefinitionChange ifFalse:[^ false].   

    className ~= changeB className ifTrue:[^ false].
    ^ true





!

sameAs:changeB
    "return true, if the given change represents the same change as the receiver."

    changeB isClassDefinitionChange ifFalse:[^ false].

    className ~= changeB className ifTrue:[^ false].
    ^ self sameSourceAs:changeB



! !

!ClassDefinitionChange methodsFor:'queries'!

isClassDefinitionChange
    ^ true
! !

!ClassDefinitionChange class methodsFor:'documentation'!

version
    ^ '$Header: /cvs/stx/stx/libbasic3/ClassDefinitionChange.st,v 1.16 1999-07-06 10:36:48 cg Exp $'
! !