Panda3D
|
Public Member Functions | |
PT(MultifileRecord) get_multifile_record_named(std void | add_multifile_record (PT(MultifileRecord) mfr) |
std::string | get_multifile_name (int index) const |
int | get_num_multifiles () const |
bool | multifile_exists (std::string mfname) const |
int | parse_header (Datagram dg) |
Verifies magic number, returns the number of multifiles or -1 if invalid. More... | |
int | parse_record_header (Datagram dg) |
Parses a file record (fr) header and returns the length of the next file record. More... | |
PT (FileRecord) parse_fr(Datagram dg) | |
PT (MultifileRecord) parse_mfr(Datagram dg) | |
bool | read (StreamReader &sr, bool want_server_info) |
void | write (std::ostream &out) const |
bool | write (StreamWriter &sw, bool want_server_info) |
bool | write_bogus_header (StreamWriter &sw) |
Writes the bogus header uncompressed with platform- independent byte ordering. More... | |
bool | write_header (std::ostream &write_stream) |
Writes the header uncompressed with platform- independent byte ordering. More... | |
Public Attributes | |
Filename | _filename |
MultifileRecords | _mfile_records |
Definition at line 165 of file downloadDb.h.
DownloadDb::Db::Db | ( | ) |
Definition at line 512 of file downloadDb.cxx.
string DownloadDb::Db::get_multifile_name | ( | int | index | ) | const |
Definition at line 542 of file downloadDb.cxx.
int DownloadDb::Db::get_num_multifiles | ( | ) | const |
Definition at line 534 of file downloadDb.cxx.
bool DownloadDb::Db::multifile_exists | ( | std::string | mfname | ) | const |
Definition at line 550 of file downloadDb.cxx.
int DownloadDb::Db::parse_header | ( | Datagram | dg | ) |
Verifies magic number, returns the number of multifiles or -1 if invalid.
Definition at line 592 of file downloadDb.cxx.
References DatagramIterator::get_int32(), and DatagramIterator::get_uint32().
int DownloadDb::Db::parse_record_header | ( | Datagram | dg | ) |
Parses a file record (fr) header and returns the length of the next file record.
Definition at line 630 of file downloadDb.cxx.
References DatagramIterator::get_int32().
bool DownloadDb::Db::read | ( | StreamReader & | sr, |
bool | want_server_info | ||
) |
Definition at line 706 of file downloadDb.cxx.
void DownloadDb::Db::write | ( | std::ostream & | out | ) | const |
Definition at line 522 of file downloadDb.cxx.
bool DownloadDb::Db::write | ( | StreamWriter & | sw, |
bool | want_server_info | ||
) |
Definition at line 799 of file downloadDb.cxx.
bool DownloadDb::Db::write_bogus_header | ( | StreamWriter & | sw | ) |
Writes the bogus header uncompressed with platform- independent byte ordering.
This header will get overwritten with the real magic number as the last step in the write
Definition at line 878 of file downloadDb.cxx.
References StreamWriter::add_int32(), and StreamWriter::add_uint32().
bool DownloadDb::Db::write_header | ( | std::ostream & | write_stream | ) |
Writes the header uncompressed with platform- independent byte ordering.
Definition at line 892 of file downloadDb.cxx.
References Datagram::add_int32(), Datagram::add_uint32(), Datagram::get_data(), and Datagram::get_length().
Filename DownloadDb::Db::_filename |
Definition at line 180 of file downloadDb.h.
MultifileRecords DownloadDb::Db::_mfile_records |
Definition at line 181 of file downloadDb.h.