| IOLink C# 1.11.0

Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Member Functions | Properties | List of all members
IOLink.RandomAccess Class Reference

Interface representing a generic array-like accessor. More...

Inheritance diagram for IOLink.RandomAccess:

## Public Member Functions
| RandomAccess (global::System.IntPtr cPtr, bool cMemoryOwn)
virtual RandomAccessCapabilitySet | GetCapabilities ()
| Returns capabilities for current RandomAccess
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`

## Detailed Description

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.

## Member Function Documentation

## ◆ Dispose()

override void IOLink.RandomAccess.Dispose | ( | bool | disposing | ) |
| inline protected virtual

Reimplemented from IOLink.DataAccess.

## ◆ Read()

virtual unsafe uint IOLink.RandomAccess.Read | ( | uint | offset,
|  | uint | size,
|  | byte[] | dst
| ) |  |
| inline virtual

Read content of data into given buffer.

Available when the RandomAccess has the READ capability.

Parameters

  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"

Exceptions

  exception | if offset is out of range

Returns
  Count of actually read bytes (can be zero or less than given size).

## ◆ Resize()

virtual void IOLink.RandomAccess.Resize | ( | uint | newSize | ) |
| inline virtual

Resize content data.

Available when the RandomAccess has the RESIZE capability.

Parameters

  newSize | New size of data. Content of data is undefined after being resized.

## ◆ Write()

virtual unsafe uint IOLink.RandomAccess.Write | ( | uint | offset,
|  | uint | size,
|  | byte[] | src
| ) |  |
| inline virtual

Write content of src buffer into data.

Available when the RandomAccess has the WRITE capability.

Parameters

  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"

Exceptions

  exception | if offset is out of range

Returns
  Count of actually written bytes (can be zero or less than given size).

The documentation for this class was generated from the following file:

- Release/net/generated/RandomAccess.cs