| cartobase
    4.7.0
    | 
Temporarily closes a file descriptor (typically, stdout/stderr). More...
#include <cartobase/stream/fdinhibitor.h>
| Classes | |
| class | ResetCallback | 
| Public Member Functions | |
| fdinhibitor (int fd, bool permanent=false) | |
| fd: file descriptor to inhibate, permanent: if false, don't reopen the stream when deleting the fdinhibitor  More... | |
| fdinhibitor (FILE *fd, bool permanent=false) | |
| fd: file to inhibate, permanent: if false, don't reopen the stream when deleting the fdinhibitor  More... | |
| ~fdinhibitor () | |
| void | close (void) | 
| void | open (void) | 
| void | notify (int fd) | 
| Static Public Member Functions | |
| static void | registerResetCallback (const std::string &name, ResetCallback *cbk) | 
| static bool | hasResetCallback (const std::string &name) | 
| static void | unregisterResetCallback (const std::string &name) | 
Temporarily closes a file descriptor (typically, stdout/stderr).
Currently, this low-level implementation doesn't work with all C++ streams: on some systems C++ streams stay in a bad state afterwards and are silent forever. Standard IO streams (cin, cout, cerr) are checked and protected against this problem.
Definition at line 50 of file fdinhibitor.h.
| carto::fdinhibitor::fdinhibitor | ( | int | fd, | 
| bool | permanent = false | ||
| ) | 
fd: file descriptor to inhibate, permanent: if false, don't reopen the stream when deleting the fdinhibitor
| carto::fdinhibitor::fdinhibitor | ( | FILE * | fd, | 
| bool | permanent = false | ||
| ) | 
fd: file to inhibate, permanent: if false, don't reopen the stream when deleting the fdinhibitor
| carto::fdinhibitor::~fdinhibitor | ( | ) | 
| void carto::fdinhibitor::close | ( | void | ) | 
| 
 | static | 
| void carto::fdinhibitor::notify | ( | int | fd | ) | 
| void carto::fdinhibitor::open | ( | void | ) | 
| 
 | static | 
| 
 | static |