OpenVDB: PagedOutputStream Class Reference

OpenVDB 6.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)
PagedOutputStream & | write (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

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

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

- StreamCompression.h