Zero  0.1.0
Public Member Functions | Static Public Member Functions | List of all members
fd_guard_t Struct Reference

Ensures that a file descriptor gets closed. More...

#include <guard.h>

Inheritance diagram for fd_guard_t:
guard_base_t< int, fd_guard_t >

Public Member Functions

 fd_guard_t (int fd)
 
- Public Member Functions inherited from guard_base_t< int, fd_guard_t >
 guard_base_t (int obj)
 
 guard_base_t (const guard_base_t &other)
 
guard_base_toperator= (const guard_base_t &other)
 
 operator int () const
 
int get () const
 
int release () const
 Notifies this guard that its services are no longer needed because some other entity has assumed ownership of the pointer. More...
 
void done () const
 Notifies this guard that its action should be performed now rather than at destruct time. More...
 
 ~guard_base_t ()
 

Static Public Member Functions

static void guard_action (int fd)
 
static int null_value ()
 
- Static Public Member Functions inherited from guard_base_t< int, fd_guard_t >
static int null_value ()
 
static bool different (const int &a, const int &b)
 

Additional Inherited Members

- Public Types inherited from guard_base_t< int, fd_guard_t >
typedef guard_base_t< int, fd_guard_tBase
 
- Protected Member Functions inherited from guard_base_t< int, fd_guard_t >
void assign (int obj) const
 
- Protected Attributes inherited from guard_base_t< int, fd_guard_t >
int _obj
 

Detailed Description

Ensures that a file descriptor gets closed.

Constructor & Destructor Documentation

§ fd_guard_t()

fd_guard_t::fd_guard_t ( int  fd)
inline

Member Function Documentation

§ guard_action()

static void fd_guard_t::guard_action ( int  fd)
inlinestatic

§ null_value()

static int fd_guard_t::null_value ( )
inlinestatic

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