Go to the documentation of this file.
4 #ifndef OPENVDB_IO_ARCHIVE_HAS_BEEN_INCLUDED
5 #define OPENVDB_IO_ARCHIVE_HAS_BEEN_INCLUDED
13 #include <boost/uuid/uuid.hpp>
159 std::ostream&,
bool seekable)
const;
176 friend class ::TestFile;
179 uint32_t mFileVersion;
183 mutable boost::uuids::uuid mUuid;
186 bool mInputHasGridOffsets;
189 bool mEnableInstancing;
191 uint32_t mCompression;
193 bool mEnableGridStats;
200 #endif // OPENVDB_IO_ARCHIVE_HAS_BEEN_INCLUDED
static void readGrid(GridBase::Ptr, const GridDescriptor &, std::istream &, const BBoxd &)
Populate the given grid from the input stream, but only where it intersects the given world-space bou...
void setInputHasGridOffsets(bool b)
Definition: Archive.h:106
std::string getUniqueTag() const
Return the UUID that was most recently written (or read, if no UUID has been written yet).
bool isIdentical(const std::string &uuidStr) const
Return true if the given UUID matches this archive's UUID.
Archive & operator=(const Archive &)=default
static int32_t readGridCount(std::istream &)
Read in and return the number of grids on the input stream.
std::vector< GridBase::ConstPtr > GridCPtrVec
Definition: Grid.h:514
Grid serializer/unserializer.
Definition: Archive.h:33
static bool hasBloscCompression()
Return true if the OpenVDB library includes support for the Blosc compressor.
void setLibraryVersion(std::istream &)
Tag the given input stream with the version number of the library with which the input stream was cre...
void setInstancingEnabled(bool b)
Specify whether trees shared by multiple grids should be written out only once (true) or once per gri...
Definition: Archive.h:69
void setDataCompression(std::istream &)
Tag the given input stream with flags indicating whether the input stream contains compressed data an...
void setGridCompression(std::ostream &, const GridBase &) const
Tag an output stream with flags specifying only those compression options that are applicable to the ...
uint32_t compression() const
Return a bit mask specifying compression options for the data stream.
Definition: Archive.h:78
uint32_t fileVersion() const
Return the file format version number of the input stream.
Definition: Archive.h:55
bool inputHasGridOffsets() const
Return true if the input stream contains grid offsets that allow for random access or partial reading...
Definition: Archive.h:105
std::string version() const
Return a string of the form "<major>.<minor>/<format>", giving the library and file format version nu...
Library and file format version numbers.
Axis-aligned bounding box of signed integer coordinates.
Definition: Coord.h:249
std::string Name
Definition: Name.h:17
Archive(const Archive &)=default
static void readGrid(GridBase::Ptr, const GridDescriptor &, std::istream &, const CoordBBox &)
Populate the given grid from the input stream, but only where it intersects the given index-space bou...
Abstract base class for typed grids.
Definition: Grid.h:78
std::vector< GridBase::Ptr > GridPtrVec
Definition: Grid.h:509
void setCompression(uint32_t c)
Specify whether and how the data stream should be compressed.
Definition: Archive.h:83
VersionId libraryVersion() const
Return the (major, minor) version number of the library that was used to write the input stream.
Definition: Archive.h:58
void writeHeader(std::ostream &, bool seekable) const
Write the magic number, version numbers, UUID, etc. to the given output stream.
bool isGridStatsMetadataEnabled() const
Return true if grid statistics (active voxel count and bounding box, etc.) are computed and written a...
Definition: Archive.h:87
static void readGrid(GridBase::Ptr, const GridDescriptor &, std::istream &)
Populate the given grid from the input stream.
static bool isDelayedLoadingEnabled()
Return true if delayed loading is enabled.
SharedPtr< const GridBase > ConstPtr
Definition: Grid.h:81
Definition: version.h:203
bool isInstancingEnabled() const
Return true if trees shared by multiple grids are written out only once, false if they are written ou...
Definition: Archive.h:65
virtual Ptr copy() const
Return a copy of this archive.
#define OPENVDB_USE_VERSION_NAMESPACE
Definition: version.h:147
Definition: GridDescriptor.h:20
std::map< Name, GridBase::Ptr > NamedGridMap
Definition: Archive.h:144
void setFormatVersion(std::istream &)
Tag the given input stream with the input file format version number.
static bool hasZLibCompression()
Return true if the OpenVDB library includes support for the ZLib compressor.
bool readHeader(std::istream &)
Read the magic number, version numbers, UUID, etc. from the given input stream.
void writeGrid(GridDescriptor &, GridBase::ConstPtr, std::ostream &, bool seekable) const
#define OPENVDB_VERSION_NAME
The version namespace name for this library version.
Definition: version.h:95
void write(std::ostream &, const GridCPtrVec &, bool seekable, const MetaMap &=MetaMap()) const
SharedPtr< const Archive > ConstPtr
Definition: Archive.h:36
void writeGridInstance(GridDescriptor &, GridBase::ConstPtr, std::ostream &, bool seekable) const
std::shared_ptr< T > SharedPtr
Definition: openvdb/Types.h:92
void setGridStatsMetadataEnabled(bool b)
Specify whether grid statistics (active voxel count and bounding box, etc.) should be computed and wr...
Definition: Archive.h:90
Definition: openvdb/Exceptions.h:13
void connectInstance(const GridDescriptor &, const NamedGridMap &) const
If the grid represented by the given grid descriptor is an instance, connect it with its instance par...
static const uint32_t DEFAULT_COMPRESSION_FLAGS
Definition: Archive.h:38
virtual void write(const GridCPtrVec &, const MetaMap &=MetaMap()) const
Write the grids in the given container to this archive's output stream.
Definition: Archive.h:93
SharedPtr< Archive > Ptr
Definition: Archive.h:35
SharedPtr< GridBase > Ptr
Definition: Grid.h:80
static void readGridCompression(std::istream &)
Read in the compression flags for a grid and tag the given input stream with those flags.