Panda3D
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
VertexDataBook Class Reference

A collection of VertexDataPages, which can be used to allocate new VertexDataBlock objects. More...

#include "vertexDataBook.h"

Public Member Functions

 VertexDataBook (size_t block_size)
 
VertexDataBlockalloc (size_t size)
 Allocates and returns a new VertexDataBuffer of the requested size.
 
size_t count_allocated_size () const
 Returns the total size of all bytes allocated within pages owned by this book.
 
size_t count_allocated_size (VertexDataPage::RamClass ram_class) const
 Returns the total size of all bytes allocated within pages owned by this book that have the indicated ram class.
 
size_t count_total_page_size () const
 Returns the total size of all bytes owned by all pages owned by this book.
 
size_t count_total_page_size (VertexDataPage::RamClass ram_class) const
 Returns the total size of all bytes owned by all pages owned by this book that have the indicated ram class.
 
size_t get_num_pages () const
 Returns the number of pages created for the book.
 
void reorder_page (VertexDataPage *page)
 
void save_to_disk ()
 Writes all pages to disk immediately, just in case they get evicted later.
 

Friends

class VertexDataPage
 

Detailed Description

A collection of VertexDataPages, which can be used to allocate new VertexDataBlock objects.

Definition at line 30 of file vertexDataBook.h.

Constructor & Destructor Documentation

◆ VertexDataBook()

VertexDataBook::VertexDataBook ( size_t block_size)
explicit

Definition at line 20 of file vertexDataBook.cxx.

◆ ~VertexDataBook()

VertexDataBook::~VertexDataBook ( )

Definition at line 30 of file vertexDataBook.cxx.

Member Function Documentation

◆ alloc()

VertexDataBlock * VertexDataBook::alloc ( size_t size)
inline

Allocates and returns a new VertexDataBuffer of the requested size.

Definition at line 17 of file vertexDataBook.I.

◆ count_allocated_size() [1/2]

size_t VertexDataBook::count_allocated_size ( ) const

Returns the total size of all bytes allocated within pages owned by this book.

Definition at line 71 of file vertexDataBook.cxx.

◆ count_allocated_size() [2/2]

size_t VertexDataBook::count_allocated_size ( VertexDataPage::RamClass ram_class) const

Returns the total size of all bytes allocated within pages owned by this book that have the indicated ram class.

Definition at line 87 of file vertexDataBook.cxx.

◆ count_total_page_size() [1/2]

size_t VertexDataBook::count_total_page_size ( ) const

Returns the total size of all bytes owned by all pages owned by this book.

Definition at line 37 of file vertexDataBook.cxx.

◆ count_total_page_size() [2/2]

size_t VertexDataBook::count_total_page_size ( VertexDataPage::RamClass ram_class) const

Returns the total size of all bytes owned by all pages owned by this book that have the indicated ram class.

Definition at line 53 of file vertexDataBook.cxx.

◆ get_num_pages()

size_t VertexDataBook::get_num_pages ( ) const
inline

Returns the number of pages created for the book.

Definition at line 26 of file vertexDataBook.I.

◆ save_to_disk()

void VertexDataBook::save_to_disk ( )

Writes all pages to disk immediately, just in case they get evicted later.

It makes sense to make this call just before taking down a loading screen, to minimize chugs from saving pages inadvertently later.

Definition at line 106 of file vertexDataBook.cxx.

Friends And Related Symbol Documentation

◆ VertexDataPage

friend class VertexDataPage
friend

Definition at line 60 of file vertexDataBook.h.


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