Boolean.st
author Stefan Vogel <sv@exept.de>
Fri, 11 Jun 2004 20:12:49 +0200
changeset 8394 da194de43766
parent 8305 7f80b5a18ffc
child 8517 c3827ae1ead2
permissions -rw-r--r--
Generalize visitor pattern and define #visit...:with: -methods instead of #encode...:with:
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
     1
"
5
67342904af11 *** empty log message ***
claus
parents: 3
diff changeset
     2
 COPYRIGHT (c) 1988 by Claus Gittinger
159
514c749165c3 *** empty log message ***
claus
parents: 92
diff changeset
     3
	      All Rights Reserved
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
     4
a27a279701f8 Initial revision
claus
parents:
diff changeset
     5
 This software is furnished under a license and may be used
a27a279701f8 Initial revision
claus
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
a27a279701f8 Initial revision
claus
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
a27a279701f8 Initial revision
claus
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
a27a279701f8 Initial revision
claus
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
a27a279701f8 Initial revision
claus
parents:
diff changeset
    10
 hereby transferred.
a27a279701f8 Initial revision
claus
parents:
diff changeset
    11
"
a27a279701f8 Initial revision
claus
parents:
diff changeset
    12
5467
248b61f615c8 General encoding method (#encodeOn:with:)
Stefan Vogel <sv@exept.de>
parents: 4878
diff changeset
    13
"{ Package: 'stx:libbasic' }"
248b61f615c8 General encoding method (#encodeOn:with:)
Stefan Vogel <sv@exept.de>
parents: 4878
diff changeset
    14
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    15
Object subclass:#Boolean
1245
c8afea3d5af0 commentary
Claus Gittinger <cg@exept.de>
parents: 1119
diff changeset
    16
	instanceVariableNames:''
c8afea3d5af0 commentary
Claus Gittinger <cg@exept.de>
parents: 1119
diff changeset
    17
	classVariableNames:''
c8afea3d5af0 commentary
Claus Gittinger <cg@exept.de>
parents: 1119
diff changeset
    18
	poolDictionaries:''
c8afea3d5af0 commentary
Claus Gittinger <cg@exept.de>
parents: 1119
diff changeset
    19
	category:'Kernel-Objects'
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    20
!
a27a279701f8 Initial revision
claus
parents:
diff changeset
    21
88
81dacba7a63a *** empty log message ***
claus
parents: 54
diff changeset
    22
!Boolean class methodsFor:'documentation'!
81dacba7a63a *** empty log message ***
claus
parents: 54
diff changeset
    23
81dacba7a63a *** empty log message ***
claus
parents: 54
diff changeset
    24
copyright
81dacba7a63a *** empty log message ***
claus
parents: 54
diff changeset
    25
"
81dacba7a63a *** empty log message ***
claus
parents: 54
diff changeset
    26
 COPYRIGHT (c) 1988 by Claus Gittinger
159
514c749165c3 *** empty log message ***
claus
parents: 92
diff changeset
    27
	      All Rights Reserved
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    28
88
81dacba7a63a *** empty log message ***
claus
parents: 54
diff changeset
    29
 This software is furnished under a license and may be used
81dacba7a63a *** empty log message ***
claus
parents: 54
diff changeset
    30
 only in accordance with the terms of that license and with the
81dacba7a63a *** empty log message ***
claus
parents: 54
diff changeset
    31
 inclusion of the above copyright notice.   This software may not
81dacba7a63a *** empty log message ***
claus
parents: 54
diff changeset
    32
 be provided or otherwise made available to, or used by, any
81dacba7a63a *** empty log message ***
claus
parents: 54
diff changeset
    33
 other person.  No title to or ownership of the software is
81dacba7a63a *** empty log message ***
claus
parents: 54
diff changeset
    34
 hereby transferred.
81dacba7a63a *** empty log message ***
claus
parents: 54
diff changeset
    35
"
81dacba7a63a *** empty log message ***
claus
parents: 54
diff changeset
    36
!
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    37
88
81dacba7a63a *** empty log message ***
claus
parents: 54
diff changeset
    38
documentation
81dacba7a63a *** empty log message ***
claus
parents: 54
diff changeset
    39
"
81dacba7a63a *** empty log message ***
claus
parents: 54
diff changeset
    40
    Boolean is an abstract class defining the common protocol for logical
81dacba7a63a *** empty log message ***
claus
parents: 54
diff changeset
    41
    values. The logical values are represented by its two subclasses True and False.
81dacba7a63a *** empty log message ***
claus
parents: 54
diff changeset
    42
81dacba7a63a *** empty log message ***
claus
parents: 54
diff changeset
    43
    There are no instances of Boolean in the system and there is only one
81dacba7a63a *** empty log message ***
claus
parents: 54
diff changeset
    44
    instance of True (which is the global true) and one of False (false).
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    45
88
81dacba7a63a *** empty log message ***
claus
parents: 54
diff changeset
    46
    Boolean redefines some messages which deal with copying Booleans,
81dacba7a63a *** empty log message ***
claus
parents: 54
diff changeset
    47
    to make certain there is only one instance of each.
81dacba7a63a *** empty log message ***
claus
parents: 54
diff changeset
    48
    The system will behave strange if you fiddle around here and create
81dacba7a63a *** empty log message ***
claus
parents: 54
diff changeset
    49
    new instances of True or False (i.e. it will not recognize these new
81dacba7a63a *** empty log message ***
claus
parents: 54
diff changeset
    50
    instances as being true or false).
1294
e26bbb61f6b2 documentation
Claus Gittinger <cg@exept.de>
parents: 1266
diff changeset
    51
e26bbb61f6b2 documentation
Claus Gittinger <cg@exept.de>
parents: 1266
diff changeset
    52
    [author:]
4656
aa895a9835a2 added #hasSharedInstances and tracing support.
Claus Gittinger <cg@exept.de>
parents: 3070
diff changeset
    53
	Claus Gittinger
88
81dacba7a63a *** empty log message ***
claus
parents: 54
diff changeset
    54
"
81dacba7a63a *** empty log message ***
claus
parents: 54
diff changeset
    55
! !
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    56
a27a279701f8 Initial revision
claus
parents:
diff changeset
    57
!Boolean class methodsFor:'instance creation'!
a27a279701f8 Initial revision
claus
parents:
diff changeset
    58
a27a279701f8 Initial revision
claus
parents:
diff changeset
    59
basicNew
1119
956d62a5656c compile seldom used methods with optSpace (is this a good idea ?)
Claus Gittinger <cg@exept.de>
parents: 698
diff changeset
    60
    "{ Pragma: +optSpace }"
956d62a5656c compile seldom used methods with optSpace (is this a good idea ?)
Claus Gittinger <cg@exept.de>
parents: 698
diff changeset
    61
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    62
    "catch instance creation
2
claus
parents: 1
diff changeset
    63
     - there must be exactly one instance of each - no more"
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    64
a27a279701f8 Initial revision
claus
parents:
diff changeset
    65
    self error:'new instances of True/False are not allowed'
a27a279701f8 Initial revision
claus
parents:
diff changeset
    66
! !
a27a279701f8 Initial revision
claus
parents:
diff changeset
    67
3
24d81bf47225 *** empty log message ***
claus
parents: 2
diff changeset
    68
!Boolean class methodsFor:'queries'!
24d81bf47225 *** empty log message ***
claus
parents: 2
diff changeset
    69
4656
aa895a9835a2 added #hasSharedInstances and tracing support.
Claus Gittinger <cg@exept.de>
parents: 3070
diff changeset
    70
hasSharedInstances
aa895a9835a2 added #hasSharedInstances and tracing support.
Claus Gittinger <cg@exept.de>
parents: 3070
diff changeset
    71
    "return true if this class has shared instances, that is, instances
aa895a9835a2 added #hasSharedInstances and tracing support.
Claus Gittinger <cg@exept.de>
parents: 3070
diff changeset
    72
     with the same value are identical.
aa895a9835a2 added #hasSharedInstances and tracing support.
Claus Gittinger <cg@exept.de>
parents: 3070
diff changeset
    73
     False is returned here, only redefined in classes which have unified
aa895a9835a2 added #hasSharedInstances and tracing support.
Claus Gittinger <cg@exept.de>
parents: 3070
diff changeset
    74
     instances (or should be treated so)."
aa895a9835a2 added #hasSharedInstances and tracing support.
Claus Gittinger <cg@exept.de>
parents: 3070
diff changeset
    75
aa895a9835a2 added #hasSharedInstances and tracing support.
Claus Gittinger <cg@exept.de>
parents: 3070
diff changeset
    76
    ^ true
aa895a9835a2 added #hasSharedInstances and tracing support.
Claus Gittinger <cg@exept.de>
parents: 3070
diff changeset
    77
aa895a9835a2 added #hasSharedInstances and tracing support.
Claus Gittinger <cg@exept.de>
parents: 3070
diff changeset
    78
!
aa895a9835a2 added #hasSharedInstances and tracing support.
Claus Gittinger <cg@exept.de>
parents: 3070
diff changeset
    79
3
24d81bf47225 *** empty log message ***
claus
parents: 2
diff changeset
    80
isBuiltInClass
1266
cef9b3cd49df commentary
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
    81
    "return true if this class is known by the run-time-system.
cef9b3cd49df commentary
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
    82
     Here, true is returned (for my two subclasses)."
3
24d81bf47225 *** empty log message ***
claus
parents: 2
diff changeset
    83
24d81bf47225 *** empty log message ***
claus
parents: 2
diff changeset
    84
    ^ true
1266
cef9b3cd49df commentary
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
    85
cef9b3cd49df commentary
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
    86
    "Modified: 23.4.1996 / 15:58:22 / cg"
3
24d81bf47225 *** empty log message ***
claus
parents: 2
diff changeset
    87
! !
24d81bf47225 *** empty log message ***
claus
parents: 2
diff changeset
    88
698
04533375e12c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
    89
!Boolean methodsFor:'binary storage'!
04533375e12c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
    90
04533375e12c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
    91
hasSpecialBinaryRepresentation
04533375e12c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
    92
    "return true, if the receiver has a special binary representation"
04533375e12c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
    93
3070
1bf5a29fddc9 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2416
diff changeset
    94
    ^ true
698
04533375e12c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
    95
! !
04533375e12c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
    96
4878
1a64a89d6c01 blocked #onChangeSend:to:
ca
parents: 4728
diff changeset
    97
!Boolean methodsFor:'blocked'!
1a64a89d6c01 blocked #onChangeSend:to:
ca
parents: 4728
diff changeset
    98
1a64a89d6c01 blocked #onChangeSend:to:
ca
parents: 4728
diff changeset
    99
onChangeSend:selector to:someOne
1a64a89d6c01 blocked #onChangeSend:to:
ca
parents: 4728
diff changeset
   100
    "/ not really an error ...
1a64a89d6c01 blocked #onChangeSend:to:
ca
parents: 4728
diff changeset
   101
    "/ self error:'should not be invoked for booleans'
1a64a89d6c01 blocked #onChangeSend:to:
ca
parents: 4728
diff changeset
   102
! !
1a64a89d6c01 blocked #onChangeSend:to:
ca
parents: 4728
diff changeset
   103
422
claus
parents: 384
diff changeset
   104
!Boolean methodsFor:'converting'!
claus
parents: 384
diff changeset
   105
5937
928b9ed64cbb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5825
diff changeset
   106
asBoolean
928b9ed64cbb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5825
diff changeset
   107
    ^ self
928b9ed64cbb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5825
diff changeset
   108
!
928b9ed64cbb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5825
diff changeset
   109
2416
588d5d510c10 literal encodings
Claus Gittinger <cg@exept.de>
parents: 1294
diff changeset
   110
decodeAsLiteralArray
588d5d510c10 literal encodings
Claus Gittinger <cg@exept.de>
parents: 1294
diff changeset
   111
    "given a literalEncoding in the receiver,
588d5d510c10 literal encodings
Claus Gittinger <cg@exept.de>
parents: 1294
diff changeset
   112
     create & return the corresponding object.
588d5d510c10 literal encodings
Claus Gittinger <cg@exept.de>
parents: 1294
diff changeset
   113
     The inverse operation to #literalArrayEncoding."
588d5d510c10 literal encodings
Claus Gittinger <cg@exept.de>
parents: 1294
diff changeset
   114
588d5d510c10 literal encodings
Claus Gittinger <cg@exept.de>
parents: 1294
diff changeset
   115
    ^ self
588d5d510c10 literal encodings
Claus Gittinger <cg@exept.de>
parents: 1294
diff changeset
   116
588d5d510c10 literal encodings
Claus Gittinger <cg@exept.de>
parents: 1294
diff changeset
   117
    "Created: 25.2.1997 / 19:16:43 / cg"
588d5d510c10 literal encodings
Claus Gittinger <cg@exept.de>
parents: 1294
diff changeset
   118
    "Modified: 25.2.1997 / 19:17:45 / cg"
588d5d510c10 literal encodings
Claus Gittinger <cg@exept.de>
parents: 1294
diff changeset
   119
!
588d5d510c10 literal encodings
Claus Gittinger <cg@exept.de>
parents: 1294
diff changeset
   120
422
claus
parents: 384
diff changeset
   121
literalArrayEncoding
1245
c8afea3d5af0 commentary
Claus Gittinger <cg@exept.de>
parents: 1119
diff changeset
   122
    "encode myself as an array literal, from which a copy of the receiver
c8afea3d5af0 commentary
Claus Gittinger <cg@exept.de>
parents: 1119
diff changeset
   123
     can be reconstructed with #decodeAsLiteralArray."
422
claus
parents: 384
diff changeset
   124
claus
parents: 384
diff changeset
   125
    ^ self
claus
parents: 384
diff changeset
   126
claus
parents: 384
diff changeset
   127
    "Modified: 5.9.1995 / 22:46:57 / claus"
1245
c8afea3d5af0 commentary
Claus Gittinger <cg@exept.de>
parents: 1119
diff changeset
   128
    "Modified: 22.4.1996 / 13:00:05 / cg"
422
claus
parents: 384
diff changeset
   129
! !
claus
parents: 384
diff changeset
   130
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   131
!Boolean methodsFor:'copying'!
a27a279701f8 Initial revision
claus
parents:
diff changeset
   132
159
514c749165c3 *** empty log message ***
claus
parents: 92
diff changeset
   133
copy
514c749165c3 *** empty log message ***
claus
parents: 92
diff changeset
   134
    "return a shallow copy of the receiver
514c749165c3 *** empty log message ***
claus
parents: 92
diff changeset
   135
     - since both true and false are unique, return the receiver"
514c749165c3 *** empty log message ***
claus
parents: 92
diff changeset
   136
514c749165c3 *** empty log message ***
claus
parents: 92
diff changeset
   137
    ^ self
514c749165c3 *** empty log message ***
claus
parents: 92
diff changeset
   138
!
514c749165c3 *** empty log message ***
claus
parents: 92
diff changeset
   139
12
8e03bd717355 *** empty log message ***
claus
parents: 5
diff changeset
   140
deepCopyUsing:aDictionary
8e03bd717355 *** empty log message ***
claus
parents: 5
diff changeset
   141
    "return a deep copy of the receiver
8e03bd717355 *** empty log message ***
claus
parents: 5
diff changeset
   142
     - since both true and false are unique, return the receiver"
8e03bd717355 *** empty log message ***
claus
parents: 5
diff changeset
   143
8e03bd717355 *** empty log message ***
claus
parents: 5
diff changeset
   144
    ^ self
8e03bd717355 *** empty log message ***
claus
parents: 5
diff changeset
   145
!
8e03bd717355 *** empty log message ***
claus
parents: 5
diff changeset
   146
698
04533375e12c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   147
shallowCopy
04533375e12c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   148
    "return a shallow copy of the receiver
04533375e12c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   149
     - since both true and false are unique, return the receiver"
04533375e12c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   150
04533375e12c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   151
    ^ self
04533375e12c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   152
!
04533375e12c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   153
12
8e03bd717355 *** empty log message ***
claus
parents: 5
diff changeset
   154
simpleDeepCopy
8e03bd717355 *** empty log message ***
claus
parents: 5
diff changeset
   155
    "return a deep copy of the receiver
8e03bd717355 *** empty log message ***
claus
parents: 5
diff changeset
   156
     - since both true and false are unique, return the receiver"
8e03bd717355 *** empty log message ***
claus
parents: 5
diff changeset
   157
8e03bd717355 *** empty log message ***
claus
parents: 5
diff changeset
   158
    ^ self
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   159
! !
a27a279701f8 Initial revision
claus
parents:
diff changeset
   160
698
04533375e12c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   161
!Boolean methodsFor:'printing & storing'!
04533375e12c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   162
04533375e12c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   163
printOn:aStream
04533375e12c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   164
    "append a character sequence representing the receiver to the argument,
04533375e12c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   165
     aStream"
04533375e12c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   166
04533375e12c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   167
    aStream nextPutAll:self printString
04533375e12c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   168
!
04533375e12c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   169
04533375e12c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   170
storeOn:aStream
04533375e12c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   171
    "append a character sequence to the argument, aStream from which the
04533375e12c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   172
     receiver can be reconstructed using readFrom:."
04533375e12c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   173
04533375e12c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   174
    ^ self printOn:aStream
04533375e12c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   175
!
04533375e12c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   176
04533375e12c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   177
storeString
04533375e12c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   178
    "return  a character sequence to the argument, aStream from which the
04533375e12c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   179
     receiver can be reconstructed using readFrom:."
04533375e12c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   180
04533375e12c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   181
    ^ self printString
04533375e12c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   182
! !
04533375e12c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   183
5825
6743e22cd010 Added method isBoolean; need this!
martin
parents: 5467
diff changeset
   184
!Boolean methodsFor:'testing'!
6743e22cd010 Added method isBoolean; need this!
martin
parents: 5467
diff changeset
   185
6743e22cd010 Added method isBoolean; need this!
martin
parents: 5467
diff changeset
   186
isBoolean
6743e22cd010 Added method isBoolean; need this!
martin
parents: 5467
diff changeset
   187
6743e22cd010 Added method isBoolean; need this!
martin
parents: 5467
diff changeset
   188
    "
6743e22cd010 Added method isBoolean; need this!
martin
parents: 5467
diff changeset
   189
    Return true, because it is a boolean.
6743e22cd010 Added method isBoolean; need this!
martin
parents: 5467
diff changeset
   190
    "
6743e22cd010 Added method isBoolean; need this!
martin
parents: 5467
diff changeset
   191
6743e22cd010 Added method isBoolean; need this!
martin
parents: 5467
diff changeset
   192
    ^ true.
8305
7f80b5a18ffc asBoolean for WO
werner
parents: 5937
diff changeset
   193
!
7f80b5a18ffc asBoolean for WO
werner
parents: 5937
diff changeset
   194
7f80b5a18ffc asBoolean for WO
werner
parents: 5937
diff changeset
   195
isLiteral
7f80b5a18ffc asBoolean for WO
werner
parents: 5937
diff changeset
   196
    "return true, if the receiver can be used as a literal constant in ST syntax
7f80b5a18ffc asBoolean for WO
werner
parents: 5937
diff changeset
   197
     (i.e. can be used in constant arrays)"
7f80b5a18ffc asBoolean for WO
werner
parents: 5937
diff changeset
   198
7f80b5a18ffc asBoolean for WO
werner
parents: 5937
diff changeset
   199
    ^ true
5825
6743e22cd010 Added method isBoolean; need this!
martin
parents: 5467
diff changeset
   200
! !
4728
37eaa8241422 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4682
diff changeset
   201
4656
aa895a9835a2 added #hasSharedInstances and tracing support.
Claus Gittinger <cg@exept.de>
parents: 3070
diff changeset
   202
!Boolean methodsFor:'tracing'!
aa895a9835a2 added #hasSharedInstances and tracing support.
Claus Gittinger <cg@exept.de>
parents: 3070
diff changeset
   203
4682
4158042a9c8c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4656
diff changeset
   204
traceInto:aRequestor level:level from:referrer
4656
aa895a9835a2 added #hasSharedInstances and tracing support.
Claus Gittinger <cg@exept.de>
parents: 3070
diff changeset
   205
    "double dispatch into tracer, passing my type implicitely in the selector"
aa895a9835a2 added #hasSharedInstances and tracing support.
Claus Gittinger <cg@exept.de>
parents: 3070
diff changeset
   206
4682
4158042a9c8c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4656
diff changeset
   207
    ^ aRequestor traceBoolean:self level:level from:referrer
4656
aa895a9835a2 added #hasSharedInstances and tracing support.
Claus Gittinger <cg@exept.de>
parents: 3070
diff changeset
   208
aa895a9835a2 added #hasSharedInstances and tracing support.
Claus Gittinger <cg@exept.de>
parents: 3070
diff changeset
   209
aa895a9835a2 added #hasSharedInstances and tracing support.
Claus Gittinger <cg@exept.de>
parents: 3070
diff changeset
   210
! !
aa895a9835a2 added #hasSharedInstances and tracing support.
Claus Gittinger <cg@exept.de>
parents: 3070
diff changeset
   211
8394
da194de43766 Generalize visitor pattern and define #visit...:with: -methods instead
Stefan Vogel <sv@exept.de>
parents: 8305
diff changeset
   212
!Boolean methodsFor:'visiting'!
da194de43766 Generalize visitor pattern and define #visit...:with: -methods instead
Stefan Vogel <sv@exept.de>
parents: 8305
diff changeset
   213
da194de43766 Generalize visitor pattern and define #visit...:with: -methods instead
Stefan Vogel <sv@exept.de>
parents: 8305
diff changeset
   214
acceptVisitor:aVisitor with:aParameter
da194de43766 Generalize visitor pattern and define #visit...:with: -methods instead
Stefan Vogel <sv@exept.de>
parents: 8305
diff changeset
   215
da194de43766 Generalize visitor pattern and define #visit...:with: -methods instead
Stefan Vogel <sv@exept.de>
parents: 8305
diff changeset
   216
    ^ aVisitor visitBoolean:self with:aParameter
da194de43766 Generalize visitor pattern and define #visit...:with: -methods instead
Stefan Vogel <sv@exept.de>
parents: 8305
diff changeset
   217
! !
da194de43766 Generalize visitor pattern and define #visit...:with: -methods instead
Stefan Vogel <sv@exept.de>
parents: 8305
diff changeset
   218
698
04533375e12c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   219
!Boolean class methodsFor:'documentation'!
54
06dbdeeed4f9 *** empty log message ***
claus
parents: 37
diff changeset
   220
698
04533375e12c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   221
version
8394
da194de43766 Generalize visitor pattern and define #visit...:with: -methods instead
Stefan Vogel <sv@exept.de>
parents: 8305
diff changeset
   222
    ^ '$Header: /cvs/stx/stx/libbasic/Boolean.st,v 1.31 2004-06-11 18:12:22 stefan Exp $'
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   223
! !