Back: CChar-accessing
Up: Class reference
Forward: CCompound class-instance creation
 
Top: GNU Smalltalk User's Guide
Contents: Table of Contents
Index: Class index
About: About this document

6.21 CCompound

Defined in namespace Smalltalk
Category: Language-C interface

6.21.1 CCompound class: instance creation  (class)
6.21.2 CCompound class: subclass creation  (class)
6.21.3 CCompound: instance creation  (instance)


6.21.1 CCompound class: instance creation

new
Allocate a new instance of the receiver. To free the memory after GC, remember to call #addToBeFinalized.

type
Answer a CType for the receiver


6.21.2 CCompound class: subclass creation

alignof
Answer 1, the alignment of an empty struct

compileDeclaration: array
This method's functionality should be implemented by subclasses of CCompound

compileDeclaration: array inject: startOffset into: aBlock
Compile methods that implement the declaration in array. To compute the offset after each field, the value of the old offset plus the new field's size is passed to aBlock, together with the new field's alignment requirements.

compileSize: size align: alignment
Private - Compile sizeof and alignof methods

computeAggregateType: type block: aBlock
Private - Called by computeTypeString:block: for pointers/arrays. Format of type: (array int 3) or (ptr FooStruct)

computeArrayType: type block: aBlock
Private - Called by computeAggregateType:block: for arrays

computePtrType: type block: aBlock
Private - Called by computeAggregateType:block: for pointers

computeTypeString: type block: aBlock
Private - Pass the size, alignment, and description of CType for aBlock, given the field description in `type' (the second element of each pair).

emitInspectTo: str for: name
Private - Emit onto the given stream the code for adding the given selector to the CCompound's inspector.

initialize
Initialize the receiver's TypeMap

newStruct: structName declaration: array
The old way to create a CStruct. Superseded by #subclass:declaration:...

sizeof
Answer 0, the size of an empty struct

subclass: structName declaration: array
classVariableNames: cvn poolDictionaries: pd category: category Create a new class with the given name that contains code to implement the given C struct. All the parameters except `array' are the same as for a standard class creation message; see documentation for more information


6.21.3 CCompound: instance creation

inspect
Inspect the contents of the receiver

inspectSelectorList
Answer a list of selectors whose return values should be inspected by #inspect.




This document was generated on May, 12 2002 using texi2html