spot  2.8.1
Public Types | Public Member Functions | Protected Attributes | Friends | List of all members
spot::temporary_file Class Reference

Temporary file name. More...

#include <spot/misc/tmpfile.hh>

Inheritance diagram for spot::temporary_file:
Collaboration diagram for spot::temporary_file:

Public Types

typedef std::list< temporary_file * >::iterator cleanpos_t

Public Member Functions

SPOT_LOCAL temporary_file (char *name, cleanpos_t cp)
 temporary_file (const temporary_file &other)=delete
const char * name () const
virtual void print (std::ostream &os, const char *) const final override

Protected Attributes

char * name_
cleanpos_t cleanpos_


std::ostream & operator<< (std::ostream &os, const temporary_file *f)

Detailed Description

Temporary file name.

This class serves a dual purpose.

  1. It carries the name of a temporary file, created with create_tmpfile().
  2. It represents the life of the associated file. The file is erased as soon as the temporary_file instance is destroyed.

Note that there are two ways to destroy temporary_file instances. Either directly with delete, or indirectly by calling cleanup_tmpfiles(). You should never delete an instance that has been created before the last call to cleanup_tmpfiles(), because that instance has already been deleted.

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

Please direct any question, comment, or bug report to the Spot mailing list at
Generated on Fri Feb 27 2015 10:00:07 for spot by doxygen 1.8.13