Class MemoryMap
Represents a memory mapped file.
Inheritance
System.Object
MemoryMap
Implements
System.IDisposable
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()
Assembly: Mars.IO.dll
Syntax
public abstract class MemoryMap : IDisposable
Constructors
|
Improve this Doc
View Source
MemoryMap()
Creates a new memory mapped file.
Declaration
Methods
|
Improve this Doc
View Source
CreateByte(Int64)
Creates a new empty memory mapped accessor with given size in bytes.
Declaration
public MappedAccessor<byte> CreateByte(long sizeInElements)
Parameters
Type |
Name |
Description |
System.Int64 |
sizeInElements |
|
Returns
|
Improve this Doc
View Source
CreateDouble(Int64)
Creates a new empty memory mapped accessor with given size in bytes.
Declaration
public MappedAccessor<double> CreateDouble(long sizeInElements)
Parameters
Type |
Name |
Description |
System.Int64 |
sizeInElements |
|
Returns
|
Improve this Doc
View Source
CreateInt16(Int64)
Creates a new empty memory mapped accessor with given size in bytes.
Declaration
public MappedAccessor<short> CreateInt16(long sizeInElements)
Parameters
Type |
Name |
Description |
System.Int64 |
sizeInElements |
|
Returns
|
Improve this Doc
View Source
CreateInt32(Int64)
Creates a new empty memory mapped accessor with given size in bytes.
Declaration
public MappedAccessor<int> CreateInt32(long sizeInElements)
Parameters
Type |
Name |
Description |
System.Int64 |
sizeInElements |
|
Returns
|
Improve this Doc
View Source
CreateInt64(Int64)
Creates a new empty memory mapped accessor with given size in bytes.
Declaration
public MappedAccessor<long> CreateInt64(long sizeInElements)
Parameters
Type |
Name |
Description |
System.Int64 |
sizeInElements |
|
Returns
|
Improve this Doc
View Source
CreateSingle(Int64)
Creates a new empty memory mapped accessor with given size in bytes.
Declaration
public MappedAccessor<float> CreateSingle(long sizeInElements)
Parameters
Type |
Name |
Description |
System.Int64 |
sizeInElements |
|
Returns
|
Improve this Doc
View Source
CreateUInt16(Int64)
Creates a new empty memory mapped accessor with given size in bytes.
Declaration
public MappedAccessor<ushort> CreateUInt16(long sizeInElements)
Parameters
Type |
Name |
Description |
System.Int64 |
sizeInElements |
|
Returns
|
Improve this Doc
View Source
CreateUInt32(Int64)
Creates a new empty memory mapped accessor with given size in bytes.
Declaration
public MappedAccessor<uint> CreateUInt32(long sizeInElements)
Parameters
Type |
Name |
Description |
System.Int64 |
sizeInElements |
|
Returns
|
Improve this Doc
View Source
CreateUInt64(Int64)
Creates a new empty memory mapped accessor with given size in bytes.
Declaration
public MappedAccessor<ulong> CreateUInt64(long sizeInElements)
Parameters
Type |
Name |
Description |
System.Int64 |
sizeInElements |
|
Returns
|
Improve this Doc
View Source
CreateVariable<T>(Int64, MemoryMap.ReadFromDelegate<T>, MemoryMap.WriteToDelegate<T>)
Creates a new empty memory mapped accessor with given size in bytes.
Declaration
public MappedAccessor<T> CreateVariable<T>(long sizeInBytes, MemoryMap.ReadFromDelegate<T> readFrom, MemoryMap.WriteToDelegate<T> writeTo)
Parameters
Returns
Type Parameters
|
Improve this Doc
View Source
CreateVariableInt32Array(Int64)
Creates an accessor for and array of int's.
Declaration
public MappedAccessor<int[]> CreateVariableInt32Array(long sizeInBytes)
Parameters
Type |
Name |
Description |
System.Int64 |
sizeInBytes |
|
Returns
|
Improve this Doc
View Source
CreateVariableString(Int64)
Creates an accessor for strings.
Declaration
public MappedAccessor<string> CreateVariableString(long sizeInBytes)
Parameters
Type |
Name |
Description |
System.Int64 |
sizeInBytes |
|
Returns
|
Improve this Doc
View Source
CreateVariableUInt32Array(Int64)
Creates an accessor for and array of uint's.
Declaration
public MappedAccessor<uint[]> CreateVariableUInt32Array(long sizeInBytes)
Parameters
Type |
Name |
Description |
System.Int64 |
sizeInBytes |
|
Returns
|
Improve this Doc
View Source
Dispose()
Disposes of all resources associated with this files.
Declaration
public virtual void Dispose()
|
Improve this Doc
View Source
DoCreateNewByte(Int64, Int64)
Creates a new memory mapped file based on the given stream and the given size in bytes.
Declaration
protected abstract MappedAccessor<byte> DoCreateNewByte(long position, long sizeInByte)
Parameters
Type |
Name |
Description |
System.Int64 |
position |
|
System.Int64 |
sizeInByte |
|
Returns
|
Improve this Doc
View Source
DoCreateNewDouble(Int64, Int64)
Creates a new memory mapped file based on the given stream and the given size in bytes.
Declaration
protected abstract MappedAccessor<double> DoCreateNewDouble(long position, long sizeInByte)
Parameters
Type |
Name |
Description |
System.Int64 |
position |
|
System.Int64 |
sizeInByte |
|
Returns
|
Improve this Doc
View Source
DoCreateNewInt16(Int64, Int64)
Creates a new memory mapped file based on the given stream and the given size in bytes.
Declaration
protected abstract MappedAccessor<short> DoCreateNewInt16(long position, long sizeInByte)
Parameters
Type |
Name |
Description |
System.Int64 |
position |
|
System.Int64 |
sizeInByte |
|
Returns
|
Improve this Doc
View Source
DoCreateNewInt32(Int64, Int64)
Creates a new memory mapped file based on the given stream and the given size in bytes.
Declaration
protected abstract MappedAccessor<int> DoCreateNewInt32(long position, long sizeInByte)
Parameters
Type |
Name |
Description |
System.Int64 |
position |
|
System.Int64 |
sizeInByte |
|
Returns
|
Improve this Doc
View Source
DoCreateNewInt64(Int64, Int64)
Creates a new memory mapped file based on the given stream and the given size in bytes.
Declaration
protected abstract MappedAccessor<long> DoCreateNewInt64(long position, long sizeInByte)
Parameters
Type |
Name |
Description |
System.Int64 |
position |
The position to start at. |
System.Int64 |
sizeInByte |
The size. |
Returns
|
Improve this Doc
View Source
DoCreateNewSingle(Int64, Int64)
Creates a new memory mapped file based on the given stream and the given size in bytes.
Declaration
protected abstract MappedAccessor<float> DoCreateNewSingle(long position, long sizeInByte)
Parameters
Type |
Name |
Description |
System.Int64 |
position |
|
System.Int64 |
sizeInByte |
|
Returns
|
Improve this Doc
View Source
DoCreateNewUInt16(Int64, Int64)
Creates a new memory mapped file based on the given stream and the given size in bytes.
Declaration
protected abstract MappedAccessor<ushort> DoCreateNewUInt16(long position, long sizeInByte)
Parameters
Type |
Name |
Description |
System.Int64 |
position |
|
System.Int64 |
sizeInByte |
|
Returns
|
Improve this Doc
View Source
DoCreateNewUInt32(Int64, Int64)
Creates a new memory mapped file based on the given stream and the given size in bytes.
Declaration
protected abstract MappedAccessor<uint> DoCreateNewUInt32(long position, long sizeInByte)
Parameters
Type |
Name |
Description |
System.Int64 |
position |
|
System.Int64 |
sizeInByte |
|
Returns
|
Improve this Doc
View Source
DoCreateNewUInt64(Int64, Int64)
Creates a new memory mapped file based on the given stream and the given size in bytes.
Declaration
protected abstract MappedAccessor<ulong> DoCreateNewUInt64(long position, long sizeInByte)
Parameters
Type |
Name |
Description |
System.Int64 |
position |
|
System.Int64 |
sizeInByte |
|
Returns
|
Improve this Doc
View Source
DoCreateVariable<T>(Int64, Int64, MemoryMap.ReadFromDelegate<T>, MemoryMap.WriteToDelegate<T>)
Creates a new memory mapped file based on the given stream and the given size in bytes.
Declaration
protected abstract MappedAccessor<T> DoCreateVariable<T>(long nextPosition, long sizeInBytes, MemoryMap.ReadFromDelegate<T> readFrom, MemoryMap.WriteToDelegate<T> writeTo)
Parameters
Returns
Type Parameters
|
Improve this Doc
View Source
GetCreateAccessorFuncFor<T>()
Gets the create accessor function for the given type.
Declaration
public static MemoryMap.CreateAccessorFunc<T> GetCreateAccessorFuncFor<T>()
Returns
Type Parameters
|
Improve this Doc
View Source
RegisterCreateAccessorFuncs()
Registers default accessors.
Declaration
public static void RegisterCreateAccessorFuncs()
Implements
System.IDisposable
Extension Methods