4#ifndef OPENVDB_IO_STREAM_HAS_BEEN_INCLUDED
5#define OPENVDB_IO_STREAM_HAS_BEEN_INCLUDED
29 explicit Stream(std::istream&,
bool delayLoad =
true);
56 template<
typename Gr
idPtrContainerT>
69 std::unique_ptr<Impl> mImpl;
76template<
typename Gr
idPtrContainerT>
81 std::copy(container.begin(), container.end(), std::back_inserter(grids));
82 this->
write(grids, metadata);
SharedPtr< GridBase > Ptr
Definition: Grid.h:80
Grid serializer/unserializer.
Definition: Archive.h:33
SharedPtr< Archive > Ptr
Definition: Archive.h:35
Definition: GridDescriptor.h:20
Grid archive associated with arbitrary input and output streams (not necessarily files)
Definition: Stream.h:22
Stream & operator=(const Stream &)
GridPtrVecPtr getGrids()
Return pointers to the grids that were read from the input stream.
void write(const GridCPtrVec &, const MetaMap &=MetaMap()) const override
Write the grids in the given container to this archive's output stream.
Stream()
Construct an archive for stream output.
Archive::Ptr copy() const override
Return a copy of this archive.
MetaMap::Ptr getMetadata() const
Return the file-level metadata in a newly created MetaMap.
Stream(std::ostream &)
Construct an archive for output to the given stream.
Stream(std::istream &, bool delayLoad=true)
Read grids from an input stream.
static fileSize_t write(std::ostream &os, const GridHandle< BufferT > &handle, Codec codec)
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)
Definition: IO.h:543
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
SharedPtr< GridPtrVec > GridPtrVecPtr
Definition: Grid.h:517
std::vector< GridBase::ConstPtr > GridCPtrVec
Definition: Grid.h:519
Definition: Exceptions.h:13
#define OPENVDB_VERSION_NAME
The version namespace name for this library version.
Definition: version.h.in:116
#define OPENVDB_USE_VERSION_NAMESPACE
Definition: version.h.in:202