Panda3D
Public Member Functions | Public Attributes | Protected Member Functions
VertexDataSaveFile Class Reference

A temporary file to hold the vertex data that has been evicted from memory and written to disk. More...

#include "vertexDataSaveFile.h"

Inheritance diagram for VertexDataSaveFile:
SimpleAllocator LinkedListNode

List of all members.

Public Member Functions

 VertexDataSaveFile (const Filename &directory, const string &prefix, size_t max_size)
size_t get_total_file_size () const
 Returns the amount of space consumed by the save file, including unused portions.
size_t get_used_file_size () const
 Returns the amount of space within the save file that is currently in use.
bool is_valid () const
 Returns true if the save file was successfully created and is ready for use, false if there was an error.
 PT (VertexDataSaveBlock) write_data(const unsigned char *data
bool read_data (unsigned char *data, size_t size, VertexDataSaveBlock *block)
 Reads a block of data from the file, and returns true on success, false on failure.

Public Attributes

size_t bool compressed
size_t size

Protected Member Functions

virtual SimpleAllocatorBlockmake_block (size_t start, size_t size)
 Creates a new SimpleAllocatorBlock object.

Detailed Description

A temporary file to hold the vertex data that has been evicted from memory and written to disk.

All vertex data arrays are written into one large flat file.

Definition at line 37 of file vertexDataSaveFile.h.


Member Function Documentation

size_t VertexDataSaveFile::get_total_file_size ( ) const [inline]

Returns the amount of space consumed by the save file, including unused portions.

Definition at line 35 of file vertexDataSaveFile.I.

Referenced by GraphicsEngine::render_frame().

size_t VertexDataSaveFile::get_used_file_size ( ) const [inline]

Returns the amount of space within the save file that is currently in use.

Definition at line 46 of file vertexDataSaveFile.I.

References SimpleAllocator::get_total_size().

Referenced by GraphicsEngine::render_frame().

bool VertexDataSaveFile::is_valid ( ) const [inline]

Returns true if the save file was successfully created and is ready for use, false if there was an error.

Definition at line 24 of file vertexDataSaveFile.I.

SimpleAllocatorBlock * VertexDataSaveFile::make_block ( size_t  start,
size_t  size 
) [protected, virtual]

Creates a new SimpleAllocatorBlock object.

Override this function to specialize the block type returned.

Reimplemented from SimpleAllocator.

Definition at line 356 of file vertexDataSaveFile.cxx.

bool VertexDataSaveFile::read_data ( unsigned char *  data,
size_t  size,
VertexDataSaveBlock block 
)

The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations