Category: Language-C interface
Superclass: CObject

Method category index

instance creation (class)
subclass creation (class)
debugging (instance)

instance creation (class)

Allocate a new instance of the receiver, backed by garbage-collected storage.


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


subclass creation (class)

Answer 1, the alignment of an empty struct


Return the pragmas that are written in the file-out of this class.

compileSize: size align: alignment

Private - Compile sizeof and alignof methods


Return the description of the fields in the receiver class.

declaration: array

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

declaration: 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.

emitFieldNameTo: str for: name

Private - Emit onto the given stream the code for adding the given selector to the CCompound's #examineOn: method.

newStruct: structName declaration: array

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


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


debugging (instance)

examineOn: aStream
Print the contents of the receiver's fields on aStream


Answer a list of selectors whose return values should be printed by #examineOn:.