Base Framework
Public Member Functions | List of all members
Handle Class Reference

Generic descriptor. More...

#include <base/io/Handle.h>

Inherits ReferenceCountedObject.

Inherited by FileDescriptor::Descriptor, and Process::ProcessHandle.

Public Member Functions

 Handle () noexcept
 
 Handle (OperatingSystem::Handle _handle) noexcept
 
OperatingSystem::Handle getHandle () const noexcept
 
bool isValid () const noexcept
 
virtual ~Handle ()
 
- Public Member Functions inherited from ReferenceCountedObject
 ReferenceCountedObject () noexcept
 
 ReferenceCountedObject (const ReferenceCountedObject &copy) noexcept
 
 ReferenceCountedObject (ReferenceCountedObject &&move) noexcept
 
ReferenceCountedObjectoperator= (const ReferenceCountedObject &copy) noexcept
 
ReferenceCountedObjectoperator= (ReferenceCountedObject &&move) noexcept
 
MemorySize getNumberOfReferences_INTERNAL () const noexcept
 
virtual bool useGarbageCollector () const noexcept
 
- Public Member Functions inherited from DynamicObject
 DynamicObject () noexcept
 
bool isValidObject () const noexcept
 
virtual ~DynamicObject () noexcept(false)
 
 _COM_AZURE_DEV__BASE__OVERRIDE_ALLOC ()
 

Detailed Description

Generic descriptor.

A generic descriptor which serves as a handle to a source or sink of bytes within the operatingsystem (e.g. file, socket and pipe). This class is normally not used directly by the application.

Version
1.0

Constructor & Destructor Documentation

◆ Handle() [1/2]

Handle::Handle ( )
inlinenoexcept

Initializes an invalid handle.

◆ Handle() [2/2]

Handle::Handle ( OperatingSystem::Handle  _handle)
inlineexplicitnoexcept

Initializes handle using the specified value.

◆ ~Handle()

virtual Handle::~Handle ( )
virtual

Destroys the handle.

Member Function Documentation

◆ getHandle()

OperatingSystem::Handle Handle::getHandle ( ) const
inlinenoexcept

Returns the handle.

◆ isValid()

bool Handle::isValid ( ) const
inlinenoexcept

Returns true if the handle is valid.