Skip to content

TFileDescriptor

Contains a TFileDescriptor that will be closed when the object owns the descriptor and goes out of scope.

Definition

Unit: Neslib.Iceoryx2.Event

type TFileDescriptor = record ... end;

Properties

Name Description
Handle
UnsafeNativeHandle Returns the underlying TFileDescriptor value.

Constructors

Name Description
Assign
Finalize
Initialize

Operators

Name Description
Equal
NotEqual

Methods

Name Description
AsView Creates a TFileDescriptorView out of the TFileDescriptor. The view is only valid as long as the TFileDescriptor is living - otherwise it will be a dangling view.
CreateNonOwning Creates a new TFileDescriptor object that does not own it. If the provided value is an invalid TFileDescriptor it returns nil.
CreateOwning Creates a new TFileDescriptor object that owns it. If the provided value is an invalid TFileDescriptor it returns nil.

Property Descriptions

Handle

property Handle: THandle read GetHandle

Type: THandle


UnsafeNativeHandle

Returns the underlying TFileDescriptor value.

property UnsafeNativeHandle: Int32 read GetUnsafeNativeHandle

Type: Int32

Remarks

  • the user shall not store the value in a variable otherwise lifetime issues may be encountered * do not manually close the file descriptor with a sys call

Constructor Descriptions

Assign

constructor Assign(var ADest: TFileDescriptor; const ASrc: TFileDescriptor)

Parameters

ADest: TFileDescriptor

ASrc: TFileDescriptor


Finalize

destructor Finalize


Initialize

constructor Initialize


Operator Descriptions

Equal(TFileDescriptor, Pointer)

class operator Equal(const ALeft: TFileDescriptor; const ARight: Pointer): Boolean; inline; static

Parameters

ALeft: TFileDescriptor

ARight: Pointer

Returns

Boolean


NotEqual(TFileDescriptor, Pointer)

class operator NotEqual(const ALeft: TFileDescriptor; const ARight: Pointer): Boolean; inline; static

Parameters

ALeft: TFileDescriptor

ARight: Pointer

Returns

Boolean


Method Descriptions

AsView

Creates a TFileDescriptorView out of the TFileDescriptor. The view is only valid as long as the TFileDescriptor is living - otherwise it will be a dangling view.

function AsView: TFileDescriptorView; inline

Returns

TFileDescriptorView


CreateNonOwning(Int32)

Creates a new TFileDescriptor object that does not own it. If the provided value is an invalid TFileDescriptor it returns nil.

class function CreateNonOwning(const AFileDescriptor: Int32): TFileDescriptor; static

Parameters

AFileDescriptor: Int32

Returns

TFileDescriptor


CreateOwning(Int32)

Creates a new TFileDescriptor object that owns it. If the provided value is an invalid TFileDescriptor it returns nil.

class function CreateOwning(const AFileDescriptor: Int32): TFileDescriptor; static

Parameters

AFileDescriptor: Int32

Returns

TFileDescriptor