rpa::filgen_name_to_fd_base Class Reference

#include <streambuf_tmpnam.h>

Inheritance diagram for rpa::filgen_name_to_fd_base:

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

Public Member Functions

void open (const char *filNam)
 For security reasons, only this process can access this file.
int operator() (void) const
void close (const char *filNam)

Private Attributes

int _fd

Detailed Description

This template converts a functor for generating file names, into a functor for generating int file descriptors. It may be necessary when a streambuf can only be initialised with a file descriptor, but the calling program can only create a temporary file name.


Member Function Documentation

void rpa::filgen_name_to_fd_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_fd_base::open ( const char *  filNam  ) 

For security reasons, only this process can access this file.

If the file already exists, we do not truncate it, but try to reuse the allocated disk space : It may be unfragmented, which is good.

If O_CREAT and O_EXCL are set, fails if the file exists

int rpa::filgen_name_to_fd_base::operator() ( void   )  const [inline]

This method is used by the constructor of a stream file buffer. It must be 'const', and always return the same value.


Member Data Documentation

int rpa::filgen_name_to_fd_base::_fd [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