GClasses
|
Closes a file when this object goes out of scope. More...
#include <GHolders.h>
Public Member Functions | |
FileHolder () | |
FileHolder (FILE *pFile) | |
~FileHolder () | |
Close the file. | |
void | reset (FILE *pFile=NULL) |
Close the file and set this holder to hold NULL. | |
FILE * | get () |
Returns a pointer to the FILE being held. | |
FILE * | release () |
Releases the FILE (it is now your job to close it) and sets this holder to hold NULL. |
Closes a file when this object goes out of scope.
GClasses::FileHolder::FileHolder | ( | ) | [inline] |
GClasses::FileHolder::FileHolder | ( | FILE * | pFile | ) | [inline] |
GClasses::FileHolder::~FileHolder | ( | ) | [inline] |
Close the file.
FILE* GClasses::FileHolder::get | ( | ) | [inline] |
Returns a pointer to the FILE being held.
FILE* GClasses::FileHolder::release | ( | ) | [inline] |
Releases the FILE (it is now your job to close it) and sets this holder to hold NULL.
void GClasses::FileHolder::reset | ( | FILE * | pFile = NULL | ) |
Close the file and set this holder to hold NULL.