TBank: Methods Functions  


Methods

BufGet a bank's memory pointer
LockLock a bank's memory block
UnlockUnlock a bank's memory pointer
SizeGet a bank's size
CapacityGet capacity of bank
ResizeResize a bank
ReadRead bytes from a stream into a bank
WriteWrite bytes in a bank to a stream
PeekBytePeek a byte from a bank
PokeBytePoke a byte into a bank
PeekShortPeek a short from a bank
PokeShortPoke a short into a bank
PeekIntPeek an int from a bank
PokeIntPoke an int into a bank
PeekLongPeek a long from a bank
PokeLongPoke a long value into a bank
PeekFloatPeek a float from a bank
PokeFloatPoke a float value into a bank
PeekDoublePeek a double from a bank
PokeDoublePoke a double value into a bank
SaveSave a bank to a stream

Functions

LoadLoad a bank from a stream
CreateCreate a bank
CreateStaticCreate a bank from an existing block of memory

Method reference

Method Buf:Byte Ptr()
ReturnsA byte pointer to the memory block controlled by the bank
DescriptionGet a bank's memory pointer
Information Please use Lock and Unlock instead of this method.

Method Lock:Byte Ptr()
ReturnsA byte pointer to the memory block controlled by the bank
DescriptionLock a bank's memory block
Information While locked, a bank cannot be resized.

After you have finished with a bank's memory block, you must use Unlock to return it to the bank.

Method Unlock()
DescriptionUnlock a bank's memory pointer
Information After you have finished with a bank's memory block, you must use Unlock to return it to the bank.

Method Size()
ReturnsThe size, in bytes, of the memory block controlled by the bank
DescriptionGet a bank's size

Method Capacity()
ReturnsThe capacity, in bytes, of the bank's internal memory buffer
DescriptionGet capacity of bank

Method Resize( size )
DescriptionResize a bank

Method Read( stream:TStream,offset,count )
DescriptionRead bytes from a stream into a bank

Method Write( stream:TStream,offset,count )
DescriptionWrite bytes in a bank to a stream

Method PeekByte( offset )
ReturnsThe byte value at the specified byte offset within the bank
DescriptionPeek a byte from a bank

Method PokeByte( offset,value )
DescriptionPoke a byte into a bank

Method PeekShort( offset )
ReturnsThe short value at the specified byte offset within the bank
DescriptionPeek a short from a bank

Method PokeShort( offset,value )
DescriptionPoke a short into a bank

Method PeekInt( offset )
ReturnsThe int value at the specified byte offset within the bank
DescriptionPeek an int from a bank

Method PokeInt( offset,value )
DescriptionPoke an int into a bank

Method PeekLong:Long( offset )
ReturnsThe long value at the specified byte offset within the bank
DescriptionPeek a long from a bank

Method PokeLong( offset,value:Long )
DescriptionPoke a long value into a bank

Method PeekFloat#( offset )
ReturnsThe float value at the specified byte offset within the bank
DescriptionPeek a float from a bank

Method PokeFloat( offset,value# )
DescriptionPoke a float value into a bank

Method PeekDouble!( offset )
ReturnsThe double value at the specified byte offset within the bank
DescriptionPeek a double from a bank

Method PokeDouble( offset,value! )
DescriptionPoke a double value into a bank

Method Save( url:Object )
DescriptionSave a bank to a stream
Information Return True if successful, otherwise False.

Function reference

Function Load:TBank( url:Object )
ReturnsA new TBank object
DescriptionLoad a bank from a stream
Information Returns a new TBank object if successfull, otherwise Null.

Function Create:TBank( size )
ReturnsA new TBank object with an initial size of size
DescriptionCreate a bank

Function CreateStatic:TBank( buf:Byte Ptr,size )
DescriptionCreate a bank from an existing block of memory