Commit 38a5e147 authored by Vedran Miletić's avatar Vedran Miletić

Remove usage of using (namespace) std(::) except for containers

parent 05a1ab93
......@@ -12,6 +12,6 @@ int main(int argc, char **argv) {
CppUnit::TestFactoryRegistry::getRegistry();
runner.addTest(registry.makeTest());
runner.run();
_RBTOBJECTCOUNTER_DUMP_(cout)
_RBTOBJECTCOUNTER_DUMP_(std::cout)
return 0;
}
......@@ -27,7 +27,8 @@ void OccupancyTest::setUp() {
RbtMolecularFileSourcePtr spMdlFileSource(
new RbtMdlFileSource(ligFileName, true, true, true));
m_workSpace = new RbtBiMolWorkSpace();
ifstream istr(asFileName.c_str(), ios_base::in | ios_base::binary);
std::ifstream istr(asFileName.c_str(),
std::ios_base::in | std::ios_base::binary);
m_workSpace->SetDockingSite(new RbtDockingSite(istr));
istr.close();
RbtPRMFactory prmFactory(spPrmSource, m_workSpace->GetDockingSite());
......@@ -36,7 +37,7 @@ void OccupancyTest::setUp() {
m_workSpace->SetSolvent(prmFactory.CreateSolvent());
m_solventList = m_workSpace->GetSolvent();
} catch (RbtError &e) {
cout << e << endl;
std::cout << e << std::endl;
}
}
......@@ -116,11 +117,12 @@ void OccupancyTest::testFlexAtomFactoryReceptor() {
int nFixed = fixedAtomList.size();
int nTethered = tetheredAtomList.size();
int nFree = freeAtomList.size();
// cout << "Receptor: #fixed = " << nFixed << "; #tethered = " << nTethered
// << "; #free = " << nFree << endl; for (RbtAtomRListConstIter iter =
// std::cout << "Receptor: #fixed = " << nFixed << "; #tethered = " <<
// nTethered
// << "; #free = " << nFree << std::endl; for (RbtAtomRListConstIter iter =
// tetheredAtomList.begin(); iter != tetheredAtomList.end(); ++iter) {
// cout << "Tethered: " << (*iter)->GetAtomName() << ": " <<
// (*iter)->GetUser1Value() << endl;
// std::cout << "Tethered: " << (*iter)->GetAtomName() << ": " <<
// (*iter)->GetUser1Value() << std::endl;
//}
if ((nFixed != expected[mode][0]) || (nTethered != expected[mode][1]) ||
(nFree != expected[mode][2])) {
......@@ -204,16 +206,18 @@ bool OccupancyTest::testFlexAtomFactory(RbtModel *pModel, int expected[9][3]) {
int nFixed = fixedAtomList.size();
int nTethered = tetheredAtomList.size();
int nFree = freeAtomList.size();
// cout << endl << "Trans = " << strTransMode << ", Rot = " << strRotMode
// << endl; for (RbtAtomRListConstIter iter = fixedAtomList.begin(); iter
// std::cout << std::endl << "Trans = " << strTransMode << ", Rot = " <<
// strRotMode
// << std::endl; for (RbtAtomRListConstIter iter = fixedAtomList.begin();
// iter
// != fixedAtomList.end(); ++iter) {
// cout << "Fixed: " << (*iter)->GetAtomName() << ": " <<
// (*iter)->GetUser1Value() << endl;
// std::cout << "Fixed: " << (*iter)->GetAtomName() << ": " <<
// (*iter)->GetUser1Value() << std::endl;
//}
// for (RbtAtomRListConstIter iter = tetheredAtomList.begin(); iter !=
// tetheredAtomList.end(); ++iter) {
// cout << "Tethered: " << (*iter)->GetAtomName() << ": " <<
// (*iter)->GetUser1Value() << endl;
// std::cout << "Tethered: " << (*iter)->GetAtomName() << ": " <<
// (*iter)->GetUser1Value() << std::endl;
//}
if ((nFixed != expected[mode][0]) || (nTethered != expected[mode][1]) ||
(nFree != expected[mode][2])) {
......@@ -247,7 +251,7 @@ double OccupancyTest::CompareScoresForSolventModes() {
m_workSpace->RemoveSolvent();
m_workSpace->SetSolvent(solventList);
double score = pSF->Score();
// cout << "mode = " << mode << "; score = " << score << endl;
// std::cout << "mode = " << mode << "; score = " << score << std::endl;
if (mode > 0) {
double diff = fabs(score - lastScore);
retVal = std::max(diff, retVal);
......@@ -256,8 +260,8 @@ double OccupancyTest::CompareScoresForSolventModes() {
// RbtStringVariantMap scoreMap;
// pSF->ScoreMap(scoreMap);
// for (RbtStringVariantMapConstIter vIter = scoreMap.begin(); vIter !=
// scoreMap.end(); vIter++) { cout << (*vIter).first << " = " <<
// (*vIter).second << endl;
// scoreMap.end(); vIter++) { std::cout << (*vIter).first << " = " <<
// (*vIter).second << std::endl;
//}
}
}
......
......@@ -30,7 +30,8 @@ void RbtChromTest::setUp() {
new RbtParameterFileSource(prmFileName));
RbtMolecularFileSourcePtr spMdlFileSource(
new RbtMdlFileSource(ligFileName, true, true, true));
ifstream istr(asFileName.c_str(), ios_base::in | ios_base::binary);
std::ifstream istr(asFileName.c_str(),
std::ios_base::in | std::ios_base::binary);
m_site_1koc = new RbtDockingSite(istr);
istr.close();
RbtPRMFactory prmFactory(spPrmSource);
......@@ -55,7 +56,7 @@ void RbtChromTest::setUp() {
std::copy(recepAtomList.begin(), recepAtomList.end(),
std::back_inserter(m_atomList));
} catch (RbtError &e) {
cout << e << endl;
std::cout << e << std::endl;
}
}
......@@ -340,7 +341,8 @@ void RbtChromTest::testPopulationRWFitness() {
for (RbtGenomeListConstIter iter = genomeList.begin();
(iter != genomeList.end()) && isAscending; ++iter) {
double value = (*iter)->GetRWFitness();
// cout << (*iter)->GetScore() << "\t" << (*iter)->GetRWFitness() << endl;
// std::cout << (*iter)->GetScore() << "\t" << (*iter)->GetRWFitness() <<
// std::endl;
isAscending = (value >= lastValue);
lastValue = value;
}
......@@ -358,11 +360,11 @@ void RbtChromTest::testPopulationRWSelect() {
RbtGenomePtr genome = pop->RouletteWheelSelect();
double score = genome->GetScore();
selectionMean += score;
// cout << "RWSelect score=" << score << endl;
// std::cout << "RWSelect score=" << score << std::endl;
}
selectionMean /= nToSelect;
// cout << "popMean = " << popMean << "; selectionMean = " << selectionMean <<
// endl;
// std::cout << "popMean = " << popMean << "; selectionMean = " <<
// selectionMean << std::endl;
CPPUNIT_ASSERT(selectionMean > popMean);
}
......@@ -388,7 +390,7 @@ void RbtChromTest::testPopulationGAstep() {
lastScore = score;
}
} catch (RbtError &e) {
cout << e.Message() << endl;
std::cout << e.Message() << std::endl;
isOK = false;
}
CPPUNIT_ASSERT(isOK);
......
......@@ -26,7 +26,8 @@ void SearchTest::setUp() {
RbtMolecularFileSourcePtr spMdlFileSource(
new RbtMdlFileSource(ligFileName, true, true, true));
m_workSpace = new RbtBiMolWorkSpace();
ifstream istr(asFileName.c_str(), ios_base::in | ios_base::binary);
std::ifstream istr(asFileName.c_str(),
std::ios_base::in | std::ios_base::binary);
m_workSpace->SetDockingSite(new RbtDockingSite(istr));
istr.close();
RbtPRMFactory prmFactory(spPrmSource, m_workSpace->GetDockingSite());
......@@ -50,7 +51,7 @@ void SearchTest::setUp() {
m_SF->Add(sfIntra);
m_workSpace->SetSF(m_SF);
} catch (RbtError &e) {
cout << e << endl;
std::cout << e << std::endl;
}
}
......@@ -102,7 +103,7 @@ void SearchTest::testGA() {
try {
m_workSpace->Run();
} catch (RbtError &e) {
cout << e.Message() << endl;
std::cout << e.Message() << std::endl;
isOK = false;
}
CPPUNIT_ASSERT(isOK);
......@@ -124,7 +125,7 @@ void SearchTest::testSimplex() {
try {
m_workSpace->Run();
} catch (RbtError &e) {
cout << e.Message() << endl;
std::cout << e.Message() << std::endl;
isOK = false;
}
CPPUNIT_ASSERT(isOK);
......@@ -145,7 +146,7 @@ void SearchTest::testSimAnn() {
try {
m_workSpace->Run();
} catch (RbtError &e) {
cout << e.Message() << endl;
std::cout << e.Message() << std::endl;
isOK = false;
}
delete pSimAnn;
......@@ -191,12 +192,12 @@ void SearchTest::testRestart() {
// m_workSpace->GetSF()->ScoreMap(scoreMap);
// for (RbtStringVariantMapConstIter iter = scoreMap.begin(); iter !=
// scoreMap.end(); ++iter) {
// cout << iter->first << " = " << iter->second << endl;
// std::cout << iter->first << " = " << iter->second << std::endl;
//}
cout << "Final score = " << finalScore << endl;
cout << "Restart score = " << restartScore << endl;
std::cout << "Final score = " << finalScore << std::endl;
std::cout << "Restart score = " << restartScore << std::endl;
} catch (RbtError &e) {
cout << e.Message() << endl;
std::cout << e.Message() << std::endl;
isOK = false;
}
CPPUNIT_ASSERT(isOK && (fabs(restartScore - finalScore) < 0.01));
......
......@@ -132,7 +132,7 @@ void NMSearch::ExploratoryMoves()
&& functionCalls >= maxCalls) {
FindMinMaxIndices();
ReplaceSimplexPoint(maxIndex, *reflectionPt);
if(DEBUG) cout << "reflection\n";
if(DEBUG) std::cout << "reflection\n";
simplexValues[maxIndex] = reflectionPtValue;
FindMinMaxIndices();
return;
......@@ -144,12 +144,12 @@ void NMSearch::ExploratoryMoves()
if (reflectionPtValue > expansionPtValue) {
ReplaceSimplexPoint(maxIndex, *expansionPt);
if(DEBUG) cout << "expansion\n";
if(DEBUG) std::cout << "expansion\n";
simplexValues[maxIndex] = expansionPtValue;
} // inner if
else {
ReplaceSimplexPoint(maxIndex, *reflectionPt);
if(DEBUG) cout << "reflection\n";
if(DEBUG) std::cout << "reflection\n";
simplexValues[maxIndex] = reflectionPtValue;
} // else
} // if for possibility 1
......@@ -159,7 +159,7 @@ void NMSearch::ExploratoryMoves()
else if( (secondHighestPtValue > reflectionPtValue ) &&
( reflectionPtValue >= simplexValues[minIndex]) ) {
ReplaceSimplexPoint(maxIndex, *reflectionPt);
if(DEBUG) cout << "reflection\n";
if(DEBUG) std::cout << "reflection\n";
simplexValues[maxIndex] = reflectionPtValue;
} // else if for possibility 2
......@@ -172,7 +172,7 @@ void NMSearch::ExploratoryMoves()
} // inner if
else {
ReplaceSimplexPoint(maxIndex, *contractionPt);
if(DEBUG) cout << "contraction\n";
if(DEBUG) std::cout << "contraction\n";
simplexValues[maxIndex] = contractionPtValue;
} // inner else
} // maxPrimePtId == 0
......@@ -182,7 +182,7 @@ void NMSearch::ExploratoryMoves()
} // inner if
else {
ReplaceSimplexPoint(maxIndex, *contractionPt);
if(DEBUG) cout << "contraction\n";
if(DEBUG) std::cout << "contraction\n";
simplexValues[maxIndex] = contractionPtValue;
} // inner else
} // maxPrimePtId == 1
......@@ -190,7 +190,7 @@ void NMSearch::ExploratoryMoves()
// if we haven't taken care of the current simplex, something's wrong
else {
cerr << "Error in ExploratoryMoves() - "
std::cerr << "Error in ExploratoryMoves() - "
<< "Unaccounted for case.\nTerminating.\n";
return;
}
......@@ -211,7 +211,7 @@ void NMSearch::CalculateFunctionValue(int index)
(*scratch)[i] = (*simplex).row(index)[i];
int success;
fcnCall(dimensions, scratch, simplexValues[index], success);
if(!success) cerr<<"Error calculating point in CalculateFunctionValue().\n";
if(!success) std::cerr << "Error calculating point in CalculateFunctionValue().\n";
} // CalculateFunctionValue()
void NMSearch::SetAlpha(double newAlpha)
......@@ -381,7 +381,7 @@ void NMSearch::InitGeneralSimplex(const RbtMatrix *plex)
for (int j = 0 ; j < scratch->size() ; j++)
(*scratch)[j] = (*plex).row(i)[j];
fcnCall(dimensions, scratch, simplexValues[i], success);
if(!success) cerr<<"Error with point #"<<i<<" in initial simplex.\n";
if(!success) std::cerr << "Error with point #"<<i<<" in initial simplex.\n";
} // for
FindMinMaxIndices();
} // InitGeneralSimplex()
......@@ -389,7 +389,7 @@ void NMSearch::InitGeneralSimplex(const RbtMatrix *plex)
void NMSearch::ReadSimplexFile(istream& fp)
{
if(!fp) {
cerr<<"No Input Stream in ReadSimplexFile()!\n";
std::cerr << "No Input Stream in ReadSimplexFile()!\n";
return; // There's no file handle!!
}
......@@ -454,7 +454,7 @@ int NMSearch::GetTolHit() const
void NMSearch::FindMinMaxIndices()
{
if(simplexValues == NULL) {
cerr << "Error in FindMinMaxIndices() - "
std::cerr << "Error in FindMinMaxIndices() - "
<< "The vector of simplexValues is NULL!!\n";
return;
}
......@@ -477,7 +477,7 @@ void NMSearch::FindMinMaxIndices()
int NMSearch::SecondHighestPtIndex()
{
if(simplexValues == NULL) {
cerr << "Error in SecondHighestPtValue() - "
std::cerr << "Error in SecondHighestPtValue() - "
<< "The vector of simplexValues is NULL!!\n";
return -1;
}
......@@ -518,7 +518,7 @@ void NMSearch::FindReflectionPt()
int success;
fcnCall(dimensions, reflectionPt, reflectionPtValue, success);
if(!success) {
cerr << "Error finding f(x) for reflection point at"
std::cerr << "Error finding f(x) for reflection point at"
<< "function call #" << functionCalls << ".\n";
} // if
} // FindReflectionPt()
......@@ -533,7 +533,7 @@ void NMSearch::FindExpansionPt()
int success;
fcnCall(dimensions, expansionPt, expansionPtValue, success);
if(!success) {
cerr << "Error finding f(x) for expansion point at"
std::cerr << "Error finding f(x) for expansion point at"
<< "function call #" << functionCalls << ".\n";
} // if
} // FindExpansionPt()
......@@ -569,7 +569,7 @@ void NMSearch::FindContractionPt()
int success;
fcnCall(dimensions, contractionPt, contractionPtValue, success);
if(!success) {
cerr << "Error finding f(x) for contraction point at"
std::cerr << "Error finding f(x) for contraction point at"
<< "function call #" << functionCalls << ".\n";
} // if
delete tmpPt;//DM 27 Jun 2002 garbage collection
......@@ -596,7 +596,7 @@ void NMSearch::ShrinkSimplex()
(*simplex)[i][j] = (*tempPt)[j];
} // inner for
fcnCall(dimensions,tempPt,simplexValues[i],success);
if (!success) cerr << "Error shrinking the simplex.\n";
if (!success) std::cerr << "Error shrinking the simplex.\n";
// stop if at maximum function calls
// changed 5/01 to reflect maxcalls = -1 possibility ---pls
......@@ -610,12 +610,12 @@ void NMSearch::ShrinkSimplex()
void NMSearch::printSimplex() const
{
for( int i = 0; i <= dimensions; i++ ) {
cout << " Point:";
std::cout << " Point:";
for ( int j = 0; j < dimensions; j++ ) {
cout << (*simplex)[i][j] << "\t";
std::cout << (*simplex)[i][j] << "\t";
} // inner for
cout << "Value:" << simplexValues[i] << "\n";
std::cout << "Value:" << simplexValues[i] << "\n";
} // outer for
cout << "\nFCalls: " << functionCalls << endl << endl;
std::cout << "\nFCalls: " << functionCalls << std::endl << std::endl;
}
......@@ -67,14 +67,14 @@ public:
if (constant)
constant = false;
else
cout << "ERROR\n";
std::cout << "ERROR\n";
}
private:
bool evaluated, constant;
std::string name;
RbtReturnType result;
// friend ostream& operator<<(ostream& s, const RbtCell &p);
// friend std::ostream& operator<<(std::ostream& s, const RbtCell &p);
};
// Useful typedefs
......
......@@ -48,7 +48,7 @@ protected:
}
private:
// friend ostream& operator<<(ostream& s, const RbtCommand &p);
// friend std::ostream& operator<<(std::ostream& s, const RbtCommand &p);
};
// Useful typedefs
......
......@@ -35,9 +35,9 @@ public:
virtual ~RbtGPChromosome();
void Clear();
ostream &Print(ostream &) const;
friend ostream &operator<<(ostream &s, const RbtGPChromosome &p);
friend istream &operator>>(istream &s, RbtGPChromosome &p);
std::ostream &Print(std::ostream &) const;
friend std::ostream &operator<<(std::ostream &s, const RbtGPChromosome &p);
friend std::istream &operator>>(std::istream &s, RbtGPChromosome &p);
const int &operator[](int idx) const { return chrom[idx]; }
int &operator[](int idx) { return chrom[idx]; }
RbtGPChromosome &operator=(const RbtGPChromosome &c);
......
......@@ -29,7 +29,7 @@ public:
RbtGPFFCHK1(RbtContextPtr c) : contextp(c) { _RBTOBJECTCOUNTER_CONSTR_(_CT); }
virtual ~RbtGPFFCHK1() { _RBTOBJECTCOUNTER_DESTR_(_CT); }
void ReadTables(istream &, RbtReturnTypeArray &, RbtReturnTypeArray &);
void ReadTables(std::istream &, RbtReturnTypeArray &, RbtReturnTypeArray &);
double CalculateFitness(RbtGPGenomePtr, RbtReturnTypeArray &,
RbtReturnTypeArray &, double, bool);
double CalculateFitness(RbtGPGenomePtr, RbtReturnTypeArray &,
......
......@@ -26,7 +26,7 @@ class RbtGPFFCrossDock : public RbtGPFitnessFunction {
public:
static std::string _CT;
void ReadTables(istream &, RbtReturnTypeArray &, RbtReturnTypeArray &);
void ReadTables(std::istream &, RbtReturnTypeArray &, RbtReturnTypeArray &);
double CalculateFitness(RbtGPGenomePtr, RbtReturnTypeArray &,
RbtReturnTypeArray &, double, bool);
double CalculateFitness(RbtGPGenomePtr, RbtReturnTypeArray &,
......
......@@ -26,7 +26,7 @@ class RbtGPFFGold : public RbtGPFitnessFunction {
public:
static std::string _CT;
void ReadTables(istream &);
void ReadTables(std::istream &);
double CalculateFitness(RbtGPGenomePtr, RbtReturnTypeArray &,
RbtReturnTypeArray &, double, bool);
double CalculateFitness(RbtGPGenomePtr, RbtReturnTypeArray &,
......
......@@ -30,7 +30,7 @@ public:
}
virtual ~RbtGPFFHSP90() { _RBTOBJECTCOUNTER_DESTR_(_CT); }
void ReadTables(istream &, RbtReturnTypeArray &, RbtReturnTypeArray &);
void ReadTables(std::istream &, RbtReturnTypeArray &, RbtReturnTypeArray &);
double CalculateFitness(RbtGPGenomePtr, RbtReturnTypeArray &,
RbtReturnTypeArray &, double, bool);
double CalculateFitness(RbtGPGenomePtr, RbtReturnTypeArray &,
......
......@@ -31,7 +31,7 @@ public:
}
virtual ~RbtGPFFSpike() { _RBTOBJECTCOUNTER_DESTR_(_CT); }
void ReadTables(istream &, RbtReturnTypeArray &, RbtReturnTypeArray &);
void ReadTables(std::istream &, RbtReturnTypeArray &, RbtReturnTypeArray &);
double CalculateFitness(RbtGPGenomePtr, RbtReturnTypeArray &,
RbtReturnTypeArray &, double, bool);
double CalculateFitness(RbtGPGenomePtr, RbtReturnTypeArray &,
......
......@@ -37,7 +37,7 @@ public:
// Destructor
//////////////////
virtual ~RbtGPFitnessFunction();
virtual void ReadTables(istream &, RbtReturnTypeArray &,
virtual void ReadTables(std::istream &, RbtReturnTypeArray &,
RbtReturnTypeArray &) = 0;
double GetObjective() const;
double GetFitness() const;
......
......@@ -29,7 +29,7 @@ public:
RbtGPGenome();
RbtGPGenome(const RbtGPGenome &);
RbtGPGenome(std::string);
RbtGPGenome(istream &);
RbtGPGenome(std::istream &);
RbtGPGenome &operator=(const RbtGPGenome &);
......@@ -52,8 +52,8 @@ public:
double GetFitness() const { return fitness; }
void UniformCrossover(const RbtGPGenome &, const RbtGPGenome &);
void Crossover(RbtGPGenome &);
friend ostream &operator<<(ostream &s, const RbtGPGenome &p);
ostream &Print(ostream &) const;
friend std::ostream &operator<<(std::ostream &s, const RbtGPGenome &p);
std::ostream &Print(std::ostream &) const;
protected:
private:
......
......@@ -36,10 +36,10 @@ public:
virtual ~RbtGPParser();
void Clear();
ostream &Print(ostream &) const;
friend ostream &operator<<(ostream &s, const RbtGPParser &p);
std::ostream &Print(std::ostream &) const;
friend std::ostream &operator<<(std::ostream &s, const RbtGPParser &p);
RbtReturnTypeList Parse(RbtGPChromosomePtr, RbtReturnTypeList &);
std::string PrintParse(istream &, RbtGPChromosomePtr, bool, bool);
std::string PrintParse(std::istream &, RbtGPChromosomePtr, bool, bool);
bool IsConstantInt(int i) { return (i == CINT); }
bool IsConstantFloat(int i) { return (i == CFLOAT); }
......
......@@ -51,8 +51,8 @@ public:
void EPstep(std::string, double, double, double, double, double,
bool) throw(RbtError);
RbtGPGenomePtr Best() const;
ostream &Print(ostream &) const;
friend ostream &operator<<(ostream &, const RbtGPPopulation &);
std::ostream &Print(std::ostream &) const;
friend std::ostream &operator<<(std::ostream &, const RbtGPPopulation &);
void Swap(SmartPtr<RbtGPPopulation>, int);
void QSort(RbtGPGenomeList &);
void QSort();
......
......@@ -117,7 +117,7 @@ std::ostream &PrintStdHeader(std::ostream &s,
// Helper functions to read/write chars from iostreams
// Throws error if stream state is not Good() before and after the read/write
// It appears the STL ios_base exception throwing is not yet implemented
// It appears the STL std::ios_base exception throwing is not yet implemented
// at least on RedHat 6.1, so this is a temporary workaround (yeah right)
//
// DM 25 Sep 2000 - with MIPSPro CC compiler, streamsize is not defined,
......
......@@ -15,10 +15,6 @@
#ifndef _RBTATOM_H_
#define _RBTATOM_H_
#include <functional> //For STL function objects
using std::bind2nd;
using std::ptr_fun;
#include "RbtConfig.h"
#include "RbtCoord.h"
#include "RbtPMF.h"
......@@ -91,11 +87,11 @@ public:
// Insertion operator (primarily for debugging)
// Note: needs to be friend so can access atom private data
// without using the accessor functions
friend ostream &operator<<(ostream &s, const RbtAtom &atom);
friend std::ostream &operator<<(std::ostream &s, const RbtAtom &atom);
// Virtual function for dumping atom details to an output stream
// Derived classes (e.g. pseudoatom) can override if required
virtual ostream &Print(ostream &s) const;
virtual std::ostream &Print(std::ostream &s) const;
///////////////////////////////////////////////
// Public accessor functions
......@@ -1251,8 +1247,9 @@ void GetCoordList(const RbtAtomList &atomList, RbtCoordList &coordList);
// Streams an atom list in Quanta CSD file format (for easy color coding of
// selected atoms in Quanta) nFormat = 0 => Receptor atom format: "zone 1 #
// pick O5T = col 2" nFormat != 0 => Ligand atom format "pick N1 .and. segm H =
// col 2" ostream should have been opened before calling PrintQuantaCSDFormat
void PrintQuantaCSDFormat(const RbtAtomList &atomList, ostream &s,
// col 2" std::ostream should have been opened before calling
// PrintQuantaCSDFormat
void PrintQuantaCSDFormat(const RbtAtomList &atomList, std::ostream &s,
int nColor = 2, int nFormat = 0);
// DM 25 Feb 1999
......
......@@ -19,7 +19,6 @@
#define _RBTBASEFILESINK_H_
#include <fstream>
using std::ofstream;
#include "RbtConfig.h"
......@@ -93,7 +92,7 @@ private:
//////////////
RbtStringList m_lineRecs;
std::string m_strFileName;
ofstream m_fileOut;
std::ofstream m_fileOut;
bool m_bAppend; // If true, Write() appends to file rather than overwriting
};
......
......@@ -16,7 +16,6 @@
#define _RBTBASEFILESOURCE_H_
#include <fstream>
using std::ifstream;
#include "RbtConfig.h"
......@@ -88,7 +87,7 @@ private:
private:
std::string m_strFileName;
bool m_bReadOK; // For use by Read
ifstream m_fileIn;
std::ifstream m_fileIn;
char *m_szBuf; // Line buffer
bool m_bFileOpen; // Keep track of whether we've opened the file or not
bool m_bMultiRec; // Is file multi-record ?
......
......@@ -32,14 +32,14 @@ public:
unsigned int NX, unsigned int NY, unsigned int NZ,
unsigned int NPad = 0);
// Constructor reading all params from binary stream
RbtBaseGrid(istream &istr);
RbtBaseGrid(std::istream &istr);
RbtBaseGrid(const RbtBaseGrid &); // Copy constructor
RbtBaseGrid &operator=(const RbtBaseGrid &); // Copy assignment
virtual ~RbtBaseGrid(); // Default destructor
// Friend functions
// Insertion operator (primarily for debugging)
friend ostream &operator<<(ostream &s, const RbtBaseGrid &grid);
friend std::ostream &operator<<(std::ostream &s, const RbtBaseGrid &grid);
////////////////////////////////////////
// Virtual functions for reading/writing grid data to streams in
......@@ -47,9 +47,9 @@ public:
// Subclasses should provide their own private OwnPrint,OwnWrite, OwnRead
// methods to handle subclass data members, and override the public
// Print,Write and Read methods
virtual void Print(ostream &ostr) const; // Text output
virtual void Write(ostream &ostr) const; // Binary output (serialisation)
virtual void Read(istream &istr); // Binary input, replaces existing grid
virtual void Print(std::ostream &ostr) const; // Text output
virtual void Write(std::ostream &ostr) const; // Binary output (serialisation)
virtual void Read(std::istream &istr); // Binary input, replaces existing grid
////////////////////////////////////////
// Public methods
......@@ -194,11 +194,11 @@ protected:
///////////////////
// Protected method for writing data members for this class to text stream
void OwnPrint(ostream &ostr) const;
void OwnPrint(std::ostream &ostr) const;
// Protected method for writing data members for this class to binary stream
void OwnWrite(ostream &ostr) const;
void OwnWrite(std::ostream &ostr) const;
// Protected method for reading data members for this class from binary stream
void OwnRead(istream &istr) throw(RbtError);
void OwnRead(std::istream &istr) throw(RbtError);
private:
////////////////////////////////////////
......
......@@ -78,7 +78,7 @@ public:
// Virtual function for dumping parameters to an output stream
// Called by operator <<
virtual void Print(ostream &s) const;
virtual void Print(std::ostream &s) const;
protected: