Back: CChar-conversion Up: Base classes Forward: CCompound class-instance creation   Top: GNU Smalltalk Library Reference Contents: Table of Contents Index: Class index About: About this document

1.23 CCompound

Defined in namespace Smalltalk
Superclass: CObject
Category: Language-C interface

1.23.1 CCompound class: instance creation  (class)
1.23.2 CCompound class: subclass creation  (class)
1.23.3 CCompound: debugging  (instance)


1.23.1 CCompound class: instance creation

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

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


1.23.2 CCompound class: subclass creation

alignof
Answer 1, the alignment of an empty struct

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

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

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

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


1.23.3 CCompound: debugging

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

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



Back: CCompound class-subclass creation Up: CCompound Forward: CDouble   Top: GNU Smalltalk Library Reference Contents: Table of Contents Index: Class index About: About this document


This document was generated on February, 22 2012 using texi2html