31 #ifndef OPENVDB_IO_IO_HAS_BEEN_INCLUDED 32 #define OPENVDB_IO_IO_HAS_BEEN_INCLUDED 37 #include <boost/any.hpp> 71 void transferTo(std::ios_base&)
const;
73 uint32_t fileVersion()
const;
74 void setFileVersion(uint32_t);
79 uint32_t compression()
const;
80 void setCompression(uint32_t);
82 uint32_t gridClass()
const;
85 const void* backgroundPtr()
const;
86 void setBackgroundPtr(
const void*);
88 bool halfFloat()
const;
91 bool writeGridStats()
const;
92 void setWriteGridStats(
bool);
94 bool seekable()
const;
95 void setSeekable(
bool);
97 bool countingPasses()
const;
98 void setCountingPasses(
bool);
100 uint32_t pass()
const;
101 void setPass(uint32_t);
110 const MetaMap& gridMetadata()
const;
121 std::string str()
const;
125 std::unique_ptr<Impl> mImpl;
159 std::string filename()
const;
172 using Notifier = std::function<void(std::string )>;
177 void clearNotifier();
182 explicit MappedFile(
const std::string& filename,
bool autoDelete =
false);
185 std::unique_ptr<Impl> mImpl;
289 #endif // OPENVDB_IO_IO_HAS_BEEN_INCLUDED
SharedPtr< MappedFile > Ptr
Definition: io.h:152
OPENVDB_API void setStreamMetadataPtr(std::ios_base &, SharedPtr< StreamMetadata > &, bool transfer=true)
Associate the given stream with (a shared pointer to) an object that stores metadata (file format,...
std::function< void(std::string)> Notifier
Definition: io.h:172
OPENVDB_API SharedPtr< StreamMetadata > getStreamMetadataPtr(std::ios_base &)
Return a shared pointer to an object that stores metadata (file format, compression scheme,...
Grid archive associated with a file on disk.
Definition: File.h:57
OPENVDB_API void setMappedFilePtr(std::ios_base &, SharedPtr< MappedFile > &)
Associate the given stream with (a shared pointer to) a memory-mapped file.
OPENVDB_API uint32_t getGridClass(std::ios_base &)
Return the class (GRID_LEVEL_SET, GRID_UNKNOWN, etc.) of the grid currently being read from or writte...
OPENVDB_API void setVersion(std::ios_base &, const VersionId &libraryVersion, uint32_t fileVersion)
Associate specific file format and library version numbers with the given stream.
OPENVDB_API void setWriteGridStatsMetadata(std::ios_base &, bool writeGridStats)
Specify whether to compute grid statistics (active voxel count and bounding box, etc....
std::string getErrorString()
Return a string (possibly empty) describing the most recent system error.
OPENVDB_API uint32_t getFormatVersion(std::ios_base &)
Return the file format version number associated with the given input stream.
#define OPENVDB_VERSION_NAME
The version namespace name for this library version.
Definition: version.h:136
OPENVDB_API bool getHalfFloat(std::ios_base &)
Return true if floating-point values should be quantized to 16 bits when writing to the given stream ...
OPENVDB_API void setGridClass(std::ios_base &, uint32_t)
Associate with the given stream the class (GRID_LEVEL_SET, GRID_UNKNOWN, etc.) of the grid currently ...
OPENVDB_API void setCurrentVersion(std::istream &)
Associate the current file format and library version numbers with the given input stream.
OPENVDB_API std::string getVersion(std::ios_base &)
Return a string of the form "<major>.<minor>/<format>", giving the library and file format version nu...
OPENVDB_API SharedPtr< StreamMetadata > clearStreamMetadataPtr(std::ios_base &)
Dissociate the given stream from its metadata object (if it has one) and return a shared pointer to t...
Definition: Exceptions.h:40
std::ostream & operator<<(std::ostream &, const StreamMetadata::AuxDataMap &)
Library and file format version numbers.
OPENVDB_API SharedPtr< MappedFile > getMappedFilePtr(std::ios_base &)
Return a shared pointer to the memory-mapped file with which the given stream is associated,...
Definition: version.h:244
std::shared_ptr< T > SharedPtr
Definition: Types.h:139
OPENVDB_API VersionId getLibraryVersion(std::ios_base &)
Return the (major, minor) library version number associated with the given input stream.
OPENVDB_API const void * getGridBackgroundValuePtr(std::ios_base &)
Return a pointer to the background value of the grid currently being read from or written to the give...
OPENVDB_API void setDataCompression(std::ios_base &, uint32_t compressionFlags)
Associate with the given stream a bitwise OR of compression option flags (COMPRESS_ZIP,...
OPENVDB_API bool getWriteGridStatsMetadata(std::ios_base &)
Return true if grid statistics (active voxel count and bounding box, etc.) should be computed and sto...
OPENVDB_API uint32_t getDataCompression(std::ios_base &)
Return a bitwise OR of compression option flags (COMPRESS_ZIP, COMPRESS_ACTIVE_MASK,...
OPENVDB_API void setHalfFloat(std::ios_base &, bool)
Specify whether floating-point values should be quantized to 16 bits when writing to the given stream...
#define OPENVDB_USE_VERSION_NAMESPACE
Definition: version.h:188
Leaf nodes that require multi-pass I/O must inherit from this struct.
Definition: io.h:140
Handle to control the lifetime of a memory-mapped .vdb file.
Definition: io.h:149
OPENVDB_API void setGridBackgroundValuePtr(std::ios_base &, const void *background)
Specify (a pointer to) the background value of the grid currently being read from or written to the g...