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