14#ifndef VERTEXDATASAVEFILE_H
15#define VERTEXDATASAVEFILE_H
23#ifndef WIN32_LEAN_AND_MEAN
24#define WIN32_LEAN_AND_MEAN 1
36class EXPCL_PANDA_GOBJ VertexDataSaveFile :
public SimpleAllocator {
38 VertexDataSaveFile(
const Filename &directory,
const std::string &prefix,
40 ~VertexDataSaveFile();
51 bool read_data(
unsigned char *data,
size_t size,
55 virtual SimpleAllocatorBlock *make_block(
size_t start,
size_t size);
60 size_t _total_file_size;
73class EXPCL_PANDA_GOBJ VertexDataSaveBlock :
public SimpleAllocatorBlock,
public ReferenceCount {
75 INLINE VertexDataSaveBlock(VertexDataSaveFile *file,
76 size_t start,
size_t size);
86 INLINE
unsigned char *get_pointer()
const;
88 friend class VertexDataSaveFile;
The name of a file, such as a texture file or an Egg file.
A standard mutex, or mutual exclusion lock.
A block of bytes on the save file.
void set_compressed(bool compressed)
Sets the compressed flag.
bool get_compressed() const
Returns the compressed flag.
bool is_valid() const
Returns true if the save file was successfully created and is ready for use, false if there was an er...
size_t get_total_file_size() const
Returns the amount of space consumed by the save file, including unused portions.
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.
size_t get_used_file_size() const
Returns the amount of space within the save file that is currently in use.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.