ExternalStructure.st
author Claus Gittinger <cg@exept.de>
Wed, 22 Oct 2008 00:20:59 +0200
changeset 11261 e8dcdce0b2ae
parent 9387 8784e3906d25
child 14725 76d8dc9a4dc6
child 17711 39faaaf888b4
permissions -rw-r--r--
changed #classMenuCompareTwoRepositoryVersions

"
 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
    ^ '$Header: /cvs/stx/stx/libbasic/ExternalStructure.st,v 1.3 2006-06-20 15:27:17 ca Exp $'
! !