FreeImage.NET Class Library Reference
MemoryArrayT Class |
Represents unmanaged memory, containing an array of a given structure.
Inheritance Hierarchy
Namespace: FreeImageAPI
Assembly: FreeImageNET (in FreeImageNET.dll) Version: 3.17.0.4 (3.17.0)
Syntax
C#
public class MemoryArray<T> : IDisposable, ICloneable, ICollection, IEnumerable<T>, IEnumerable, IEquatable<MemoryArray<T>> where T : struct, new()
Type Parameters
- T
- Structuretype represented by the instance.
The MemoryArrayT type exposes the following members.
Constructors
Name | Description | |
---|---|---|
MemoryArrayT |
Initializes a new instance.
| |
MemoryArrayT(IntPtr, Int32) |
Initializes a new instance of the MemoryArrayT class.
| |
MemoryArrayT(Void*, Int32) |
Initializes a new instance of the MemoryArrayT class.
|
Properties
Name | Description | |
---|---|---|
BaseAddress |
Gets the base address of the represented memory block.
| |
Count |
Gets a 32-bit integer that represents the total number of elements
in the MemoryArrayT.
| |
Data |
Gets or sets the values of the unmanaged array.
| |
IsSynchronized |
Gets a value indicating whether access to the MemoryArrayT
is synchronized (thread safe).
| |
Item |
Gets or sets the value at the specified position in the array.
| |
Length |
Gets the length of the unmanaged array.
| |
SyncRoot |
Gets an object that can be used to synchronize access to the MemoryArrayT.
|
Methods
Name | Description | |
---|---|---|
Clone |
Creates a shallow copy of the MemoryArrayT.
| |
CopyFrom |
Copies a range of elements from the array starting at the specified
sourceIndex and pastes them to the unmanaged array
starting at the specified destinationIndex.
The length and the indexes are specified as 32-bit integers.
| |
CopyMemory |
Copies a block of memory from one location to another.
| |
CopyTo(Array, Int32) |
Copies the entire array to a compatible one-dimensional Array,
starting at the specified index of the target array.
| |
CopyTo(T, Int32, Int32, Int32) |
Copies a range of elements from the unmanaged array starting at the specified
sourceIndex and pastes them to array
starting at the specified destinationIndex.
The length and the indexes are specified as 32-bit integers.
| |
Dispose |
Releases all ressources.
| |
Dispose(Boolean) |
Releases allocated handles associated with this instance.
| |
EnsureNotDisposed |
Throws an ObjectDisposedException if
this instance is disposed.
| |
Equals(Object) |
Tests whether the specified MemoryArrayT structure is equivalent to this
MemoryArrayT structure.
(Overrides ObjectEquals(Object).) | |
Equals(MemoryArrayT) |
Tests whether the specified MemoryArrayT structure is equivalent to this
MemoryArrayT structure.
| |
Finalize |
Frees the allocated GCHandle.
(Overrides ObjectFinalize.) | |
GetEnumerator |
Retrieves an object that can iterate through the individual
elements in this MemoryArrayT.
| |
GetHashCode |
Serves as a hash function for a particular type.
(Overrides ObjectGetHashCode.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
GetValue |
Gets the value at the specified position.
| |
GetValues |
Gets the values at the specified position and length.
| |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
SetValue |
Sets a value to the element at the specified position.
| |
SetValues |
Sets the values at the specified position.
| |
ToByteArray |
Returns the represented block of memory as an array of Byte.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Operators
Name | Description | |
---|---|---|
Equality |
Tests whether two specified MemoryArrayT structures are equivalent.
| |
Inequality |
Tests whether two specified MemoryArrayT structures are different.
|
Fields
Name | Description | |
---|---|---|
baseAddress |
Baseaddress of the wrapped memory.
| |
buffer |
Array of T containing a single element.
The array is used as a workaround, because there are no pointer for generic types.
| |
handle |
Handle for pinning buffer.
| |
isFourBit |
Indicates whther the wrapped memory is handles like 4-bit blocks.
| |
isOneBit |
Indicates whether the wrapped memory is handled like a bitfield.
| |
length |
Number of elements being wrapped.
| |
ptr |
Pointer to the element of buffer.
| |
syncRoot |
An object that can be used to synchronize access to the MemoryArrayT.
|
Remarks
See Also