00001 // Filename: vertexDataSaveFile.I00002 // Created by: drose (12May07)00003 //00004 ////////////////////////////////////////////////////////////////////00005 //00006 // PANDA 3D SOFTWARE00007 // Copyright (c) Carnegie Mellon University. All rights reserved.00008 //00009 // All use of this software is subject to the terms of the revised BSD00010 // license. You should have received a copy of this license along00011 // with this source code in a file named "LICENSE."00012 //00013 ////////////////////////////////////////////////////////////////////00014
00015
00016 ////////////////////////////////////////////////////////////////////00017 // Function: VertexDataSaveFile::is_valid00018 // Access: Public00019 // Description: Returns true if the save file was successfully00020 // created and is ready for use, false if there was an00021 // error.00022 ////////////////////////////////////////////////////////////////////00023 INLINE boolVertexDataSaveFile::00024is_valid() const {
00025 return _is_valid;
00026 }
00027
00028 ////////////////////////////////////////////////////////////////////00029 // Function: VertexDataSaveFile::get_total_file_size00030 // Access: Public00031 // Description: Returns the amount of space consumed by the save00032 // file, including unused portions.00033 ////////////////////////////////////////////////////////////////////00034 INLINE size_tVertexDataSaveFile::00035get_total_file_size() const {
00036 return _total_file_size;
00037 }
00038
00039 ////////////////////////////////////////////////////////////////////00040 // Function: VertexDataSaveFile::get_used_file_size00041 // Access: Public00042 // Description: Returns the amount of space within the save file that00043 // is currently in use.00044 ////////////////////////////////////////////////////////////////////00045 INLINE size_tVertexDataSaveFile::00046get_used_file_size() const {
00047 returnSimpleAllocator::get_total_size();
00048 }
00049
00050
00051 ////////////////////////////////////////////////////////////////////00052 // Function: VertexDataSaveBlock::Constructor00053 // Access: Public00054 // Description: 00055 ////////////////////////////////////////////////////////////////////00056 INLINE VertexDataSaveBlock::
00057 VertexDataSaveBlock(VertexDataSaveFile *file, size_t start, size_t size) :
00058 SimpleAllocatorBlock(file, start, size)
00059 {
00060 }
00061
00062 ////////////////////////////////////////////////////////////////////00063 // Function: VertexDataSaveBlock::set_compressed00064 // Access: Public00065 // Description: Sets the compressed flag. This is true to indicate00066 // the data is written in zlib-compressed form to the00067 // save file; false to indicate the data is00068 // uncompressed.00069 ////////////////////////////////////////////////////////////////////00070 INLINE voidVertexDataSaveBlock::00071set_compressed(bool compressed) {
00072 _compressed = compressed;
00073 }
00074
00075 ////////////////////////////////////////////////////////////////////00076 // Function: VertexDataSaveBlock::get_compressed00077 // Access: Public00078 // Description: Returns the compressed flag. This is true to00079 // indicate the data is written in zlib-compressed form00080 // to the save file; false to indicate the data is00081 // uncompressed.00082 ////////////////////////////////////////////////////////////////////00083 INLINE boolVertexDataSaveBlock::00084get_compressed() const {
00085 return _compressed;
00086 }