libidx
std::file Class Reference

#include <stl.h>

List of all members.

Public Member Functions

 file (const char *filename, const char *mode)
virtual ~file ()
 Close file pointer.
FILE * get_fp ()
 Returns the file pointer.
void incr_ref ()
 Increase reference counter.
void decr_ref ()
 Decrease reference counter.
bool no_references ()
 Returns true if no object refers to this instance.
uint references ()
 Returns the number of references to this file pointer.

Protected Attributes

FILE * fp
uint refcounter
 Count how many objects refer to this instance.

Detailed Description

A file class containing a reference counter which knows when to close the file pointer.


Constructor & Destructor Documentation

std::file::file ( const char *  filename,
const char *  mode 
)

Open file 'filename' with mode 'mode'. This throws an error upon failure.


The documentation for this class was generated from the following files: