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