4 #ifndef OPENVDB_IO_ARCHIVE_HAS_BEEN_INCLUDED 5 #define OPENVDB_IO_ARCHIVE_HAS_BEEN_INCLUDED 7 #include <openvdb/version.h> 12 #include <openvdb/version.h> 13 #include <boost/uuid/uuid.hpp> 46 virtual Ptr copy()
const;
50 std::string getUniqueTag()
const;
52 bool isIdentical(
const std::string& uuidStr)
const;
61 std::string version()
const;
72 static bool hasBloscCompression();
75 static bool hasZLibCompression();
100 static bool isDelayedLoadingEnabled();
112 void setFormatVersion(std::istream&);
119 void setLibraryVersion(std::istream&);
127 void setGridCompression(std::ostream&,
const GridBase&)
const;
130 static void readGridCompression(std::istream&);
133 static int32_t readGridCount(std::istream&);
159 std::ostream&,
bool seekable)
const;
163 bool readHeader(std::istream&);
167 void writeHeader(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
SharedPtr< const GridBase > ConstPtr
Definition: Grid.h:81
void setInputHasGridOffsets(bool b)
Definition: Archive.h:106
Abstract base class for typed grids.
Definition: Grid.h:77
SharedPtr< GridBase > Ptr
Definition: Grid.h:80
Definition: version.h.in:261
uint32_t compression() const
Return a bit mask specifying compression options for the data stream.
Definition: Archive.h:78
std::shared_ptr< T > SharedPtr
Definition: Types.h:114
static fileSize_t write(std::ostream &os, const GridHandle< BufferT > &handle, Codec codec)
SharedPtr< const Archive > ConstPtr
Definition: Archive.h:36
Grid serializer/unserializer.
Definition: Archive.h:32
BBox< Coord > CoordBBox
Definition: NanoVDB.h:1658
SharedPtr< Archive > Ptr
Definition: Archive.h:35
std::vector< GridBase::Ptr > GridPtrVec
Definition: Grid.h:514
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
std::map< Name, GridBase::Ptr > NamedGridMap
Definition: Archive.h:144
std::vector< GridBase::ConstPtr > GridCPtrVec
Definition: Grid.h:519
std::string Name
Definition: Name.h:17
void writeGrid(const std::string &fileName, const GridHandle< BufferT > &handle, Codec codec=Codec::NONE, int verbose=0)
Write a single grid to file (over-writing existing content of the file)
Definition: IO.h:515
bool inputHasGridOffsets() const
Return true if the input stream contains grid offsets that allow for random access or partial reading...
Definition: Archive.h:105
Definition: Exceptions.h:13
VersionId libraryVersion() const
Return the (major, minor) version number of the library that was used to write the input stream...
Definition: Archive.h:58
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
uint32_t fileVersion() const
Return the file format version number of the input stream.
Definition: Archive.h:55
static const uint32_t DEFAULT_COMPRESSION_FLAGS
Definition: Archive.h:38
OPENVDB_API void setDataCompression(std::ios_base &, uint32_t compressionFlags)
Associate with the given stream a bitwise OR of compression option flags (COMPRESS_ZIP, COMPRESS_ACTIVE_MASK, etc.) specifying whether and how input data is compressed or output data should be compressed.
GridHandle< BufferT > readGrid(const std::string &fileName, uint64_t n=0, int verbose=0, const BufferT &buffer=BufferT())
Read the n'th grid from file (defaults to first grid)
Definition: IO.h:576
#define OPENVDB_VERSION_NAME
The version namespace name for this library version.
Definition: version.h.in:116
void setGridStatsMetadataEnabled(bool b)
Specify whether grid statistics (active voxel count and bounding box, etc.) should be computed and wr...
Definition: Archive.h:90
bool isGridStatsMetadataEnabled() const
Return true if grid statistics (active voxel count and bounding box, etc.) are computed and written a...
Definition: Archive.h:87
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
#define OPENVDB_USE_VERSION_NAMESPACE
Definition: version.h.in:202
void setCompression(uint32_t c)
Specify whether and how the data stream should be compressed.
Definition: Archive.h:83
Definition: GridDescriptor.h:19