HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
openvdb::OPENVDB_VERSION_NAME::compression::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 <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.

Definition at line 206 of file StreamCompression.h.

Member Typedef Documentation

Constructor & Destructor Documentation

openvdb::OPENVDB_VERSION_NAME::compression::PagedInputStream::PagedInputStream ( )
default
openvdb::OPENVDB_VERSION_NAME::compression::PagedInputStream::PagedInputStream ( std::istream &  is)
explicit

Member Function Documentation

PageHandle::Ptr openvdb::OPENVDB_VERSION_NAME::compression::PagedInputStream::createHandle ( std::streamsize  n)

Creates a PageHandle to access the next.

Parameters
nbytes of the Page.
std::istream& openvdb::OPENVDB_VERSION_NAME::compression::PagedInputStream::getInputStream ( )
inline

Definition at line 220 of file StreamCompression.h.

void openvdb::OPENVDB_VERSION_NAME::compression::PagedInputStream::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 openvdb::OPENVDB_VERSION_NAME::compression::PagedInputStream::setInputStream ( std::istream &  is)
inline

Definition at line 221 of file StreamCompression.h.

void openvdb::OPENVDB_VERSION_NAME::compression::PagedInputStream::setSizeOnly ( bool  sizeOnly)
inline

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

Definition at line 216 of file StreamCompression.h.

bool openvdb::OPENVDB_VERSION_NAME::compression::PagedInputStream::sizeOnly ( ) const
inline

Definition at line 217 of file StreamCompression.h.


The documentation for this class was generated from the following file: