OpenVDB  7.0.0
Public Types | Public Member Functions | List of all members
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.

Member Typedef Documentation

using Ptr = std::shared_ptr<PagedOutputStream>

Constructor & Destructor Documentation

PagedOutputStream ( std::ostream &  os)
explicit

Member Function Documentation

void flush ( )

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

std::ostream& getOutputStream ( )
inline

Set and get the output stream.

void setOutputStream ( std::ostream &  os)
inline
void setSizeOnly ( bool  sizeOnly)
inline

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

bool sizeOnly ( ) const
inline
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: