Go to the documentation of this file.
31 #ifndef OPENVDB_IO_STREAM_HAS_BEEN_INCLUDED
32 #define OPENVDB_IO_STREAM_HAS_BEEN_INCLUDED
56 explicit Stream(std::istream&,
bool delayLoad =
true);
83 template<
typename Gr
idPtrContainerT>
84 void write(
const GridPtrContainerT&,
const MetaMap& =
MetaMap())
const;
96 std::unique_ptr<Impl> mImpl;
103 template<
typename Gr
idPtrContainerT>
105 Stream::write(
const GridPtrContainerT& container,
const MetaMap& metadata)
const
108 std::copy(container.begin(), container.end(), std::back_inserter(grids));
109 this->write(grids, metadata);
116 #endif // OPENVDB_IO_STREAM_HAS_BEEN_INCLUDED
Grid serializer/unserializer.
Definition: Archive.h:60
Stream(std::ostream &)
Construct an archive for output to the given stream.
SharedPtr< Archive > Ptr
Definition: Archive.h:62
Stream()
Construct an archive for stream output.
std::vector< GridBase::ConstPtr > GridCPtrVec
Definition: Grid.h:442
GridPtrVecPtr getGrids()
Return pointers to the grids that were read from the input stream.
Archive::Ptr copy() const override
Return a copy of this archive.
#define OPENVDB_USE_VERSION_NAMESPACE
Definition: version.h:188
Grid archive associated with arbitrary input and output streams (not necessarily files)
Definition: Stream.h:49
SharedPtr< GridPtrVec > GridPtrVecPtr
Definition: Grid.h:440
void write(const GridCPtrVec &, const MetaMap &=MetaMap()) const override
Write the grids in the given container to this archive's output stream.
#define OPENVDB_VERSION_NAME
The version namespace name for this library version.
Definition: version.h:136
Definition: GridDescriptor.h:47
MetaMap::Ptr getMetadata() const
Return the file-level metadata in a newly created MetaMap.
SharedPtr< GridBase > Ptr
Definition: Grid.h:107
Stream & operator=(const Stream &)
Definition: Exceptions.h:40
Stream(std::istream &, bool delayLoad=true)
Read grids from an input stream.