author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Mon, 26 Apr 2010 19:26:38 +0100 | |
branch | jv |
changeset 17761 | b0e5971141bc |
parent 17711 | 39faaaf888b4 |
child 17845 | 7e0cfaac936d |
permissions | -rw-r--r-- |
9343 | 1 |
" |
2 |
COPYRIGHT (c) 2006 by eXept Software AG |
|
9350 | 3 |
All Rights Reserved |
9343 | 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 |
||
9350 | 14 |
ExternalBytes subclass:#ExternalStructure |
9343 | 15 |
instanceVariableNames:'' |
16 |
classVariableNames:'' |
|
17 |
poolDictionaries:'' |
|
18 |
category:'System-Support' |
|
19 |
! |
|
20 |
||
21 |
ExternalStructure class instanceVariableNames:'cType' |
|
22 |
||
23 |
" |
|
24 |
No other class instance variables are inherited by this class. |
|
25 |
" |
|
26 |
! |
|
27 |
||
28 |
!ExternalStructure class methodsFor:'documentation'! |
|
29 |
||
30 |
copyright |
|
31 |
" |
|
32 |
COPYRIGHT (c) 2006 by eXept Software AG |
|
9350 | 33 |
All Rights Reserved |
9343 | 34 |
|
35 |
This software is furnished under a license and may be used |
|
36 |
only in accordance with the terms of that license and with the |
|
37 |
inclusion of the above copyright notice. This software may not |
|
38 |
be provided or otherwise made available to, or used by, any |
|
39 |
other person. No title to or ownership of the software is |
|
40 |
hereby transferred. |
|
41 |
" |
|
42 |
! |
|
43 |
||
44 |
documentation |
|
45 |
" |
|
46 |
Instances of this class represent external (non-Smalltalk) data, |
|
47 |
typically C-structs or C++ instances. |
|
9350 | 48 |
They are only useful to represent handles as returned by C functions as smalltalk objects. |
9343 | 49 |
|
50 |
ExternallStructures are much like ExternalBytes - however, the latter |
|
51 |
allow you to access bytes via indexed at:/at:put: messages, whilst instances of subclasses of me |
|
52 |
allow access via the corresponding getter/setter methods of my C-type. |
|
53 |
||
54 |
[author:] |
|
9350 | 55 |
Claus Gittinger |
9343 | 56 |
|
57 |
[see also:] |
|
9350 | 58 |
ExternalBytes ExternalAddress |
59 |
( how to write primitive code :html: programming/primitive.html ) |
|
9343 | 60 |
" |
61 |
! ! |
|
62 |
||
9387 | 63 |
!ExternalStructure class methodsFor:'instance creation'! |
64 |
||
65 |
fromExternalAddress:anExternalAddress |
|
66 |
^ self new fromExternalAddress:anExternalAddress |
|
67 |
! ! |
|
68 |
||
9343 | 69 |
!ExternalStructure class methodsFor:'queries'! |
70 |
||
71 |
cType |
|
72 |
^ cType |
|
73 |
! ! |
|
74 |
||
9387 | 75 |
!ExternalStructure methodsFor:'private'! |
76 |
||
77 |
fromExternalAddress:anExternalAddress |
|
78 |
self setAddress:(anExternalAddress address) size:(anExternalAddress size). |
|
79 |
! ! |
|
80 |
||
9343 | 81 |
!ExternalStructure class methodsFor:'documentation'! |
82 |
||
83 |
version |
|
17761
b0e5971141bc
Added Lookup and BuiltinLookup classes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17711
diff
changeset
|
84 |
^ '$Id: ExternalStructure.st 10517 2010-04-26 18:26:38Z vranyj1 $' |
b0e5971141bc
Added Lookup and BuiltinLookup classes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17711
diff
changeset
|
85 |
! |
b0e5971141bc
Added Lookup and BuiltinLookup classes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17711
diff
changeset
|
86 |
|
b0e5971141bc
Added Lookup and BuiltinLookup classes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17711
diff
changeset
|
87 |
version_SVN |
b0e5971141bc
Added Lookup and BuiltinLookup classes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
17711
diff
changeset
|
88 |
^ '$Id: ExternalStructure.st 10517 2010-04-26 18:26:38Z vranyj1 $' |
9343 | 89 |
! ! |