HandleRegistry.st
author Claus Gittinger <cg@exept.de>
Thu, 23 Nov 1995 18:13:04 +0100
changeset 630 b785d23d7c5b
parent 615 e9d0e782206d
child 1286 4270a0b4917d
permissions -rw-r--r--
version at the end
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
375
claus
parents:
diff changeset
     1
"
claus
parents:
diff changeset
     2
 COPYRIGHT (c) 1995 by Claus Gittinger
claus
parents:
diff changeset
     3
	      All Rights Reserved
claus
parents:
diff changeset
     4
claus
parents:
diff changeset
     5
 This software is furnished under a license and may be used
claus
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
claus
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
claus
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
claus
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
claus
parents:
diff changeset
    10
 hereby transferred.
claus
parents:
diff changeset
    11
"
claus
parents:
diff changeset
    12
claus
parents:
diff changeset
    13
Registry subclass:#HandleRegistry
615
e9d0e782206d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    14
	 instanceVariableNames:''
e9d0e782206d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    15
	 classVariableNames:''
e9d0e782206d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    16
	 poolDictionaries:''
e9d0e782206d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    17
	 category:'System-Support'
375
claus
parents:
diff changeset
    18
!
claus
parents:
diff changeset
    19
claus
parents:
diff changeset
    20
!HandleRegistry class methodsFor:'documentation'!
claus
parents:
diff changeset
    21
claus
parents:
diff changeset
    22
copyright
claus
parents:
diff changeset
    23
"
claus
parents:
diff changeset
    24
 COPYRIGHT (c) 1995 by Claus Gittinger
claus
parents:
diff changeset
    25
	      All Rights Reserved
claus
parents:
diff changeset
    26
claus
parents:
diff changeset
    27
 This software is furnished under a license and may be used
claus
parents:
diff changeset
    28
 only in accordance with the terms of that license and with the
claus
parents:
diff changeset
    29
 inclusion of the above copyright notice.   This software may not
claus
parents:
diff changeset
    30
 be provided or otherwise made available to, or used by, any
claus
parents:
diff changeset
    31
 other person.  No title to or ownership of the software is
claus
parents:
diff changeset
    32
 hereby transferred.
claus
parents:
diff changeset
    33
"
claus
parents:
diff changeset
    34
!
claus
parents:
diff changeset
    35
claus
parents:
diff changeset
    36
documentation
claus
parents:
diff changeset
    37
"
claus
parents:
diff changeset
    38
    HandleRegistries are like Registries, in that they watch for the death of
claus
parents:
diff changeset
    39
    a registered object. However, they send a self-change notification, passing the registered
claus
parents:
diff changeset
    40
    handle as argument, instead of creating a shallow copy and letting it do the finalization.
claus
parents:
diff changeset
    41
    Use Registry for objects which know themself how to clean up;
claus
parents:
diff changeset
    42
    use HandleRegistry, if someone else does the cleanup.
claus
parents:
diff changeset
    43
"
claus
parents:
diff changeset
    44
! !
claus
parents:
diff changeset
    45
claus
parents:
diff changeset
    46
!HandleRegistry methodsFor:'dispose handling'!
claus
parents:
diff changeset
    47
claus
parents:
diff changeset
    48
informDispose:someHandle
claus
parents:
diff changeset
    49
    self changed:#finalize with:someHandle from:self
claus
parents:
diff changeset
    50
! !
claus
parents:
diff changeset
    51
claus
parents:
diff changeset
    52
!HandleRegistry methodsFor:'redefined to block'!
claus
parents:
diff changeset
    53
615
e9d0e782206d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    54
register:anObject
e9d0e782206d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    55
    "not useful for HandleRegistry - use #register:as:"
375
claus
parents:
diff changeset
    56
claus
parents:
diff changeset
    57
    self shouldNotImplement
claus
parents:
diff changeset
    58
!
claus
parents:
diff changeset
    59
615
e9d0e782206d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    60
registerChange:anObject
e9d0e782206d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    61
    "not useful for HandleRegistry"
375
claus
parents:
diff changeset
    62
claus
parents:
diff changeset
    63
    self shouldNotImplement
claus
parents:
diff changeset
    64
! !
615
e9d0e782206d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 530
diff changeset
    65
630
b785d23d7c5b version at the end
Claus Gittinger <cg@exept.de>
parents: 615
diff changeset
    66
!HandleRegistry class methodsFor:'documentation'!
b785d23d7c5b version at the end
Claus Gittinger <cg@exept.de>
parents: 615
diff changeset
    67
b785d23d7c5b version at the end
Claus Gittinger <cg@exept.de>
parents: 615
diff changeset
    68
version
b785d23d7c5b version at the end
Claus Gittinger <cg@exept.de>
parents: 615
diff changeset
    69
    ^ '$Header: /cvs/stx/stx/libbasic/HandleRegistry.st,v 1.6 1995-11-23 17:10:40 cg Exp $'
b785d23d7c5b version at the end
Claus Gittinger <cg@exept.de>
parents: 615
diff changeset
    70
! !