OpenVDB  7.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 {
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
#define OPENVDB_API
Helper macros for defining library symbol visibility.
Definition: Platform.h:230
#define OPENVDB_VERSION_NAME
The version namespace name for this library version.
Definition: version.h:102
Definition: Exceptions.h:13
Library and file format version numbers.
Output stream to a unique temporary file.
Definition: TempFile.h:20
#define OPENVDB_USE_VERSION_NAMESPACE
Definition: version.h:154