4 #ifndef OPENVDB_IO_STREAM_HAS_BEEN_INCLUDED
5 #define OPENVDB_IO_STREAM_HAS_BEEN_INCLUDED
29 explicit Stream(std::istream&,
bool delayLoad =
true);
34 explicit Stream(std::ostream&);
56 template<
typename Gr
idPtrContainerT>
57 void write(
const GridPtrContainerT&,
const MetaMap& =
MetaMap())
const;
69 std::unique_ptr<Impl> mImpl;
76 template<
typename Gr
idPtrContainerT>
81 std::copy(container.begin(), container.end(), std::back_inserter(grids));
82 this->
write(grids, metadata);
89 #endif // OPENVDB_IO_STREAM_HAS_BEEN_INCLUDED
Grid serializer/unserializer.
SharedPtr< GridBase > Ptr
OIIO_UTIL_API bool copy(string_view from, string_view to, std::string &err)
void writeGrids(const std::string &fileName, const VecT< GridHandle< BufferT >> &handles, Codec codec=Codec::NONE, int verbose=0)
Write multiple grids to file (over-writing existing content of the file)
#define OPENVDB_USE_VERSION_NAMESPACE
void write(const GridCPtrVec &, const MetaMap &=MetaMap()) const override
Write the grids in the given container to this archive's output stream.
SharedPtr< GridPtrVec > GridPtrVecPtr
LeafData & operator=(const LeafData &)=delete
Grid archive associated with arbitrary input and output streams (not necessarily files) ...
std::vector< GridBase::ConstPtr > GridCPtrVec
#define OPENVDB_VERSION_NAME
The version namespace name for this library version.
GridHandle< BufferT > readGrid(const std::string &fileName, int n=0, int verbose=0, const BufferT &buffer=BufferT())
Read and return one or all grids from a file into a single GridHandle.