rpa::filgen_name_to_FILE_base Class Reference

#include <streambuf_tmpnam.h>

Inheritance diagram for rpa::filgen_name_to_FILE_base:

rpa::filgen_name_to_FILE< NameGenerator > List of all members.

Public Member Functions

void open (const char *filNam)
FILE * operator() (void) const
void close (const char *filNam)

Private Attributes

FILE * _file

Detailed Description

filgen objects create temporary file names or descriptors. Their are classified into three categories :


Member Function Documentation

void rpa::filgen_name_to_FILE_base::close ( const char *  filNam  ) 

The file itself is not removed by this class. It is only closed. It is up to the base class to remove it.

void rpa::filgen_name_to_FILE_base::open ( const char *  filNam  ) 

There is a security hole because we cannot access this file exclusively. Even if we could, this step cannot be atomic so the file could be by anything, if it is in /tmp. If the file may already be existing. It is not truncated, so the allocated disk space can be reused.

We use the plain standard 'fopen' because the result is and will always be a FILE pointer.

FILE* rpa::filgen_name_to_FILE_base::operator() ( void   )  const [inline]

It is required that 'const operator()' is called as often as possible, without side effects, and must always return the same value.


Member Data Documentation

FILE* rpa::filgen_name_to_FILE_base::_file [private]


The documentation for this class was generated from the following files:
Generated on Tue Sep 25 10:20:38 2007 for rpa by  doxygen 1.4.7