OpenVDB 13.0.0

Loading...
Searching...
No Matches
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 <openvdb/points/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.
bool | sizeOnly () const
std::ostream & | getOutputStream ()
| Set and get the output stream.
void | setOutputStream (std::ostream &os)
PagedOutputStream & | write (const char *str, std::streamsize n)
| Writes the given.
void | flush ()
| Manually flushes the current page to disk if non-zero.

## 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

## ◆ Ptr

using Ptr = std::shared_ptr<PagedOutputStream>

## Constructor & Destructor Documentation

## ◆ PagedOutputStream() [1/2]

PagedOutputStream | ( |  | ) |

## ◆ PagedOutputStream() [2/2]

PagedOutputStream | ( | std::ostream & | os | ) |
| explicit

## Member Function Documentation

## ◆ flush()

void flush | ( |  | ) |

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

## ◆ getOutputStream()

std::ostream & getOutputStream | ( |  | ) |
| inline

Set and get the output stream.

## ◆ setOutputStream()

void setOutputStream | ( | std::ostream & | os | ) |
| inline

## ◆ setSizeOnly()

void setSizeOnly | ( | bool | sizeOnly | ) |
| inline

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

## ◆ sizeOnly()

bool sizeOnly | ( |  | ) | const
| inline

## ◆ write()

PagedOutputStream & write | ( | const char * | str,
|  | std::streamsize | n )

Writes the given.

Parameters

  str | buffer of size
  n |