|
EPICS ARCHIVER V4
|
Auto-close FILE pointer wrapper. More...
#include <AutoFilePtr.h>
Public Member Functions | |
| AutoFilePtr (const char *filename, const char *mode) | |
| Construct AutoFilePtr for given filename and mode. More... | |
| AutoFilePtr (FILE *f=0) | |
| Construct AutoFilePtr for existing FILE, which is now controlled by the AutoFilePtr. More... | |
| ~AutoFilePtr () | |
| Destructor closes the FILE under control of this AutoFilePtr. | |
| bool | open (const char *filename, const char *mode) |
| Open a (new) file. | |
| void | close () |
| Close the current file. | |
| void | set (FILE *new_f) |
| Release control of the current file, closing it, and switch to a new file. More... | |
| operator bool () const | |
| Is there an open file? | |
| operator FILE * () const | |
| Obtain the current FILE. | |
Auto-close FILE pointer wrapper.
|
inline |
Construct AutoFilePtr for given filename and mode.
To test the result, use the bool operator.
|
inline |
Construct AutoFilePtr for existing FILE, which is now controlled by the AutoFilePtr.
|
inline |
Release control of the current file, closing it, and switch to a new file.
1.8.5