![]() |
IOLink C# 1.11.0
|
Interface representing a generic array-like accessor. More...
Public Member Functions | |
| RandomAccess (global::System.IntPtr cPtr, bool cMemoryOwn) | |
| virtual RandomAccessCapabilitySet | GetCapabilities () |
| |
| bool | Support (RandomAccessCapabilitySet flags) |
| Checks if the RandomAccess supports the given capabilities. | |
| virtual uint | GetSize () |
| Return the number of bytes of the resource accessed. | |
| string | ToString () |
| Return a string representation. | |
| virtual unsafe uint | Read (uint offset, uint size, byte[] dst) |
| Read content of data into given buffer. | |
| virtual unsafe uint | Write (uint offset, uint size, byte[] src) |
| Write content of src buffer into data. | |
| virtual void | Resize (uint newSize) |
| Resize content data. | |
Public Member Functions inherited from IOLink.DataAccess | |
| DataAccess (global::System.IntPtr cPtr, bool cMemoryOwn) | |
| void | Dispose () |
| virtual DataStorage | GetStorage () |
| Get the storage to which this data accessor belong. | |
| virtual string | GetResourceId () |
| Return the resource identifier of this data accessor. | |
Static Public Member Functions | |
| static global::System.Runtime.InteropServices.HandleRef | getCPtr (RandomAccess obj) |
Static Public Member Functions inherited from IOLink.DataAccess | |
| static global::System.Runtime.InteropServices.HandleRef | getCPtr (DataAccess obj) |
Protected Member Functions | |
| override void | Dispose (bool disposing) |
Properties | |
| RandomAccessCapabilitySet | Capabilities [get] |
The Capabilities on the RandomAccess | |
| uint | Size [get] |
The number of bytes that can be stored in this RandomAccess | |
Properties inherited from IOLink.DataAccess | |
| DataStorage | Storage [get] |
The Storage associated with this DataAccess | |
| string | ResourceId [get] |
The identifier of this DataAccess in its DataStorage | |
Interface representing a generic array-like accessor.
This interface capabilities are indicated by the RandomAccessCapabilitySet returned by the method RandomAccess::capabilities. Each capability enables the use of a specific set of methods. When one of those methods is called, if its corresponding capability is not supported, a NotImplemented exception will be thrown.
|
inlineprotectedvirtual |
Reimplemented from IOLink.DataAccess.
|
inlinevirtual |
Read content of data into given buffer.
Available when the RandomAccess has the READ capability.
| offset | Offset in byte to the begining of read area |
| size | Size in byte of read area |
| dst | Destination buffer. This buffer should have a size of "size" |
| exception | if offset is out of range |
|
inlinevirtual |
Resize content data.
Available when the RandomAccess has the RESIZE capability.
| newSize | New size of data. Content of data is undefined after being resized. |
|
inlinevirtual |
Write content of src buffer into data.
Available when the RandomAccess has the WRITE capability.
| offset | Offset in byte to the beginning of write area |
| size | Size in byte of write area |
| src | Source buffer. This buffer should have a size of "size" |
| exception | if offset is out of range |