spot 2.14.5
Loading...
Searching...
No Matches
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_

Friends

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.

Member Function Documentation

◆ print()

virtual void spot::temporary_file::print ( std::ostream & os,
const char *  ) const
inlinefinaloverridevirtual

Implements spot::printable.


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 spot@lrde.epita.fr.
Generated on for spot by doxygen 1.15.0