6 #ifndef OPENVDB_IO_FILE_HAS_BEEN_INCLUDED
7 #define OPENVDB_IO_FILE_HAS_BEEN_INCLUDED
33 using NameMap = std::multimap<Name, GridDescriptor>;
95 bool hasGrid(
const Name&)
const;
128 template<
typename Gr
idPtrContainerT>
154 NameIterator beginName()
const;
157 NameIterator endName()
const;
161 void readGridDescriptors(std::istream&);
165 NameMapCIter findDescriptor(
const Name&)
const;
188 void readGridPartial(
GridBase::Ptr, std::istream&,
bool isInstance,
bool readTopology)
const;
200 const NameMap& gridDescriptors()
const;
201 NameMap& gridDescriptors();
203 std::istream& inputStream()
const;
205 friend class ::TestFile;
206 friend class ::TestStream;
209 std::unique_ptr<Impl> mImpl;
219 this->writeGrids(grids, meta);
223 template<
typename Gr
idPtrContainerT>
228 std::copy(container.begin(), container.end(), std::back_inserter(grids));
229 this->writeGrids(grids, meta);
236 #endif // OPENVDB_IO_FILE_HAS_BEEN_INCLUDED
Grid serializer/unserializer.
void write(const GridCPtrVec &, const MetaMap &=MetaMap()) const override
Write the grids in the given container to the file whose name was given in the constructor.
GT_API const UT_StringHolder filename
GridType::Ptr createGrid(const typename GridType::ValueType &background)
Create a new grid of type GridType with a given background value.
SharedPtr< GridBase > Ptr
OIIO_UTIL_API bool copy(string_view from, string_view to, std::string &err)
bool operator!=(const NameIterator &iter) const
Grid archive associated with a file on disk.
#define OPENVDB_USE_VERSION_NAMESPACE
NameMap::const_iterator NameMapCIter
NameIterator & operator++()
bool operator==(const NameIterator &iter) const
std::function< void(std::string)> Notifier
std::shared_ptr< T > SharedPtr
GLsizei const GLchar *const * string
NameIterator(const NameMapCIter &iter)
std::multimap< Name, GridDescriptor > NameMap
SharedPtr< GridPtrVec > GridPtrVecPtr
Library and file format version numbers.
SharedPtr< const GridBase > ConstPtr
void write(T &out, bool v)
std::vector< GridBase::ConstPtr > GridCPtrVec
#define OPENVDB_VERSION_NAME
The version namespace name for this library version.
static std::string nameAsString(const Name &)
Given a name with suffix N, return "name[N]", otherwise just return "name". Use this to produce a...