605
|
1 |
ExternalBytes subclass:#ExternalLong
|
|
2 |
instanceVariableNames:''
|
|
3 |
classVariableNames:''
|
|
4 |
poolDictionaries:''
|
623
|
5 |
category:'System-Support'
|
605
|
6 |
!
|
|
7 |
|
|
8 |
|
|
9 |
!ExternalLong class methodsFor:'instance creation'!
|
|
10 |
|
|
11 |
new
|
|
12 |
^ super new:4
|
|
13 |
|
|
14 |
"
|
|
15 |
ExternalLong new
|
|
16 |
"
|
|
17 |
!
|
|
18 |
|
|
19 |
unprotectedNew
|
|
20 |
^ super unprotectedNew:4
|
|
21 |
|
|
22 |
"
|
|
23 |
ExternalLong new
|
|
24 |
"
|
|
25 |
! !
|
|
26 |
|
|
27 |
!ExternalLong methodsFor:'accessing'!
|
|
28 |
|
|
29 |
asBoolean
|
|
30 |
|
|
31 |
|result|
|
|
32 |
|
609
|
33 |
result := self byteAt:1.
|
605
|
34 |
result = 0 ifTrue:[
|
|
35 |
^ false.
|
|
36 |
].
|
|
37 |
^ true.
|
|
38 |
|
|
39 |
"
|
|
40 |
"
|
|
41 |
!
|
|
42 |
|
|
43 |
asInteger
|
609
|
44 |
^ self signedWordAt:1 MSB:false
|
605
|
45 |
|
|
46 |
"
|
|
47 |
ODBCLibrary::ExternalLong new value:10
|
|
48 |
"
|
|
49 |
!
|
|
50 |
|
|
51 |
asNullStatus
|
|
52 |
|
|
53 |
|result|
|
|
54 |
|
|
55 |
result := self wordAt:1 MSB:false.
|
|
56 |
result = 0 ifTrue:[
|
|
57 |
^ #SQL_NO_NULLS.
|
|
58 |
] ifFalse:[
|
|
59 |
result = 1 ifTrue:[
|
|
60 |
^ #SQL_NULLABLE.
|
|
61 |
] ifFalse:[
|
|
62 |
^ #SQL_NULLABLE_UNKNOWN
|
|
63 |
].
|
|
64 |
].
|
|
65 |
^ nil
|
|
66 |
!
|
|
67 |
|
609
|
68 |
boolean:bool
|
|
69 |
|
|
70 |
|result|
|
|
71 |
|
|
72 |
bool ifTrue:[self byteAt:1 put:1].
|
|
73 |
self byteAt:1 put:0.
|
|
74 |
!
|
|
75 |
|
605
|
76 |
value
|
|
77 |
^ self doubleWordAt:1
|
|
78 |
|
|
79 |
"
|
623
|
80 |
ExternalLong new value:10
|
605
|
81 |
"
|
623
|
82 |
|
|
83 |
"Modified: / 30.3.1998 / 17:07:57 / cg"
|
605
|
84 |
!
|
|
85 |
|
|
86 |
value:anInteger
|
|
87 |
self doubleWordAt:1 put:anInteger
|
|
88 |
! !
|
|
89 |
|
|
90 |
!ExternalLong class methodsFor:'documentation'!
|
|
91 |
|
|
92 |
version
|
623
|
93 |
^ '$Header: /cvs/stx/stx/libbasic2/ExternalLong.st,v 1.3 1998-03-30 15:09:07 cg Exp $'
|
605
|
94 |
! !
|