Loading...
Searching...
No Matches
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 336 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 338 of file Util.h.

References Halide::Internal::file_make_temp().

Referenced by operator=(), operator=(), TemporaryFile(), and TemporaryFile().

## ~TemporaryFile()

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

inline

Definition at line 344 of file Util.h.

References Halide::Internal::file_unlink().

## TemporaryFile() [2/3]

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

delete

References TemporaryFile().

## TemporaryFile() [3/3]

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

delete

References TemporaryFile().

## Member Function Documentation

## pathname()

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

inline

Definition at line 341 of file Util.h.

## detach()

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

inline

Definition at line 352 of file Util.h.

## operator=() [1/2]

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

delete

References TemporaryFile().

## operator=() [2/2]

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

delete

References TemporaryFile().

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

- src/Util.h