Class MappedArray<TMapped, T>
A mapped huge array wrapping another array.
Implements
System.IDisposable
System.Collections.Generic.IEnumerable<TMapped>
System.Collections.IEnumerable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Mars.Common.IO.Mapped.Arrays
Assembly: Mars.IO.dll
Syntax
public class MappedArray<TMapped, T> : ArrayBase<TMapped>, IDisposable, ISerializableToStream, IEnumerable<TMapped>, IEnumerable where TMapped : struct where T : struct
Type Parameters
Name | Description |
---|---|
TMapped | The more 'advanced' stucture. |
T | The 'simple' structure. |
Remarks
Used to map a more generic class or type to a more simple type like ints or floats.
Constructors
| Improve this Doc View SourceMappedArray(ArrayBase<T>, Int32, MappedArray<TMapped, T>.MapTo, MappedArray<TMapped, T>.MapFrom)
Creates a new mapped huge array.
Declaration
public MappedArray(ArrayBase<T> baseArray, int elementSize, MappedArray<TMapped, T>.MapTo mapTo, MappedArray<TMapped, T>.MapFrom mapFrom)
Parameters
Type | Name | Description |
---|---|---|
ArrayBase<T> | baseArray | The base array. |
System.Int32 | elementSize | The size of one mapped structure when translate to the simpler structure. |
MappedArray.MapTo<> | mapTo | The map to implementation. |
MappedArray.MapFrom<> | mapFrom | The map from implementation. |
Remarks
Used to map a more generic class or type to a more simple type like ints or floats.
Properties
| Improve this Doc View SourceCanResize
Returns true if this array can resize.
Declaration
public override bool CanResize { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
Mars.Common.IO.Mapped.Arrays.ArrayBase<TMapped>.CanResize
Remarks
Used to map a more generic class or type to a more simple type like ints or floats.
|
Improve this Doc
View Source
Item[Int64]
Returns the element at the given index.
Declaration
public override TMapped this[long idx] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | idx |
Property Value
Type | Description |
---|---|
TMapped |
Overrides
Mars.Common.IO.Mapped.Arrays.ArrayBase<TMapped>.Item[System.Int64]
Remarks
Used to map a more generic class or type to a more simple type like ints or floats.
|
Improve this Doc
View Source
Length
Returns the length of this array.
Declaration
public override long Length { get; }
Property Value
Type | Description |
---|---|
System.Int64 |
Overrides
Mars.Common.IO.Mapped.Arrays.ArrayBase<TMapped>.Length
Remarks
Used to map a more generic class or type to a more simple type like ints or floats.
Methods
| Improve this Doc View SourceDispose()
Disposes of all native resources associated with this object.
Declaration
public override void Dispose()
Overrides
Mars.Common.IO.Mapped.Arrays.ArrayBase<TMapped>.Dispose()
Remarks
Used to map a more generic class or type to a more simple type like ints or floats.
|
Improve this Doc
View Source
Resize(Int64)
Resizes this array.
Declaration
public override void Resize(long size)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | size |
Overrides
Mars.Common.IO.Mapped.Arrays.ArrayBase<TMapped>.Resize(System.Int64)
Remarks
Used to map a more generic class or type to a more simple type like ints or floats.
Implements
System.IDisposable
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable