author | Claus Gittinger <cg@exept.de> |
Thu, 09 Jun 2016 17:01:18 +0200 | |
changeset 3918 | c565bdb0c8c4 |
parent 3877 | 8f70271485f2 |
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 |
||
3732 | 14 |
"{ NameSpace: Smalltalk }" |
15 |
||
1177 | 16 |
UnboxedIntegerArray variableSignedLongLongSubclass:#SignedLongIntegerArray |
703 | 17 |
instanceVariableNames:'' |
18 |
classVariableNames:'' |
|
19 |
poolDictionaries:'' |
|
20 |
category:'Collections-Arrayed' |
|
21 |
! |
|
22 |
||
23 |
!SignedLongIntegerArray 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 |
SignedLongIntegerArrays store 64bit signed integers in the range |
|
42 |
-16r8000000000000000..16r7FFFFFFFFFFFFFFF. |
|
43 |
In contrast to normal arrays (which store pointers to their elements), |
|
1574 | 44 |
signedLongIntegerArrays store the values in a dense & compact way. |
703 | 45 |
Since the representation fits the underlying C-language systems representation |
46 |
of signed 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 |
LongIntegerArray |
|
703 | 56 |
|
57 |
[author:] |
|
736 | 58 |
Claus Gittinger |
703 | 59 |
" |
60 |
! ! |
|
61 |
||
2643
4aebab81d404
faster elementByteSize query
Claus Gittinger <cg@exept.de>
parents:
1574
diff
changeset
|
62 |
!SignedLongIntegerArray class methodsFor:'queries'! |
4aebab81d404
faster elementByteSize query
Claus Gittinger <cg@exept.de>
parents:
1574
diff
changeset
|
63 |
|
4aebab81d404
faster elementByteSize query
Claus Gittinger <cg@exept.de>
parents:
1574
diff
changeset
|
64 |
elementByteSize |
3332 | 65 |
"for bit-like containers, return the number of bytes stored per element. |
66 |
Here, 8 is returned" |
|
67 |
||
2643
4aebab81d404
faster elementByteSize query
Claus Gittinger <cg@exept.de>
parents:
1574
diff
changeset
|
68 |
^ 8 |
4aebab81d404
faster elementByteSize query
Claus Gittinger <cg@exept.de>
parents:
1574
diff
changeset
|
69 |
|
4aebab81d404
faster elementByteSize query
Claus Gittinger <cg@exept.de>
parents:
1574
diff
changeset
|
70 |
"Created: / 15-09-2011 / 14:11:31 / cg" |
3732 | 71 |
! |
72 |
||
73 |
maxVal |
|
3877 | 74 |
"the maximum value which can be stored in instances of me. |
75 |
For SignedLongIntegerArrays, this is 9223372036854775807 eg. 16r7FFFFFFFFFFFFFFF |
|
76 |
(largest 64bit signed int)" |
|
3866 | 77 |
|
3732 | 78 |
^ 16r7FFFFFFFFFFFFFFF |
3866 | 79 |
! |
80 |
||
81 |
minVal |
|
3877 | 82 |
"the minimum value which can be stored in instances of me. |
83 |
For SignedLongIntegerArrays, this is -9223372036854775808 eg. -16r8000000000000000 |
|
84 |
(smallest 64bit signed int)" |
|
3866 | 85 |
|
86 |
^ -16r8000000000000000 |
|
2643
4aebab81d404
faster elementByteSize query
Claus Gittinger <cg@exept.de>
parents:
1574
diff
changeset
|
87 |
! ! |
4aebab81d404
faster elementByteSize query
Claus Gittinger <cg@exept.de>
parents:
1574
diff
changeset
|
88 |
|
703 | 89 |
!SignedLongIntegerArray class methodsFor:'documentation'! |
90 |
||
91 |
version |
|
3732 | 92 |
^ '$Header$' |
3877 | 93 |
! |
94 |
||
95 |
version_CVS |
|
96 |
^ '$Header$' |
|
703 | 97 |
! ! |
3332 | 98 |