HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
openvdb::OPENVDB_VERSION_NAME::compression::PagedOutputStream Class Reference

A Paging wrapper to std::ostream that is responsible for writing from a given output stream at intervals set by the PageSize. As Pages are variable in size, they are flushed to disk as soon as sufficiently large. More...

#include <StreamCompression.h>

Public Types

using Ptr = std::shared_ptr< PagedOutputStream >
 

Public Member Functions

 PagedOutputStream ()
 
 PagedOutputStream (std::ostream &os)
 
void setSizeOnly (bool sizeOnly)
 Size-only mode tags the stream as only writing size data. More...
 
bool sizeOnly () const
 
std::ostream & getOutputStream ()
 Set and get the output stream. More...
 
void setOutputStream (std::ostream &os)
 
PagedOutputStreamwrite (const char *str, std::streamsize n)
 Writes the given. More...
 
void flush ()
 Manually flushes the current page to disk if non-zero. More...
 

Detailed Description

A Paging wrapper to std::ostream that is responsible for writing from a given output stream at intervals set by the PageSize. As Pages are variable in size, they are flushed to disk as soon as sufficiently large.

Definition at line 262 of file StreamCompression.h.

Member Typedef Documentation

Constructor & Destructor Documentation

openvdb::OPENVDB_VERSION_NAME::compression::PagedOutputStream::PagedOutputStream ( )
openvdb::OPENVDB_VERSION_NAME::compression::PagedOutputStream::PagedOutputStream ( std::ostream &  os)
explicit

Member Function Documentation

void openvdb::OPENVDB_VERSION_NAME::compression::PagedOutputStream::flush ( )

Manually flushes the current page to disk if non-zero.

std::ostream& openvdb::OPENVDB_VERSION_NAME::compression::PagedOutputStream::getOutputStream ( )
inline

Set and get the output stream.

Definition at line 276 of file StreamCompression.h.

void openvdb::OPENVDB_VERSION_NAME::compression::PagedOutputStream::setOutputStream ( std::ostream &  os)
inline

Definition at line 277 of file StreamCompression.h.

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

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

Definition at line 272 of file StreamCompression.h.

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

Definition at line 273 of file StreamCompression.h.

PagedOutputStream& openvdb::OPENVDB_VERSION_NAME::compression::PagedOutputStream::write ( const char *  str,
std::streamsize  n 
)

Writes the given.

Parameters
strbuffer of size
n

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