LCOV - code coverage report
Current view: top level - sources - linux_file_descriptor.hpp (source / functions) Hit Total Coverage
Test: lcov.info Lines: 1 1 100.0 %
Date: 2024-10-05 18:49:23 Functions: 1 1 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : #pragma once
       2                 :            : 
       3                 :            : namespace Linux
       4                 :            : {
       5                 :            : 
       6                 :            : class FileDescriptor
       7                 :            : {
       8                 :            :    public:
       9                 :          2 :     FileDescriptor() = default;
      10                 :            : 
      11                 :            :     FileDescriptor(FileDescriptor const&) = delete;
      12                 :            : 
      13                 :            :     FileDescriptor(FileDescriptor&& other) noexcept;
      14                 :            : 
      15                 :            :     auto operator=(FileDescriptor const&) -> FileDescriptor& = delete;
      16                 :            : 
      17                 :            :     auto operator=(FileDescriptor&& other) noexcept -> FileDescriptor&;
      18                 :            : 
      19                 :            :     ~FileDescriptor();
      20                 :            : 
      21                 :            :     explicit FileDescriptor(int handle);
      22                 :            : 
      23                 :            :     auto GetNativeHandle() const noexcept -> int;
      24                 :            : 
      25                 :            :     auto CheckNativeHandle() const noexcept -> bool;
      26                 :            : 
      27                 :            :     [[nodiscard]]
      28                 :            : #if defined(__clang__)
      29                 :            :     [[clang::reinitializes]]
      30                 :            : #endif
      31                 :            :     auto ReleaseNativeHandle() noexcept -> int;
      32                 :            : 
      33                 :            :    private:
      34                 :            :     int handle_ = -1;
      35                 :            : };
      36                 :            : 
      37                 :            : }  // namespace Linux

Generated by: LCOV version 1.14