A smart pointer for stdio streams. More...
#include <FilePtr.h++>
Public Member Functions | |
| FilePtr (const char *name, const char *mode) throw () | |
| Construct a new FilePtr for the given filename and attributes. | |
| FilePtr (const String &name, const String &mode) throw () | |
| Construct a new FilePtr for the given filename and attributes. | |
| FilePtr (FILE *fp) throw () | |
| Construct a new FilePtr for an existing stdio stream. | |
| ~FilePtr () throw () | |
| Destructor. | |
| operator FILE * () throw () | |
| Cast operator. | |
| bool | isValid () const throw () |
| Determine if the stream is valid (non-NULL). | |
| bool | operator! () const throw () |
| Determine if the stream is invalid (NULL). | |
A smart pointer for stdio streams.
| FilePtr | ( | const char * | name, | |
| const char * | mode | |||
| ) | throw () |
Construct a new FilePtr for the given filename and attributes.
The constructor calls fopen() to open the stream.
| name | The filename. | |
| mode | The open mode. |
Construct a new FilePtr for the given filename and attributes.
The constructor calls fopen() to open the stream.
| name | The filename. | |
| mode | The open mode. |
| FilePtr | ( | FILE * | fp | ) | throw () |
Construct a new FilePtr for an existing stdio stream.
| fp | The stream pointer. |
| ~FilePtr | ( | ) | throw () |
Destructor.
Closes the stream.
| bool isValid | ( | ) | const throw () [inline] |
Determine if the stream is valid (non-NULL).
| operator FILE * | ( | ) | throw () [inline] |
Cast operator.
| bool operator! | ( | ) | const throw () [inline] |
Determine if the stream is invalid (NULL).
1.6.3