OpenVDB: TempFile.h Source File

OpenVDB 8.0.0

TempFile.h
Go to the documentation of this file.
1 // Copyright Contributors to the OpenVDB Project
2 // SPDX-License-Identifier: MPL-2.0
3
5
6 #ifndef OPENVDB_IO_TEMPFILE_HAS_BEEN_INCLUDED
7 #define OPENVDB_IO_TEMPFILE_HAS_BEEN_INCLUDED
8
9 #include <openvdb/version.h>
10 #include <memory>
11 #include <ostream>
12
13
14 namespace openvdb {
15 OPENVDB_USE_VERSION_NAMESPACE
16 namespace OPENVDB_VERSION_NAME {
17 namespace io {
18
20 class OPENVDB_API TempFile: public std::ostream
21 {
22 public:
29 TempFile();
30 ~TempFile();
31
33 const std::string& filename() const;
34
36 bool is_open() const;
37
39 void close();
40
41 private:
42 struct TempFileImpl;
43 std::unique_ptr<TempFileImpl> mImpl;
44 };
45
46 } // namespace io
47 } // namespace OPENVDB_VERSION_NAME
48 } // namespace openvdb
49
50 #endif // OPENVDB_IO_TEMPFILE_HAS_BEEN_INCLUDED
openvdb::v8_2::io::TempFile::TempFile
TempFile()
Create and open a unique file.
openvdb::v8_2::io::TempFile
Output stream to a unique temporary file.
Definition: TempFile.h:21
version.h
Library and file format version numbers.
OPENVDB_API
#define OPENVDB_API
Helper macros for defining library symbol visibility.
Definition: Platform.h:208
OPENVDB_USE_VERSION_NAMESPACE
#define OPENVDB_USE_VERSION_NAMESPACE
Definition: version.h:153
OPENVDB_VERSION_NAME
#define OPENVDB_VERSION_NAME
The version namespace name for this library version.
Definition: version.h:101
openvdb::v8_2::io::TempFile::~TempFile
~TempFile()
openvdb::v8_2::io::TempFile::close
void close()
Close the file.
openvdb::v8_2::io::TempFile::is_open
bool is_open() const
Return true if the file is open for writing.
openvdb
Definition: openvdb/Exceptions.h:13
openvdb::v8_2::io::TempFile::filename
const std::string & filename() const
Return the path to the temporary file.