OpenVPN 3 Core Library
Loading...
Searching...
No Matches
openvpn::ScopedFD Class Reference

#include <scoped_fd.hpp>

Public Types

typedef int base_type
 

Public Member Functions

 ScopedFD ()
 
 ScopedFD (const int fd_arg)
 
int release ()
 
bool defined () const
 
int operator() () const
 
void reset (const int fd_arg)
 
void reset ()
 
void replace (const int fd_arg)
 
bool close ()
 
int close_with_errno ()
 
virtual ~ScopedFD ()
 
 ScopedFD (ScopedFD &&other) noexcept
 
ScopedFDoperator= (ScopedFD &&other) noexcept
 

Static Public Member Functions

static int undefined ()
 
static bool defined_static (int fd)
 

Private Member Functions

 ScopedFD (const ScopedFD &)=delete
 
ScopedFDoperator= (const ScopedFD &)=delete
 

Private Attributes

int fd
 

Detailed Description

Definition at line 22 of file scoped_fd.hpp.

Member Typedef Documentation

◆ base_type

Definition at line 28 of file scoped_fd.hpp.

Constructor & Destructor Documentation

◆ ScopedFD() [1/4]

openvpn::ScopedFD::ScopedFD ( const ScopedFD )
privatedelete

◆ ScopedFD() [2/4]

openvpn::ScopedFD::ScopedFD ( )
inline

Definition at line 30 of file scoped_fd.hpp.

◆ ScopedFD() [3/4]

openvpn::ScopedFD::ScopedFD ( const int  fd_arg)
inlineexplicit

Definition at line 35 of file scoped_fd.hpp.

◆ ~ScopedFD()

virtual openvpn::ScopedFD::~ScopedFD ( )
inlinevirtual

Definition at line 107 of file scoped_fd.hpp.

◆ ScopedFD() [4/4]

openvpn::ScopedFD::ScopedFD ( ScopedFD &&  other)
inlinenoexcept

Definition at line 113 of file scoped_fd.hpp.

Member Function Documentation

◆ close()

bool openvpn::ScopedFD::close ( )
inline

Definition at line 88 of file scoped_fd.hpp.

Here is the caller graph for this function:

◆ close_with_errno()

int openvpn::ScopedFD::close_with_errno ( )
inline

Definition at line 94 of file scoped_fd.hpp.

Here is the caller graph for this function:

◆ defined()

bool openvpn::ScopedFD::defined ( ) const
inline

Definition at line 58 of file scoped_fd.hpp.

Here is the caller graph for this function:

◆ defined_static()

static bool openvpn::ScopedFD::defined_static ( int  fd)
inlinestatic

Definition at line 53 of file scoped_fd.hpp.

Here is the caller graph for this function:

◆ operator()()

int openvpn::ScopedFD::operator() ( ) const
inline

Definition at line 63 of file scoped_fd.hpp.

◆ operator=() [1/2]

ScopedFD & openvpn::ScopedFD::operator= ( const ScopedFD )
privatedelete

◆ operator=() [2/2]

ScopedFD & openvpn::ScopedFD::operator= ( ScopedFD &&  other)
inlinenoexcept

Definition at line 119 of file scoped_fd.hpp.

◆ release()

int openvpn::ScopedFD::release ( )
inline

Definition at line 45 of file scoped_fd.hpp.

Here is the caller graph for this function:

◆ replace()

void openvpn::ScopedFD::replace ( const int  fd_arg)
inline

Definition at line 81 of file scoped_fd.hpp.

◆ reset() [1/2]

void openvpn::ScopedFD::reset ( )
inline

Definition at line 75 of file scoped_fd.hpp.

◆ reset() [2/2]

void openvpn::ScopedFD::reset ( const int  fd_arg)
inline

Definition at line 68 of file scoped_fd.hpp.

Here is the caller graph for this function:

◆ undefined()

static int openvpn::ScopedFD::undefined ( )
inlinestatic

Definition at line 40 of file scoped_fd.hpp.

Member Data Documentation

◆ fd

int openvpn::ScopedFD::fd
private

Definition at line 128 of file scoped_fd.hpp.


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