6#ifndef OPENVDB_IO_FILE_HAS_BEEN_INCLUDED 
    7#define OPENVDB_IO_FILE_HAS_BEEN_INCLUDED 
    9#include <openvdb/version.h> 
   33    using NameMap = std::multimap<Name, GridDescriptor>;
 
   57#ifdef OPENVDB_USE_DELAYED_LOADING 
   67    bool open(
bool delayLoad = 
true, 
const MappedFile::Notifier& = MappedFile::Notifier());
 
   82#ifdef OPENVDB_USE_DELAYED_LOADING 
   97    void setCopyMaxBytes(
Index64 bytes);
 
  134    template<
typename Gr
idPtrContainerT>
 
  167    void readGridDescriptors(std::istream&);
 
  194    void readGridPartial(
GridBase::Ptr, std::istream&, 
bool isInstance, 
bool readTopology) 
const;
 
  206    const NameMap& gridDescriptors() 
const;
 
  209    std::istream& inputStream() 
const;
 
  211    friend class ::TestFile;
 
  212    friend class ::TestStream;
 
  215    std::unique_ptr<Impl> mImpl;
 
 
  225    this->writeGrids(grids, meta);
 
 
  229template<
typename Gr
idPtrContainerT>
 
  234    std::copy(container.begin(), container.end(), std::back_inserter(grids));
 
  235    this->writeGrids(grids, meta);
 
 
SharedPtr< const GridBase > ConstPtr
Definition Grid.h:81
SharedPtr< GridBase > Ptr
Definition Grid.h:80
NameIterator(const NameIterator &)=default
~NameIterator()
Definition File.h:144
Name operator*() const
Definition File.h:151
Name gridName() const
Definition File.h:153
bool operator!=(const NameIterator &iter) const
Definition File.h:149
NameIterator(const NameMapCIter &iter)
Definition File.h:142
NameIterator & operator++()
Definition File.h:146
bool operator==(const NameIterator &iter) const
Definition File.h:148
bool isOpen() const
Return true if the file has been opened for reading.
NameIterator endName() const
GridPtrVecPtr getGrids() const
Read the entire contents of the file and return a list of grid pointers.
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.
Definition File.h:223
bool hasGrid(const Name &) const
Return true if a grid of the given name exists in this file.
File(const std::string &filename)
const std::string & filename() const
Return the name of the file with which this archive is associated.
GridBase::Ptr readGrid(const Name &, const BBoxd &)
Read a grid, including its data blocks, but only where it intersects the given world-space bounding b...
void close()
Close the file once we are done reading from it.
NameMap::const_iterator NameMapCIter
Definition File.h:34
NameIterator beginName() const
GridBase::Ptr readGrid(const Name &)
Read an entire grid, including all of its data blocks.
File(const File &other)
Copy constructor.
File & operator=(const File &other)
Assignment.
MetaMap::Ptr getMetadata() const
Return (in a newly created MetaMap) the file-level metadata.
GridBase::Ptr readGridMetadata(const Name &)
Read a grid's metadata and transform only.
SharedPtr< Archive > copy() const override
Return a copy of this archive.
GridPtrVecPtr readAllGridMetadata()
Read just the grid metadata and transforms from the file and return a list of pointers to grids that ...
Index64 getSize() const
Return this file's current size on disk in bytes.
std::multimap< Name, GridDescriptor > NameMap
Definition File.h:33
Definition GridDescriptor.h:20
static std::string nameAsString(const Name &)
Given a name with suffix N, return "name[N]", otherwise just return "name". Use this to produce a hum...
Axis-aligned bounding box of signed integer coordinates.
Definition Coord.h:252
std::string Name
Definition Name.h:19
SharedPtr< GridPtrVec > GridPtrVecPtr
Definition Grid.h:511
math::BBox< Vec3d > BBoxd
Definition Types.h:84
uint64_t Index64
Definition Types.h:53
std::shared_ptr< T > SharedPtr
Definition Types.h:114
std::vector< GridBase::ConstPtr > GridCPtrVec
Definition Grid.h:513
Definition Exceptions.h:13
#define OPENVDB_VERSION_NAME
The version namespace name for this library version.
Definition version.h.in:121
#define OPENVDB_USE_VERSION_NAMESPACE
Definition version.h.in:218