ObjectPointer protocols
Class methods: initialization
defaultItemType
Answer the default item type for new instances of the receiver. When not specified, instances of the receiver point to items of this class.
defaultItemType: anOSObjectSubclass
Set the default item type for new instances of the receiver. When not specified, instances of the receiver point to items of this class.
Class methods: instance creation
address: addressInteger itemType: anOSObjectSubclass
Answer a new instance of the receiver with indirection level 2, initialized to reference the operating system pointer to a data element described by anOSObjectSubclass, at an address equal to addressInteger.
address: addressInteger itemType: anOSObjectSubclass indirectionLevel: indirectionLevel
Answer a new instance of the receiver with the specified indirection level, initialized to reference the operating system pointer, at an address equal to addressInteger.
calloc: anInteger itemType: anOSObjectSubclass
Allocate operating system memory large enough to contain anInteger operating system pointers. Answer a new instance of the receiver with indirection level 2, initialized to reference the operating system pointer to a data element described by anOSObjectSubclass, in the allocated operating system memory.
calloc: anInteger itemType: anOSObjectSubclass indirectionLevel: indirectionLevel
Allocate operating system memory large enough to contain anInteger operating system pointers. Answer a new instance of the receiver with the specified indirection level, initialized to reference the operating system pointer, in the allocated operating system memory.
itemType: anOSObjectSubclass
Allocate Smalltalk memory large enough to contain one operating system pointer. Answer a new instance of the receiver with indirection level 2, initialized to reference the operating system pointer to a data element described by the default item type, in the allocated operating system memory.
itemType: anOSObjectSubclass indirectionLevel: indirectionLevel
Allocate Smalltalk memory large enough to contain one operating system pointer. Answer a new instance of the receiver with the specified indirection level, initialized to reference the operating system pointer to a data element described by the default item type, in the allocated operating system memory.
new: anInteger itemType: anOSObjectSubclass
Allocate Smalltalk memory large enough to contain anInteger operating system pointers. Answer a new instance of the receiver with indirection level 2, initialized to reference the operating system pointer to a data element described by anOSObjectSubclass.
new: anInteger itemType: anOSObjectSubclass indirectionLevel: indirectionLevel
Allocate operating system memory large enough to contain anInteger operating system pointers. Answer a new instance of the receiver with the specified indirection level, initialized to reference the operating system pointer to a data element described by anOSObjectSubclass.
reference: aByteObject itemType: anOSObjectSubclass
Answer a new instance of the receiver with indirection level 2, initialized to reference aByteObject that contains operating system pointers to data elements described by anOSObjectSubclass.
reference: addressInteger itemType: anOSObjectSubclass indirectionLevel: indirectionLevel
Answer a new instance of the receiver with the specified indirection level, initialized to reference aByteObject that contains operating system pointers to data elements described by anOSObjectSubclass.
Instance methods: accessing
at: anInteger
Answer the data element at index anInteger from the data element referenced by the receiver. Indexing is done in terms of operating system pointers, not bytes. If the receiver's indirection level is 2, the value must be an instance of the receiver's itemType with indirection level 1. If the receiver's indirection level is greater than 2, the value must be an instance of the receiver, with indirection one less than the receiver, and having the same itemType.
at: anInteger put: anOSObject
Set the data element at index anInteger in the data element referenced by the receiver. Indexing is done in terms of operating system pointers, not bytes. If the receiver's indirection level is 2, the value must be an instance of the receiver's itemType with indirection level 1. If the receiver's indirection level is greater than 2, the value must be an instance of the receiver, with indirection one less than the receiver, and having the same itemType.
indirectionLevel
Answer the receiver's indirection level. The indirection level is defined as the number of pointer dereferences required to reach the data element described by the receiver.
itemType
Answer an instance of the receiver with indirection level 2, initialized to reference aByteObject that contains operating system pointers to data elements described by anOSObjectSubclass.
Last modified date: 01/29/2015