OpenVDB  12.0.0
Public Types | Public Member Functions | List of all members
PagedInputStream Class Reference

A Paging wrapper to std::istream that is responsible for reading from a given input stream and creating Page objects and PageHandles that reference those pages for delayed reading. More...

#include <openvdb/points/StreamCompression.h>

Public Types

using Ptr = std::shared_ptr< PagedInputStream >
 

Public Member Functions

 PagedInputStream ()=default
 
 PagedInputStream (std::istream &is)
 
void setSizeOnly (bool sizeOnly)
 Size-only mode tags the stream as only reading size data. More...
 
bool sizeOnly () const
 
std::istream & getInputStream ()
 
void setInputStream (std::istream &is)
 
PageHandle::Ptr createHandle (std::streamsize n)
 Creates a PageHandle to access the next. More...
 
void read (PageHandle::Ptr &pageHandle, std::streamsize n, bool delayed=true)
 Takes a pageHandle and updates the referenced page with the current stream pointer position and if delayed is false performs an immediate read of the data. More...
 

Detailed Description

A Paging wrapper to std::istream that is responsible for reading from a given input stream and creating Page objects and PageHandles that reference those pages for delayed reading.

Member Typedef Documentation

using Ptr = std::shared_ptr<PagedInputStream>

Constructor & Destructor Documentation

PagedInputStream ( )
default
PagedInputStream ( std::istream &  is)
explicit

Member Function Documentation

PageHandle::Ptr createHandle ( std::streamsize  n)

Creates a PageHandle to access the next.

Parameters
nbytes of the Page.
std::istream& getInputStream ( )
inline
void read ( PageHandle::Ptr pageHandle,
std::streamsize  n,
bool  delayed = true 
)

Takes a pageHandle and updates the referenced page with the current stream pointer position and if delayed is false performs an immediate read of the data.

void setInputStream ( std::istream &  is)
inline
void setSizeOnly ( bool  sizeOnly)
inline

Size-only mode tags the stream as only reading size data.

bool sizeOnly ( ) const
inline