Navigation:  Programming Cookbook > External Interfacing >

External Structures

Previous pageReturn to chapter overviewNext page

All native Smalltalk objects have one of three regular formats:

1.They contain bytes, accessible by index only; or
2.They contain references to other objects (object pointers), accessible by index and/or name; or
3.They have an "immediate" representation, whereby their value is encoded in their identity (their object pointer).

The outside world is not so simple - data structures are normally a mish-mash of different data types, packed together into C structs, or C++ classes, or whatever. There is no direct support in standard Smalltalk syntax for accessing the fields of structures which are different data types, and indeed this is somewhat contrary to the Smalltalk "everything is an object" concept. The purpose of the external structure support in Dolphin is to allow one to represent free format data structures, and provide means of getting (creating objects out of) and setting (putting objects into) the fields of such data structures.