1926
|
1 |
"
|
|
2 |
COPYRIGHT (c) 1998 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:libbasic2' }"
|
|
13 |
|
605
|
14 |
ExternalBytes subclass:#ExternalLong
|
|
15 |
instanceVariableNames:''
|
|
16 |
classVariableNames:''
|
|
17 |
poolDictionaries:''
|
623
|
18 |
category:'System-Support'
|
605
|
19 |
!
|
|
20 |
|
1926
|
21 |
!ExternalLong class methodsFor:'documentation'!
|
|
22 |
|
|
23 |
copyright
|
|
24 |
"
|
|
25 |
COPYRIGHT (c) 1998 by eXept Software AG
|
|
26 |
All Rights Reserved
|
|
27 |
|
|
28 |
This software is furnished under a license and may be used
|
|
29 |
only in accordance with the terms of that license and with the
|
|
30 |
inclusion of the above copyright notice. This software may not
|
|
31 |
be provided or otherwise made available to, or used by, any
|
|
32 |
other person. No title to or ownership of the software is
|
|
33 |
hereby transferred.
|
|
34 |
"
|
2329
|
35 |
!
|
|
36 |
|
|
37 |
documentation
|
|
38 |
"
|
|
39 |
mostly added for odbc
|
|
40 |
"
|
1926
|
41 |
! !
|
605
|
42 |
|
|
43 |
!ExternalLong class methodsFor:'instance creation'!
|
|
44 |
|
|
45 |
new
|
|
46 |
^ super new:4
|
|
47 |
|
|
48 |
"
|
|
49 |
ExternalLong new
|
|
50 |
"
|
|
51 |
!
|
|
52 |
|
|
53 |
unprotectedNew
|
|
54 |
^ super unprotectedNew:4
|
|
55 |
|
|
56 |
"
|
|
57 |
ExternalLong new
|
|
58 |
"
|
|
59 |
! !
|
|
60 |
|
|
61 |
!ExternalLong methodsFor:'accessing'!
|
|
62 |
|
|
63 |
asBoolean
|
|
64 |
|result|
|
|
65 |
|
609
|
66 |
result := self byteAt:1.
|
605
|
67 |
result = 0 ifTrue:[
|
|
68 |
^ false.
|
|
69 |
].
|
|
70 |
^ true.
|
|
71 |
!
|
|
72 |
|
|
73 |
asInteger
|
609
|
74 |
^ self signedWordAt:1 MSB:false
|
605
|
75 |
|
|
76 |
"
|
|
77 |
ODBCLibrary::ExternalLong new value:10
|
|
78 |
"
|
|
79 |
!
|
|
80 |
|
|
81 |
asNullStatus
|
|
82 |
|result|
|
|
83 |
|
|
84 |
result := self wordAt:1 MSB:false.
|
2329
|
85 |
result = 0 ifTrue:[ ^ #SQL_NO_NULLS ].
|
|
86 |
result = 1 ifTrue:[ ^ #SQL_NULLABLE ].
|
|
87 |
^ #SQL_NULLABLE_UNKNOWN
|
|
88 |
!
|
|
89 |
|
|
90 |
asPointer
|
2330
|
91 |
^ ExternalAddress new setAddress:(self value)
|
2329
|
92 |
|
|
93 |
"
|
|
94 |
(ExternalLong new value:10) asPointer
|
|
95 |
"
|
605
|
96 |
!
|
|
97 |
|
609
|
98 |
boolean:bool
|
|
99 |
bool ifTrue:[self byteAt:1 put:1].
|
|
100 |
self byteAt:1 put:0.
|
|
101 |
!
|
|
102 |
|
605
|
103 |
value
|
|
104 |
^ self doubleWordAt:1
|
|
105 |
|
|
106 |
"
|
623
|
107 |
ExternalLong new value:10
|
605
|
108 |
"
|
623
|
109 |
|
|
110 |
"Modified: / 30.3.1998 / 17:07:57 / cg"
|
605
|
111 |
!
|
|
112 |
|
|
113 |
value:anInteger
|
|
114 |
self doubleWordAt:1 put:anInteger
|
|
115 |
! !
|
|
116 |
|
|
117 |
!ExternalLong class methodsFor:'documentation'!
|
|
118 |
|
|
119 |
version
|
2330
|
120 |
^ '$Header: /cvs/stx/stx/libbasic2/ExternalLong.st,v 1.6 2009-11-04 23:08:23 cg Exp $'
|
2329
|
121 |
!
|
|
122 |
|
|
123 |
version_CVS
|
2330
|
124 |
^ '$Header: /cvs/stx/stx/libbasic2/ExternalLong.st,v 1.6 2009-11-04 23:08:23 cg Exp $'
|
605
|
125 |
! !
|