Table of Contents

Class UnmanagedVector

Namespace
Emgu.CV.Util
Assembly
Emgu.CV.dll

Wrapped class of the C++ standard vector of Byte.

public abstract class UnmanagedVector : Stream, IDisposable, IAsyncDisposable
Inheritance
UnmanagedVector
Implements
Derived
Inherited Members

Constructors

UnmanagedVector()

protected UnmanagedVector()

Fields

_ptr

A pointer to the unmanaged object

protected nint _ptr

Field Value

nint

Properties

CanRead

public override bool CanRead { get; }

Property Value

bool

CanSeek

public override bool CanSeek { get; }

Property Value

bool

CanWrite

public override bool CanWrite { get; }

Property Value

bool

Length

public override long Length { get; }

Property Value

long

Position

public override long Position { get; set; }

Property Value

long

Ptr

Pointer to the unmanaged object

public nint Ptr { get; }

Property Value

nint

Size

Get the size of the vector

public abstract int Size { get; }

Property Value

int

StartAddress

The pointer to the first element on the vector. In case of an empty vector, IntPtr.Zero will be returned.

public abstract nint StartAddress { get; }

Property Value

nint

Methods

Dispose()

The dispose function that implements IDisposable interface

public void Dispose()

Dispose(bool)

Dispose(bool disposing) executes in two distinct scenarios. If disposing equals true, the method has been called directly or indirectly by a user's code. Managed and unmanaged resources can be disposed. If disposing equals false, the method has been called by the runtime from inside the finalizer and you should not reference other objects. Only unmanaged resources can be disposed.

protected override void Dispose(bool disposing)

Parameters

disposing bool

If disposing equals false, the method has been called by the runtime from inside the finalizer and you should not reference other objects. Only unmanaged resources can be disposed.

DisposeObject()

Release the unmanaged resources

protected abstract void DisposeObject()

~UnmanagedVector()

Destructor

protected ~UnmanagedVector()

Flush()

public override void Flush()

Read(byte[], int, int)

public override int Read(byte[] buffer, int offset, int count)

Parameters

buffer byte[]
offset int
count int

Returns

int

ReleaseManagedResources()

Release the managed resources. This function will be called during the disposal of the current object. override ride this function if you need to call the Dispose() function on any managed IDisposable object created by the current object

protected virtual void ReleaseManagedResources()

Seek(long, SeekOrigin)

public override long Seek(long offset, SeekOrigin origin)

Parameters

offset long
origin SeekOrigin

Returns

long

SetLength(long)

public override void SetLength(long value)

Parameters

value long

Write(byte[], int, int)

public override void Write(byte[] buffer, int offset, int count)

Parameters

buffer byte[]
offset int
count int

Operators

implicit operator nint(UnmanagedVector)

Implicit operator for IntPtr

public static implicit operator nint(UnmanagedVector obj)

Parameters

obj UnmanagedVector

The UnmanagedObject

Returns

nint

The unmanaged pointer for this object