author | mawalch |
Mon, 22 May 2017 12:19:24 +0200 | |
changeset 3955 | 23fc9de7f301 |
parent 3812 | 18492d5d4423 |
permissions | -rw-r--r-- |
2752 | 1 |
" |
2 |
COPYRIGHT (c) 2008 by eXept Software AG |
|
3 |
All Rights Reserved |
|
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
2463 | 12 |
"{ Package: 'stx:libview2' }" |
13 |
||
3812 | 14 |
"{ NameSpace: Smalltalk }" |
15 |
||
2463 | 16 |
BlockValue subclass:#BooleanBlockValue |
17 |
instanceVariableNames:'' |
|
18 |
classVariableNames:'' |
|
19 |
poolDictionaries:'' |
|
20 |
category:'Interface-Support-Models' |
|
21 |
! |
|
22 |
||
2752 | 23 |
!BooleanBlockValue class methodsFor:'documentation'! |
24 |
||
25 |
copyright |
|
26 |
" |
|
27 |
COPYRIGHT (c) 2008 by eXept Software AG |
|
28 |
All Rights Reserved |
|
29 |
||
30 |
This software is furnished under a license and may be used |
|
31 |
only in accordance with the terms of that license and with the |
|
32 |
inclusion of the above copyright notice. This software may not |
|
33 |
be provided or otherwise made available to, or used by, any |
|
34 |
other person. No title to or ownership of the software is |
|
35 |
hereby transferred. |
|
36 |
" |
|
37 |
! ! |
|
2463 | 38 |
|
39 |
!BooleanBlockValue methodsFor:'logical operations'! |
|
40 |
||
41 |
& anotherBooleanValueHolder |
|
42 |
"return another valueHolder, which returns the logical and of myself and another valueHolder" |
|
43 |
||
3812 | 44 |
^ self class |
2463 | 45 |
forLogical:self and:anotherBooleanValueHolder |
46 |
||
47 |
" |
|
48 |
|b1 b2 a| |
|
49 |
||
50 |
b1 := BooleanValueHolder new. |
|
51 |
b2 := BooleanValueHolder new. |
|
52 |
a := b1 & b2. |
|
53 |
b1 value:false. |
|
54 |
b2 value:true. |
|
55 |
a value. |
|
56 |
b1 value:true. |
|
57 |
a value. |
|
58 |
" |
|
59 |
! |
|
60 |
||
2484
d55c4fd22196
cannot use not as selector - sigh !
Claus Gittinger <cg@exept.de>
parents:
2463
diff
changeset
|
61 |
logicalNot |
2463 | 62 |
"return another valueHolder, which returns the logical not of myself" |
63 |
||
3812 | 64 |
^ self class forLogicalNot:self. |
2463 | 65 |
|
66 |
" |
|
67 |
|b nb| |
|
68 |
||
69 |
b := BooleanValueHolder new. |
|
70 |
nb := b not. |
|
71 |
b value:true. |
|
72 |
nb value. |
|
73 |
b value:false. |
|
74 |
nb value. |
|
75 |
" |
|
76 |
! |
|
77 |
||
78 |
| anotherBooleanValueHolder |
|
3201 | 79 |
"return another valueHolder, which returns the logical or of myself and another valueHolder" |
2463 | 80 |
|
3812 | 81 |
^ self class |
2463 | 82 |
forLogical:self or:anotherBooleanValueHolder |
83 |
||
84 |
" |
|
85 |
|b1 b2 o| |
|
86 |
||
87 |
b1 := BooleanValueHolder new. |
|
88 |
b2 := BooleanValueHolder new. |
|
89 |
o := b1 | b2. |
|
90 |
b1 value:false. |
|
91 |
b2 value:false. |
|
92 |
o value. |
|
93 |
b1 value:true. |
|
94 |
o value. |
|
95 |
" |
|
3201 | 96 |
|
97 |
"Modified (comment): / 27-07-2013 / 09:54:54 / cg" |
|
2463 | 98 |
! ! |
99 |
||
100 |
!BooleanBlockValue class methodsFor:'documentation'! |
|
101 |
||
102 |
version |
|
3812 | 103 |
^ '$Header$' |
2752 | 104 |
! |
105 |
||
106 |
version_CVS |
|
3812 | 107 |
^ '$Header$' |
2463 | 108 |
! ! |
3201 | 109 |