ExternalStructure.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Wed, 28 Sep 2011 20:07:49 +0100
branchjv
changeset 17865 598963c6ff8e
parent 17846 24edc476ac18
child 17869 9610c6c94e71
permissions -rw-r--r--
Recommited from itself

"
 COPYRIGHT (c) 2006 by eXept Software AG
	      All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"
"{ Package: 'stx:libbasic' }"

ExternalBytes subclass:#ExternalStructure
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'System-Support'
!

ExternalStructure class instanceVariableNames:'cType'

"
 No other class instance variables are inherited by this class.
"
!

!ExternalStructure class methodsFor:'documentation'!

copyright
"
 COPYRIGHT (c) 2006 by eXept Software AG
	      All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"
!

documentation
"
    Instances of this class represent external (non-Smalltalk) data,
    typically C-structs or C++ instances.
    They are only useful to represent handles as returned by C functions as smalltalk objects.

    ExternallStructures are much like ExternalBytes - however, the latter
    allow you to access bytes via indexed at:/at:put: messages, whilst instances of subclasses of me
    allow access via the corresponding getter/setter methods of my C-type.

    [author:]
	Claus Gittinger

    [see also:]
	ExternalBytes ExternalAddress
	( how to write primitive code :html: programming/primitive.html )
"
! !

!ExternalStructure class methodsFor:'instance creation'!

fromExternalAddress:anExternalAddress
    ^ self new fromExternalAddress:anExternalAddress
! !

!ExternalStructure class methodsFor:'queries'!

cType
    ^ cType
! !

!ExternalStructure methodsFor:'private'!

fromExternalAddress:anExternalAddress
    self setAddress:(anExternalAddress address) size:(anExternalAddress size).
! !

!ExternalStructure class methodsFor:'documentation'!

version
    ^ '$Id: ExternalStructure.st 10695 2011-09-28 19:07:49Z vranyj1 $'
!

version_SVN
    ^ '$Id: ExternalStructure.st 10695 2011-09-28 19:07:49Z vranyj1 $'
! !