IOLink C# 1.11.0
Loading...
Searching...
No Matches
IOLink.RandomAccess Class Reference

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

Inheritance diagram for IOLink.RandomAccess:
IOLink.DataAccess

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.
 

Static Public Member Functions

static global::System.Runtime.InteropServices.HandleRef getCPtr (RandomAccess 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
 

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)
inlineprotectedvirtual

Reimplemented from IOLink.DataAccess.

◆ Read()

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

Read content of data into given buffer.

Available when the RandomAccess has the READ capability.

Parameters
offsetOffset in byte to the begining of read area
sizeSize in byte of read area
dstDestination buffer. This buffer should have a size of "size"
Exceptions
exceptionif 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)
inlinevirtual

Resize content data.

Available when the RandomAccess has the RESIZE capability.

Parameters
newSizeNew size of data. Content of data is undefined after being resized.

◆ Write()

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

Write content of src buffer into data.

Available when the RandomAccess has the WRITE capability.

Parameters
offsetOffset in byte to the beginning of write area
sizeSize in byte of write area
srcSource buffer. This buffer should have a size of "size"
Exceptions
exceptionif 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: