author | Claus Gittinger <cg@exept.de> |
Fri, 11 Jan 2013 16:13:27 +0100 | |
changeset 3053 | 2c1b6c1e317f |
parent 2752 | 77921bb1acbe |
child 3201 | e66ca008e06e |
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 |
|
77 |
"return another valueHolder, which returns the logical and of myself and another valueHolder" |
|
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 |
" |
|
94 |
! ! |
|
95 |
||
96 |
!BooleanBlockValue class methodsFor:'documentation'! |
|
97 |
||
98 |
version |
|
2752 | 99 |
^ '$Header: /cvs/stx/stx/libview2/BooleanBlockValue.st,v 1.3 2009-09-29 19:32:28 cg Exp $' |
100 |
! |
|
101 |
||
102 |
version_CVS |
|
103 |
^ '$Header: /cvs/stx/stx/libview2/BooleanBlockValue.st,v 1.3 2009-09-29 19:32:28 cg Exp $' |
|
2463 | 104 |
! ! |