Panda3D
Public Member Functions

VertexDataSaveFile Class Reference

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

Inheritance diagram for VertexDataSaveFile:
SimpleAllocator LinkedListNode

List of all members.

Public Member Functions

SimpleAllocatorBlock alloc (unsigned int size)
 Allocates a new block.
unsigned int getContiguous ()
 Returns an upper-bound estimate of the size of the largest contiguous block that may be allocated.
SimpleAllocatorBlock getFirstBlock ()
 Returns a pointer to the first allocated block, or NULL if there are no allocated blocks.
unsigned int getMaxSize ()
 Returns the available space for allocated objects.
unsigned int getTotalFileSize ()
 Returns the amount of space consumed by the save file, including unused portions.
unsigned int getTotalSize ()
 Returns the total size of allocated objects.
unsigned int getUsedFileSize ()
 Returns the amount of space within the save file that is currently in use.
bool isEmpty ()
 Returns true if there are no blocks allocated on this page, or false if there is at least one.
bool isValid ()
 Returns true if the save file was successfully created and is ready for use, false if there was an error.
 output (ostream out)
 setMaxSize (unsigned int max_size)
 Changes the available space for allocated objects.
 write (ostream out)

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.


Member Function Documentation

SimpleAllocatorBlock alloc ( unsigned int  size) [inherited]

Allocates a new block.

Returns NULL if a block of the requested size cannot be allocated.

To free the allocated block, call block->free(), or simply delete the block pointer.

Reimplemented in VertexDataPage.

unsigned int getContiguous ( ) [inherited]

Returns an upper-bound estimate of the size of the largest contiguous block that may be allocated.

It is guaranteed that an attempt to allocate a block larger than this will fail, though it is not guaranteed that an attempt to allocate a block this size or smaller will succeed.

SimpleAllocatorBlock getFirstBlock ( ) [inherited]

Returns a pointer to the first allocated block, or NULL if there are no allocated blocks.

Reimplemented in VertexDataPage.

unsigned int getMaxSize ( ) [inherited]

Returns the available space for allocated objects.

unsigned int getTotalFileSize ( )

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

unsigned int getTotalSize ( ) [inherited]

Returns the total size of allocated objects.

unsigned int getUsedFileSize ( )

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

bool isEmpty ( ) [inherited]

Returns true if there are no blocks allocated on this page, or false if there is at least one.

bool isValid ( )

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

output ( ostream  out) [inherited]

Reimplemented in VertexDataPage.

setMaxSize ( unsigned int  max_size) [inherited]

Changes the available space for allocated objects.

This will not affect any already-allocated objects, but will have an effect on future calls to alloc().

write ( ostream  out) [inherited]
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties