@@ -448,23 +448,23 @@ class OPENVDB_API GridBase: public MetaMap
448448
449449 // / @brief Read the grid topology from a stream.
450450 // / This will read only the grid structure, not the actual data buffers.
451- virtual void readTopology (std::istream&) = 0 ;
451+ virtual void readTopology (std::istream&) = OPENVDB_TREE_IO_VIRTUAL ;
452452 // / @brief Write the grid topology to a stream.
453453 // / This will write only the grid structure, not the actual data buffers.
454- virtual void writeTopology (std::ostream&) const = 0 ;
454+ virtual void writeTopology (std::ostream&) const = OPENVDB_TREE_IO_VIRTUAL ;
455455
456456 // / Read all data buffers for this grid.
457- virtual void readBuffers (std::istream&) = 0 ;
457+ virtual void readBuffers (std::istream&) = OPENVDB_TREE_IO_VIRTUAL ;
458458 // / Read all of this grid's data buffers that intersect the given index-space bounding box.
459- virtual void readBuffers (std::istream&, const CoordBBox&) = 0 ;
459+ virtual void readBuffers (std::istream&, const CoordBBox&) = OPENVDB_TREE_IO_VIRTUAL ;
460460
461461#if OPENVDB_ABI_VERSION_NUMBER < 14
462462 OPENVDB_DEPRECATED_MESSAGE (" This method is deprecated and will be removed. Delayed loading is no longer supported." )
463463 virtual void readNonresidentBuffers() const = 0;
464464#endif
465465
466466 // / Write out all data buffers for this grid.
467- virtual void writeBuffers (std::ostream&) const = 0 ;
467+ virtual void writeBuffers (std::ostream&) const = OPENVDB_TREE_IO_VIRTUAL ;
468468
469469 // / Read in the transform for this grid.
470470 void readTransform (std::istream& is) { transform ().read (is); }
@@ -928,6 +928,7 @@ class Grid: public GridBase
928928 // / @name I/O
929929 // / @{
930930
931+ #ifdef OPENVDB_ENABLE_TREE_IO
931932 // / @brief Read the grid topology from a stream.
932933 // / This will read only the grid structure, not the actual data buffers.
933934 void readTopology (std::istream&) override ;
@@ -939,14 +940,17 @@ class Grid: public GridBase
939940 void readBuffers (std::istream&) override ;
940941 // / Read all of this grid's data buffers that intersect the given index-space bounding box.
941942 void readBuffers (std::istream&, const CoordBBox&) override ;
943+ #endif // OPENVDB_ENABLE_TREE_IO
942944
943945#if OPENVDB_ABI_VERSION_NUMBER < 14
944946 OPENVDB_DEPRECATED_MESSAGE (" This method is deprecated and will be removed. Delayed loading is no longer supported." )
945947 void readNonresidentBuffers() const override { }
946948#endif
947949
950+ #ifdef OPENVDB_ENABLE_TREE_IO
948951 // / Write out all data buffers for this grid.
949952 void writeBuffers (std::ostream&) const override ;
953+ #endif // OPENVDB_ENABLE_TREE_IO
950954
951955 // / Output a human-readable description of this grid.
952956 void print (std::ostream& = std::cout, int verboseLevel = 1 ) const override ;
@@ -1625,6 +1629,8 @@ Grid<TreeT>::evalActiveVoxelDim() const
16251629// / @internal Consider using the stream tagging mechanism (see io::Archive)
16261630// / to specify the float precision, but note that the setting is per-grid.
16271631
1632+ #ifdef OPENVDB_ENABLE_TREE_IO
1633+
16281634template <typename TreeT>
16291635inline void
16301636Grid<TreeT>::readTopology(std::istream& is)
@@ -1717,6 +1723,8 @@ Grid<TreeT>::writeBuffers(std::ostream& os) const
17171723 }
17181724}
17191725
1726+ #endif // OPENVDB_ENABLE_TREE_IO
1727+
17201728
17211729// static
17221730template <typename TreeT>
0 commit comments