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