Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
KODI::UTILS::POSIX::CFileHandle Class Reference

#include <FileHandle.h>

Inheritance diagram for KODI::UTILS::POSIX::CFileHandle:
KODI::UTILS::CScopeGuard< int, -1, decltype(close)>

Public Member Functions

 CFileHandle () noexcept
 
 CFileHandle (int fd)
 
- Public Member Functions inherited from KODI::UTILS::CScopeGuard< int, -1, decltype(close)>
 CScopeGuard (std::function< decltype(close) > del, int handle=invalid)
 
 CScopeGuard ()=delete
 
 CScopeGuard (const CScopeGuard &rhs)=delete
 
 CScopeGuard (CScopeGuard &&rhs) noexcept
 
 ~CScopeGuard () noexcept
 
 operator int () const
 
 operator bool () const
 
void attach (int handle)
 attach a new handle to this instance, if there's already a handle it will be closed.
 
int release ()
 release the managed handle so that it won't be auto closed
 
void reset ()
 reset the instance, closing any managed handle and setting it to invalid
 
CScopeGuardoperator= (const CScopeGuard &rhs)=delete
 
CScopeGuardoperator= (CScopeGuard &&rhs) noexcept
 

Constructor & Destructor Documentation

◆ CFileHandle() [1/2]

KODI::UTILS::POSIX::CFileHandle::CFileHandle ( )
inlinenoexcept

◆ CFileHandle() [2/2]

KODI::UTILS::POSIX::CFileHandle::CFileHandle ( int fd)
inlineexplicit

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