author | Claus Gittinger <cg@exept.de> |
Thu, 09 Jun 2016 18:09:58 +0200 | |
changeset 3934 | 3fc6968232c1 |
parent 3876 | 0af18f03d193 |
permissions | -rw-r--r-- |
601 | 1 |
" |
736 | 2 |
COPYRIGHT (c) 1997 by eXept Software AG |
601 | 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 |
" |
|
1177 | 12 |
"{ Package: 'stx:libbasic2' }" |
13 |
||
3731 | 14 |
"{ NameSpace: Smalltalk }" |
15 |
||
1177 | 16 |
UnboxedIntegerArray variableSignedLongSubclass:#SignedIntegerArray |
601 | 17 |
instanceVariableNames:'' |
18 |
classVariableNames:'' |
|
19 |
poolDictionaries:'' |
|
20 |
category:'Collections-Arrayed' |
|
21 |
! |
|
22 |
||
23 |
!SignedIntegerArray class methodsFor:'documentation'! |
|
24 |
||
25 |
copyright |
|
26 |
" |
|
27 |
COPYRIGHT (c) 1997 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 |
! |
|
38 |
||
39 |
documentation |
|
40 |
" |
|
703 | 41 |
SignedIntegerArrays store 32bit signed integers in the range -16r80000000..16r7FFFFFFF. |
601 | 42 |
In contrast to normal arrays (which store pointers to their elements), |
1574 | 43 |
signedIntegerArrays store the values in a dense & compact way. |
601 | 44 |
Since the representation fits the underlying C-language systems representation |
45 |
of signed int32's, this is also useful to pass bulk data to c primitive code. |
|
46 |
||
736 | 47 |
[memory requirements:] |
48 |
OBJ-HEADER + (size * 4) |
|
49 |
||
601 | 50 |
[see also:] |
736 | 51 |
ByteArray BooleanArray FloatArray DoubleArray Array |
52 |
SignedWordArray WordArray IntegerArray LongIntegerArray |
|
53 |
SignedLongIntegerArray |
|
601 | 54 |
|
55 |
[author:] |
|
736 | 56 |
Claus Gittinger |
601 | 57 |
" |
58 |
! ! |
|
59 |
||
2641
9093942ea3a8
faster elementByteSize query
Claus Gittinger <cg@exept.de>
parents:
1574
diff
changeset
|
60 |
!SignedIntegerArray class methodsFor:'queries'! |
9093942ea3a8
faster elementByteSize query
Claus Gittinger <cg@exept.de>
parents:
1574
diff
changeset
|
61 |
|
9093942ea3a8
faster elementByteSize query
Claus Gittinger <cg@exept.de>
parents:
1574
diff
changeset
|
62 |
elementByteSize |
3333 | 63 |
"for bit-like containers, return the number of bytes stored per element. |
64 |
Here, 4 is returned" |
|
65 |
||
2641
9093942ea3a8
faster elementByteSize query
Claus Gittinger <cg@exept.de>
parents:
1574
diff
changeset
|
66 |
^ 4 |
9093942ea3a8
faster elementByteSize query
Claus Gittinger <cg@exept.de>
parents:
1574
diff
changeset
|
67 |
|
9093942ea3a8
faster elementByteSize query
Claus Gittinger <cg@exept.de>
parents:
1574
diff
changeset
|
68 |
"Created: / 15-09-2011 / 14:11:46 / cg" |
3731 | 69 |
! |
70 |
||
71 |
maxVal |
|
3876 | 72 |
"the maximum value which can be stored in instances of me. |
73 |
For SignedIntegerArrays, this is 2147483647, eg. 16r7FFFFFFF (largest 32bit signed int)" |
|
3865 | 74 |
|
3731 | 75 |
^ 16r7FFFFFFF |
3865 | 76 |
! |
77 |
||
78 |
minVal |
|
3876 | 79 |
"the minimum value which can be stored in instances of me. |
80 |
For SignedIntegerArrays, this is -2147483648 eg. -16r80000000 (smallest 32bit signed int)" |
|
3865 | 81 |
|
82 |
^ -16r80000000 |
|
2641
9093942ea3a8
faster elementByteSize query
Claus Gittinger <cg@exept.de>
parents:
1574
diff
changeset
|
83 |
! ! |
9093942ea3a8
faster elementByteSize query
Claus Gittinger <cg@exept.de>
parents:
1574
diff
changeset
|
84 |
|
601 | 85 |
!SignedIntegerArray class methodsFor:'documentation'! |
86 |
||
87 |
version |
|
3731 | 88 |
^ '$Header$' |
3876 | 89 |
! |
90 |
||
91 |
version_CVS |
|
92 |
^ '$Header$' |
|
601 | 93 |
! ! |
3333 | 94 |