Squeak Class Documentation category index | class index  
 
ExternalStructure
  category: FFI-Kernel
  superclass: ExternalObject
  subclasses: ExternalData FFITestPoint2 FFITestPoint4 MacPixPatPtr MacPoint MacRGBColor MacRect Win32Handle Win32Point X11Display X11Drawable X11GC Win32Rectangle

This class provides an abstract base for all structures that can be used by external functions. ExternalStructures have two possible handle types:
- ExternalAddress
If the handle is an external address then the object described does not reside in the Smalltalk object memory.
- ByteArray
If the handle is a byte array then the object described resides in Smalltalk memory.
Useful methods should be implemented by subclasses of ExternalStructure using the common ByteArray/ExternalAddress platform dependent access protocol which will transparently access the correct memory location.

instance methods
  initialize-release
  free

  inspecting
  inspect

  printing
  longPrintOn:

class methods
  class management
  doneCompiling
fileOutInitializerOn:
fileOutOn:moveSource:toFile:initializing:
obsolete
rename:

  converting
  externalType

  field definition
  byteSize
compileAlias:withAccessors:
compileAllFields
compileFields
compileFields:
compileFields:withAccessors:
compiledSpec
defineAliasAccessorsFor:type:
defineFieldAccessorsFor:startingAt:type:
defineFields
defineFields:
fields

  instance creation
  externalNew
fromHandle:
new

instance methods
  initialize-release top  
 

free

Free the handle pointed to by the receiver


  inspecting top  
 

inspect

Open an ExternalStructureInspector on the receiver. Use basicInspect to get a normal (less useful) type of inspector.


  printing top  
 

longPrintOn:

Append to the argument, aStream, the names and values of all the record's variables.


class methods
  class management top  
 

doneCompiling

I have been recompiled. Update any types that reference me.


 

fileOutInitializerOn:


 

fileOutOn:moveSource:toFile:initializing:

File a description of the receiver on aFileStream. If the boolean argument,
moveSource, is true, then set the trailing bytes to the position of aFileStream and
to fileIndex in order to indicate where to find the source code.


 

obsolete

The receiver is becoming obsolete.
NOTE: You if you remove the whole class category at once, you cannot
assume that the ExternalType class is still present.


 

rename:

The new name of the receiver is the argument, aString.


  converting top  
 

externalType

Return an external type describing the receiver as a structure


  field definition top  
 

byteSize

Return the size in bytes of this structure.


 

compileAlias:withAccessors:

Define all the fields in the receiver.
Return the newly compiled spec.


 

compileAllFields

ExternalStructure compileAllFields


 

compileFields

Compile the field definition of the receiver.
Return the newly compiled spec.


 

compileFields:

Compile the field definition of the receiver.
Return the newly compiled spec.


 

compileFields:withAccessors:

Define all the fields in the receiver.
Return the newly compiled spec.


 

compiledSpec

Return the compiled spec of the receiver


 

defineAliasAccessorsFor:type:

Define read/write accessors for the given field


 

defineFieldAccessorsFor:startingAt:type:

Define read/write accessors for the given field


 

defineFields

Define all the fields in the receiver


 

defineFields:

Define all the fields in the receiver


 

fields

Return the fields defining the receiver


  instance creation top  
 

externalNew

Create an instance of the receiver on the external heap


 

fromHandle:


 

new

Answer a new instance of the receiver (which is a class) with no indexable variables. Fail if the class is indexable.