Loading...
Searching...
No Matches
PageHandle Class Reference

A PageHandle holds a unique ptr to a Page and a specific stream pointer to a point within the decompressed Page buffer. More...

`#include <openvdb/points/StreamCompression.h>`

## Public Types

using | Ptr = std::unique_ptr< PageHandle >

## Public Member Functions

| PageHandle (const Page::Ptr &page, const int index, const int size)
| Create the page handle.
Page & | page ()
| Retrieve a reference to the stored page.
int | size () const
| Return the size of the buffer.
std::unique_ptr< char[]> | read ()
| Read and return the buffer, loading and decompressing the Page if necessary.
Ptr | copy ()
| Return a copy of this PageHandle.

## Friends

class | ::TestStreamCompression

## Detailed Description

A PageHandle holds a unique ptr to a Page and a specific stream pointer to a point within the decompressed Page buffer.

## Member Typedef Documentation

## Ptr

using Ptr = std::unique_ptr<PageHandle>

## Constructor & Destructor Documentation

## PageHandle()

PageHandle | ( | const Page::Ptr & | page,
|  | const int | index,
|  | const int | size
| ) |  |

Create the page handle.

Parameters

  page | a shared ptr to the page that stores the buffer
  index | start position of the buffer to be read
  size | total size of the buffer to be read in bytes

## Member Function Documentation

## copy()

Ptr copy | ( |  | ) |

inline

Return a copy of this PageHandle.

## page()

Page & page | ( |  | ) |

Retrieve a reference to the stored page.

## read()

std::unique_ptr< char[]> read | ( |  | ) |

Read and return the buffer, loading and decompressing the Page if necessary.

## size()

int size | ( |  | ) | const

inline

Return the size of the buffer.

## Friends And Related Symbol Documentation

## ::TestStreamCompression

friend class ::TestStreamCompression

friend