Squeak Class Documentation category index | class index  
 
ExternalData
  category: FFI-Kernel
  superclass: ExternalStructure
  subclasses:

Instances of ExternalData explicitly describe objects with associated type. They can be used for describing atomic C types like arrays of atomic types (e.g., 'int[]') or pointer to atomic types (e.g., 'int *').

Instance variables:
type <Integer | Behavior> The basic type of the receiver.

The encoding of type is equivalent to that of the basic type in class ExternalType. The interpretation of whether the receiver describes an array of data or a pointer to data depends on the contents of the instance variable 'handle'. If handle contains an ExternalAddress the receiver is treated as pointer to type. If the handle contains a ByteArray the receiver is interpreted as describing an array of type. Note that both interpretations are treated equivalent in external calls, e.g., if one describes an argument to an external call as taking 'int*' then, depending on the type of handle either the actual contents (if ExternalAddress) or a pointer to the contents (if ByteArray) is passed.

instance methods
  conversion
  fromCString

  private
  setHandle:type:

class methods
  field definition
  fields

  instance creation
  fromHandle:type:
new

instance methods
  conversion top  
 

fromCString

Assume that the receiver represents a C string and convert it to a Smalltalk string. hg 2/25/2000 14:18


  private top  
 

setHandle:type:


class methods
  field definition top  
 

fields

ExternalData defineFields


  instance creation top  
 

fromHandle:type:

Create a pointer to the given type


 

new

You better not...