Halide 22.0.0 Halide compiler and libraries

Public Member Functions | List of all members
Halide::Internal::TemporaryFile Class Referencefinal

A simple utility class that creates a temporary file in its ctor and deletes that file in its dtor; this is useful for temporary files that you want to ensure are deleted when exiting a certain scope. More...

`#include <Util.h>`

## Public Member Functions
| TemporaryFile (const std::string &prefix, const std::string &suffix)
const std::string & | pathname () const
| ~TemporaryFile ()
void | detach ()
| TemporaryFile (const TemporaryFile &)=delete
TemporaryFile & | operator= (const TemporaryFile &)=delete
| TemporaryFile (TemporaryFile &&)=delete
TemporaryFile & | operator= (TemporaryFile &&)=delete

## Detailed Description

A simple utility class that creates a temporary file in its ctor and deletes that file in its dtor; this is useful for temporary files that you want to ensure are deleted when exiting a certain scope.

Since this is essentially just an RAII wrapper around file_make_temp() and file_unlink(), it has the same failure modes (i.e.: assertion upon error).

Definition at line 343 of file Util.h.

## Constructor & Destructor Documentation

## ◆ TemporaryFile() [1/3]

Halide::Internal::TemporaryFile::TemporaryFile | ( | const std::string & | prefix,
|  | const std::string & | suffix
| ) |  |
| inline

Definition at line 345 of file Util.h.

## ◆ ~TemporaryFile()

Halide::Internal::TemporaryFile::~TemporaryFile | ( |  | ) |
| inline

Definition at line 351 of file Util.h.

References Halide::Internal::file_unlink().

## ◆ TemporaryFile() [2/3]

Halide::Internal::TemporaryFile::TemporaryFile | ( | const TemporaryFile & |  | ) |
| delete

## ◆ TemporaryFile() [3/3]

Halide::Internal::TemporaryFile::TemporaryFile | ( | TemporaryFile && |  | ) |
| delete

## Member Function Documentation

## ◆ pathname()

const std::string & Halide::Internal::TemporaryFile::pathname | ( |  | ) | const
| inline

Definition at line 348 of file Util.h.

## ◆ detach()

void Halide::Internal::TemporaryFile::detach | ( |  | ) |
| inline

Definition at line 359 of file Util.h.

## ◆ operator=() [1/2]

TemporaryFile & Halide::Internal::TemporaryFile::operator= | ( | const TemporaryFile & |  | ) |
| delete

## ◆ operator=() [2/2]

TemporaryFile & Halide::Internal::TemporaryFile::operator= | ( | TemporaryFile && |  | ) |
| delete

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

- src/Util.h