Constructor

new(ptr:Pointer<T>, length:Int64)

Variables

finalptr:Pointer<T>

Methods

clear():Void

Sets all items in the current view to their default value.

compare(other:View<T>):Int

Returns 0 if the contents of the two views are identical.

Returns a negative value if the length of this view is less than the length of other, or a positive value if the length of this view is greater than the length of other.

In case of equal lengths, returns a negative value if the first different value in other is greater than the corresponding value in this view. Otherwise, returns a positive value.

copyTo(destination:View<T>):Void

Copies the the from the current view to the destination view. If the destination is smaller than the current view this function raises an exception and no data is written to the destination.

Parameters:

destination

Target of the copy operation

fill(value:T):Void

Sets all items in the current view to the specified value.

Parameters:

value

The value assigned to each item in the view.

isEmpty():Bool

Returns if the current view is empty.

reinterpret<K>():View<K>

Return a view interpreting this views content as a different type.

slice(start:Int64):View<T>

slice(start:Int64, length:Int64):View<T>

Create a slice of the current view which starts at the specified index.

Parameters:

start

Zero based index to start the slice at.

tryCopyTo(destination:View<T>):Bool

Attempts to copy the data from the current view to the destination view. If the destination is smaller than the current view this function returns false and no data is written to the destination.

Parameters:

destination

Target of the copy operation.