Back: ByteStream-basic
Up: Class reference
Forward: CAggregate class-accessing
 
Top: GNU Smalltalk User's Guide
Contents: Table of Contents
Index: Class index
About: About this document

6.15 CAggregate

Defined in namespace Smalltalk
Category: Language-C interface

6.15.1 CAggregate class: accessing  (class)
6.15.2 CAggregate: accessing  (instance)


6.15.1 CAggregate class: accessing

alignof
Answer the receiver's instances required aligment

sizeof
Answer the receiver's instances size


6.15.2 CAggregate: accessing

+ anInteger
Return another instance of the receiver's class which points at &receiver[anInteger] (or, if you prefer, what `receiver + anInteger' does in C).

- intOrPtr
If intOrPtr is an integer, return another instance of the receiver's class pointing at &receiver[-anInteger] (or, if you prefer, what `receiver - anInteger' does in C). If it is the same class as the receiver, return the difference in chars, i.e. in bytes, between the two pointed addresses (or, if you prefer, what `receiver - anotherCharPtr' does in C)

addressAt: anIndex
Access the array, returning a new Smalltalk CObject of the element type, corresponding to the given indexed element of the array. anIndex is zero-based, just like with all other C-style accessing.

decr
Adjust the pointer by sizeof(elementType) bytes down (i.e. --receiver)

decrBy: anInteger
Adjust the pointer by anInteger elements down (i.e. receiver -= anInteger)

deref
Access the object, returning a new Smalltalk object of the element type, corresponding to the dereferenced pointer or to the first element of the array.

deref: aValue
Modify the object, storing the object of the element type into the pointed address or in the first element of the array.

derefAt: anIndex
Access the array, returning a new Smalltalk object of the element type, corresponding to the given indexed element of the array. anIndex is zero-based, just like with all other C-style accessing.

derefAt: anIndex put: aValue
Store in the array the passed Smalltalk object `aValue', which should be of the element type, corresponding to the given indexed element. anIndex is zero-based, just like with all other C-style accessing.

incr
Adjust the pointer by sizeof(elementType) bytes up (i.e. ++receiver)

incrBy: anInteger
Adjust the pointer by anInteger elements up (i.e. receiver += anInteger)

value
Answer the address of the beginning of the data pointed to by the receiver.

value: aValue
Set the address of the beginning of the data pointed to by the receiver.




This document was generated on May, 12 2002 using texi2html