Span<T>

Overview

Span is a writable span (block of memory that could be an array or pointer) of a given size.

Location

 

constructor

Default constructor.

 

constructor

 

Span<T>()

 

init()

 

Span<T>()

Data

Returns the data at a given offset.

 

property Data[i: Int32]: T read write;

 

T Data[Int32 i] { get; set; }

 

subscript Data(_ i: Int32) -> T { get{} set{} }

 

T Data[Int32 i] { __get; __set; }

Empty

Returns true if empty (count = 0).

 

property Empty: Boolean read;

 

Boolean Empty { get; }

 

var Empty: Boolean { get{} }

 

Boolean Empty { __get; }

Empty

Returns an empty span object.

 

class property Empty: Span<T> read;

 

class Span<T> Empty { get; }

 

static var Empty: Span<T> { get{} }

 

class Span<T> Empty { __get; }

Equals  virtual    (declared in Object)

Returns true if the target object matches this one, by default compares the reference.

 

method Equals(obj: Object): Boolean

 

Boolean Equals(Object obj)

 

func Equals(_ obj: Object) -> Boolean

 

Boolean Equals(Object obj)

Parameters:

  • obj: the reference to compare this with.

Finalize  protected virtual    (declared in Object)

Finalizer implementation. If not overriden it's not called at all, the runtime checks if there is an override before calling a finalizer.

 

method Finalize

 

void Finalize()

 

func Finalize()

 

void Finalize()

GetHashCode  virtual    (declared in Object)

Returns a hashcode for this object. Overriden implementations should make sure that the number returned here is constant given the same object.

 

method GetHashCode: Int32

 

Int32 GetHashCode()

 

func GetHashCode() -> Int32

 

Int32 GetHashCode()

GetType    (declared in Object)

Returns the actual type of this class

 

method GetType: Type

 

Type GetType()

 

func GetType() -> Type

 

Type GetType()

Length

Contains the length of this span.

 

property Length: Int32 read;

 

Int32 Length { get; }

 

var Length: Int32 { get{} }

 

Int32 Length { __get; }

Pointer

Returns a pointer to the first element.

 

property Pointer: ^T read;

 

T* Pointer { get; }

 

var Pointer: UnsafeMutablePointer<T> { get{} }

 

T* Pointer { __get; }

ReferenceEquals    (declared in Object)

Compares two references for equivalence (even if they have an equals operator)

 

class method ReferenceEquals(a: Object; b: Object): Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

 

static func ReferenceEquals(_ a: Object, _ b: Object) -> Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

Parameters:

  • a: left value
  • b: right value

Slice (Int32): Span<T>

Slice this span. Slicing can only shrink, not grow the span.

 

method Slice(aStart: Int32): Span<T>

 

Span<T> Slice(Int32 aStart)

 

func Slice(_ aStart: Int32) -> Span<T>

 

Span<T> Slice(Int32 aStart)

Parameters:

  • aStart:

Slice (Int32, Int32): Span<T>

Slice this span. Slicing can only shrink, not grow the span.

 

method Slice(aStart: Int32; aLength: Int32): Span<T>

 

Span<T> Slice(Int32 aStart, Int32 aLength)

 

func Slice(_ aStart: Int32, _ aLength: Int32) -> Span<T>

 

Span<T> Slice(Int32 aStart, Int32 aLength)

Parameters:

  • aStart:
  • aLength:

ToString  virtual    (declared in Object)

Gets the string representation of this method.

 

method ToString: String

 

String ToString()

 

func ToString() -> String

 

String ToString()

 

Data

Returns the data at a given offset.

 

property Data[i: Int32]: T read write;

 

T Data[Int32 i] { get; set; }

 

subscript Data(_ i: Int32) -> T { get{} set{} }

 

T Data[Int32 i] { __get; __set; }

Empty

Returns true if empty (count = 0).

 

property Empty: Boolean read;

 

Boolean Empty { get; }

 

var Empty: Boolean { get{} }

 

Boolean Empty { __get; }

Length

Contains the length of this span.

 

property Length: Int32 read;

 

Int32 Length { get; }

 

var Length: Int32 { get{} }

 

Int32 Length { __get; }

Pointer

Returns a pointer to the first element.

 

property Pointer: ^T read;

 

T* Pointer { get; }

 

var Pointer: UnsafeMutablePointer<T> { get{} }

 

T* Pointer { __get; }

Empty

Returns an empty span object.

 

class property Empty: Span<T> read;

 

class Span<T> Empty { get; }

 

static var Empty: Span<T> { get{} }

 

class Span<T> Empty { __get; }

 

ReferenceEquals    (declared in Object)

Compares two references for equivalence (even if they have an equals operator)

 

class method ReferenceEquals(a: Object; b: Object): Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

 

static func ReferenceEquals(_ a: Object, _ b: Object) -> Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

Parameters:

  • a: left value
  • b: right value

 

constructor

Default constructor.

 

constructor

 

Span<T>()

 

init()

 

Span<T>()

Equals  virtual    (declared in Object)

Returns true if the target object matches this one, by default compares the reference.

 

method Equals(obj: Object): Boolean

 

Boolean Equals(Object obj)

 

func Equals(_ obj: Object) -> Boolean

 

Boolean Equals(Object obj)

Parameters:

  • obj: the reference to compare this with.

Finalize  protected virtual    (declared in Object)

Finalizer implementation. If not overriden it's not called at all, the runtime checks if there is an override before calling a finalizer.

 

method Finalize

 

void Finalize()

 

func Finalize()

 

void Finalize()

GetHashCode  virtual    (declared in Object)

Returns a hashcode for this object. Overriden implementations should make sure that the number returned here is constant given the same object.

 

method GetHashCode: Int32

 

Int32 GetHashCode()

 

func GetHashCode() -> Int32

 

Int32 GetHashCode()

GetType    (declared in Object)

Returns the actual type of this class

 

method GetType: Type

 

Type GetType()

 

func GetType() -> Type

 

Type GetType()

Slice (Int32): Span<T>

Slice this span. Slicing can only shrink, not grow the span.

 

method Slice(aStart: Int32): Span<T>

 

Span<T> Slice(Int32 aStart)

 

func Slice(_ aStart: Int32) -> Span<T>

 

Span<T> Slice(Int32 aStart)

Parameters:

  • aStart:

Slice (Int32, Int32): Span<T>

Slice this span. Slicing can only shrink, not grow the span.

 

method Slice(aStart: Int32; aLength: Int32): Span<T>

 

Span<T> Slice(Int32 aStart, Int32 aLength)

 

func Slice(_ aStart: Int32, _ aLength: Int32) -> Span<T>

 

Span<T> Slice(Int32 aStart, Int32 aLength)

Parameters:

  • aStart:
  • aLength:

ToString  virtual    (declared in Object)

Gets the string representation of this method.

 

method ToString: String

 

String ToString()

 

func ToString() -> String

 

String ToString()