From b803511934854885c4e1ad40ad635a787c01dca0 Mon Sep 17 00:00:00 2001 From: David Rose Date: Tue, 19 Nov 2002 00:55:10 +0000 Subject: [PATCH] output -> write --- panda/src/downloader/downloadDb.cxx | 34 +++++++++++++++++++---------- panda/src/downloader/downloadDb.h | 9 ++++---- 2 files changed, 27 insertions(+), 16 deletions(-) diff --git a/panda/src/downloader/downloadDb.cxx b/panda/src/downloader/downloadDb.cxx index 7197e266e6..caf07af2b7 100644 --- a/panda/src/downloader/downloadDb.cxx +++ b/panda/src/downloader/downloadDb.cxx @@ -110,17 +110,27 @@ DownloadDb:: //////////////////////////////////////////////////////////////////// void DownloadDb:: output(ostream &out) const { + out << "[" << _server_db._filename << " " << _client_db._filename << "]"; +} + +//////////////////////////////////////////////////////////////////// +// Function: DownloadDb::write +// Access: Public +// Description: +//////////////////////////////////////////////////////////////////// +void DownloadDb:: +write(ostream &out) const { out << "DownloadDb" << endl; out << "============================================================" << endl; out << " Client DB file: " << _client_db._filename << endl; out << "============================================================" << endl; - _client_db.output(out); + _client_db.write(out); out << endl; out << "============================================================" << endl; - out << " Server DB file: " << endl; + out << " Server DB file: " << _server_db._filename << endl; out << "============================================================" << endl; - _server_db.output(out); - output_version_map(out); + _server_db.write(out); + write_version_map(out); out << endl; } @@ -452,12 +462,12 @@ MultifileRecord(string name, Phase phase, int size, int status) { //////////////////////////////////////////////////////////////////// -// Function: DownloadDb::MultifileRecord::output +// Function: DownloadDb::MultifileRecord::write // Access: Public // Description: //////////////////////////////////////////////////////////////////// void DownloadDb::MultifileRecord:: -output(ostream &out) const { +write(ostream &out) const { out << "==================================================" << endl; out << "MultifileRecord: " << _name << endl << " phase: " << _phase << endl @@ -471,7 +481,7 @@ output(ostream &out) const { out << "--------------------------------------------------" << endl; pvector< PT(FileRecord) >::const_iterator i = _file_records.begin(); for(; i != _file_records.end(); ++i) { - (*i)->output(out); + (*i)->write(out); } } @@ -573,10 +583,10 @@ Db(void) { // Description: //////////////////////////////////////////////////////////////////// void DownloadDb::Db:: -output(ostream &out) const { +write(ostream &out) const { pvector< PT(MultifileRecord) >::const_iterator i = _mfile_records.begin(); for(; i != _mfile_records.end(); ++i) { - (*i)->output(out); + (*i)->write(out); } } @@ -1069,7 +1079,7 @@ FileRecord(string name) { // Description: //////////////////////////////////////////////////////////////////// void DownloadDb::FileRecord:: -output(ostream &out) const { +write(ostream &out) const { out << " FileRecord: " << _name << endl; } @@ -1324,12 +1334,12 @@ read_version_map(istream &read_stream) { } //////////////////////////////////////////////////////////////////// -// Function: DownloadDb::output_version_map +// Function: DownloadDb::write_version_map // Access: Public // Description: //////////////////////////////////////////////////////////////////// void DownloadDb:: -output_version_map(ostream &out) const { +write_version_map(ostream &out) const { out << "Version Map: " << endl; VersionMap::const_iterator vmi; VectorHash::const_iterator i; diff --git a/panda/src/downloader/downloadDb.h b/panda/src/downloader/downloadDb.h index c858b59ada..e8eb215976 100644 --- a/panda/src/downloader/downloadDb.h +++ b/panda/src/downloader/downloadDb.h @@ -84,7 +84,8 @@ PUBLISHED: ~DownloadDb(void); void output(ostream &out) const; - void output_version_map(ostream &out) const; + void write(ostream &out) const; + void write_version_map(ostream &out) const; // Write a database file bool write_client_db(Filename &file); @@ -141,7 +142,7 @@ public: public: FileRecord(void); FileRecord(string name); - void output(ostream &out) const; + void write(ostream &out) const; string _name; }; @@ -151,7 +152,7 @@ public: public: MultifileRecord(void); MultifileRecord(string name, Phase phase, int size, int status); - void output(ostream &out) const; + void write(ostream &out) const; int get_num_files(void) const; string get_file_name(int index) const; bool file_exists(string fname) const; @@ -171,7 +172,7 @@ public: class EXPCL_PANDAEXPRESS Db { public: Db(void); - void output(ostream &out) const; + void write(ostream &out) const; int get_num_multifiles(void) const; string get_multifile_name(int index) const; bool multifile_exists(string mfname) const;