6 #ifndef OPENVDB_IO_FILE_HAS_BEEN_INCLUDED
7 #define OPENVDB_IO_FILE_HAS_BEEN_INCLUDED
33 using NameMap = std::multimap<Name, GridDescriptor>;
57 #ifdef OPENVDB_USE_DELAYED_LOADING
67 bool open(
bool delayLoad =
true,
const MappedFile::Notifier& = MappedFile::Notifier());
69 bool open(
bool =
false);
82 #ifdef OPENVDB_USE_DELAYED_LOADING
101 bool hasGrid(
const Name&)
const;
134 template<
typename Gr
idPtrContainerT>
160 NameIterator beginName()
const;
163 NameIterator endName()
const;
167 void readGridDescriptors(std::istream&);
171 NameMapCIter findDescriptor(
const Name&)
const;
194 void readGridPartial(
GridBase::Ptr, std::istream&,
bool isInstance,
bool readTopology)
const;
206 const NameMap& gridDescriptors()
const;
207 NameMap& gridDescriptors();
209 std::istream& inputStream()
const;
211 friend class ::TestFile;
212 friend class ::TestStream;
215 std::unique_ptr<Impl> mImpl;
225 this->writeGrids(grids, meta);
229 template<
typename Gr
idPtrContainerT>
234 std::copy(container.begin(), container.end(), std::back_inserter(grids));
235 this->writeGrids(grids, meta);
242 #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
GLsizei const GLchar *const * string
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::shared_ptr< T > SharedPtr
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...