SignedIntegerArray.st
changeset 20651 7d60ab55ac47
child 22270 1e7c344a321a
equal deleted inserted replaced
20650:aa96939e894b 20651:7d60ab55ac47
       
     1 "
       
     2  COPYRIGHT (c) 1997 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 "
       
    12 "{ Package: 'stx:libbasic' }"
       
    13 
       
    14 "{ NameSpace: Smalltalk }"
       
    15 
       
    16 UnboxedIntegerArray variableSignedLongSubclass:#SignedIntegerArray
       
    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 "
       
    41     SignedIntegerArrays store 32bit signed integers in the range -16r80000000..16r7FFFFFFF.
       
    42     In contrast to normal arrays (which store pointers to their elements),
       
    43     signedIntegerArrays store the values in a dense & compact way. 
       
    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 
       
    47     [memory requirements:]
       
    48         OBJ-HEADER + (size * 4)
       
    49 
       
    50     [see also:]
       
    51         ByteArray BooleanArray FloatArray DoubleArray Array
       
    52         SignedWordArray WordArray IntegerArray LongIntegerArray
       
    53         SignedLongIntegerArray
       
    54 
       
    55     [author:]
       
    56         Claus Gittinger
       
    57 "
       
    58 ! !
       
    59 
       
    60 !SignedIntegerArray class methodsFor:'queries'!
       
    61 
       
    62 elementByteSize
       
    63     "for bit-like containers, return the number of bytes stored per element.
       
    64      Here, 4 is returned"
       
    65 
       
    66     ^ 4
       
    67 
       
    68     "Created: / 15-09-2011 / 14:11:46 / cg"
       
    69 !
       
    70 
       
    71 maxVal
       
    72     "the maximum value which can be stored in instances of me.
       
    73      For SignedIntegerArrays, this is 2147483647, eg. 16r7FFFFFFF (largest 32bit signed int)"
       
    74 
       
    75     ^ 16r7FFFFFFF
       
    76 !
       
    77 
       
    78 minVal
       
    79     "the minimum value which can be stored in instances of me.
       
    80      For SignedIntegerArrays, this is -2147483648 eg. -16r80000000 (smallest 32bit signed int)"
       
    81 
       
    82     ^ -16r80000000
       
    83 ! !
       
    84 
       
    85 !SignedIntegerArray class methodsFor:'documentation'!
       
    86 
       
    87 version
       
    88     ^ '$Header$'
       
    89 !
       
    90 
       
    91 version_CVS
       
    92     ^ '$Header$'
       
    93 ! !
       
    94