#include <Wrappers.h>
Public Member Functions | |
| File (FILE *fp=0) | |
| Create a File from a FILE* initialized by fopen(). | |
| File (const char *path, const char *mode) | |
| Create a File by specifying a name and mode. | |
| File (File &o) | |
| Create a File from a File object. | |
| ~File () | |
| Close the file. | |
| operator const FILE * () const | |
| The File object can be passed on as a const FILE*. | |
| FILE * | get () |
| Bypassing the File wrapper. | |
| const File & | operator= (File &rhs) |
| File assignment operator. | |
Private Member Functions | |
| void | close (FILE *fp) const |
Private Attributes | |
| FILE * | m_fp |
The file is automatically closed when the File object is destroyed. Copying a File copies the FILE* and transfers ownership to the destination. If more than one File owns the same FILE* at the same time the behavior of the program is undefined.
| WRAPPERS::File::File | ( | FILE * | fp = 0 |
) | [inline] |
| WRAPPERS::File::File | ( | const char * | path, | |
| const char * | mode | |||
| ) | [inline] |
Create a File by specifying a name and mode.
| path | the path of the file to create. | |
| mode | a mode in which to open the file, the mode must be accepted by fopen(). |
| WRAPPERS::File::File | ( | File & | o | ) | [inline] |
| WRAPPERS::File::~File | ( | ) | [inline] |
Close the file.
| void WRAPPERS::File::close | ( | FILE * | fp | ) | const [inline, private] |
| FILE* WRAPPERS::File::get | ( | ) | [inline] |
Bypassing the File wrapper.
| WRAPPERS::File::operator const FILE * | ( | ) | const [inline] |
The File object can be passed on as a const FILE*.
FILE* WRAPPERS::File::m_fp [private] |
1.4.7