# VertexDataSaveFile

from pandac.PandaModules import VertexDataSaveFile

Class : VertexDataSaveFile
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.

## Inheritance:

VertexDataSaveFile: SimpleAllocator
SimpleAllocator: LinkedListNode
LinkedListNode:

## Methods of VertexDataSaveFile:

getTotalFileSize
getUsedFileSize
isValid

## Methods of SimpleAllocator:

alloc
getContiguous
getFirstBlock
getMaxSize
getTotalSize
isEmpty
output
setMaxSize
write

getTotalFileSize unsigned int VertexDataSaveFile::get_total_file_size(void) const; Description: Returns the amount of space consumed by the save file, including unused portions.

getUsedFileSize unsigned int VertexDataSaveFile::get_used_file_size(void) const; Description: Returns the amount of space within the save file that is currently in use.

isValid bool VertexDataSaveFile::is_valid(void) const; Filename: vertexDataSaveFile.I Created by: drose (12May07) PANDA 3D SOFTWARE Copyright (c) 2001 - 2004, Disney Enterprises, Inc. All rights reserved All use of this software is subject to the terms of the Panda 3d Software license. You should have received a copy of this license along with this source code; you will also find a current copy of the license at http://etc.cmu.edu/panda3d/docs/license/ . To contact the maintainers of this program write to panda3d-general@lists.sourceforge.net . Description: Returns true if the save file was successfully created and is ready for use, false if there was an error.

alloc SimpleAllocatorBlock *SimpleAllocator::alloc(unsigned int size); Description: 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.

getContiguous unsigned int SimpleAllocator::get_contiguous(void) const; Description: 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.

getFirstBlock SimpleAllocatorBlock *SimpleAllocator::get_first_block(void) const; Description: Returns a pointer to the first allocated block, or NULL if there are no allocated blocks.

getMaxSize unsigned int SimpleAllocator::get_max_size(void) const; Description: Returns the available space for allocated objects.

getTotalSize unsigned int SimpleAllocator::get_total_size(void) const; Description: Returns the total size of allocated objects.

isEmpty bool SimpleAllocator::is_empty(void) const; Description: Returns true if there are no blocks allocated on this page, or false if there is at least one.

output void SimpleAllocator::output(ostream &out) const; Description:

setMaxSize void SimpleAllocator::set_max_size(unsigned int max_size); Description: 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 void SimpleAllocator::write(ostream &out) const; Description: