Ignore:
Timestamp:
Nov 4, 2009, 7:56:04 PM (16 years ago)
Author:
Frederik Heber <heber@…>
Children:
4ef101, aa8542
Parents:
ec70ec
Message:

Huge change from ofstream * (const) out --> Log().

  • first shift was done via regular expressions
  • then via error messages from the code
  • note that class atom, class element and class molecule kept in parts their output stream, was they print to file.
  • make check runs fine
  • MISSING: Verbosity is not fixed for everything (i.e. if no endl; is present and next has Verbose(0) ...)

Signed-off-by: Frederik Heber <heber@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/bondgraph.cpp

    rec70ec r543ce4  
    1111#include "bondgraph.hpp"
    1212#include "element.hpp"
     13#include "log.hpp"
    1314#include "molecule.hpp"
    1415#include "parser.hpp"
     
    3940 * \return true - success in parsing file, false - failed to parse the file
    4041 */
    41 bool BondGraph::LoadBondLengthTable(ofstream * const out, const string &filename)
     42bool BondGraph::LoadBondLengthTable(const string &filename)
    4243{
    4344  bool status = true;
     
    4647  // allocate MatrixContainer
    4748  if (BondLengthMatrix != NULL) {
    48     *out << "MatrixContainer for Bond length already present, removing." << endl;
     49    Log() << Verbose(1) << "MatrixContainer for Bond length already present, removing." << endl;
    4950    delete(BondLengthMatrix);
    5051  }
     
    7778 * \return true - success, false - failed to construct bond structure
    7879 */
    79 bool BondGraph::ConstructBondGraph(ofstream * const out, molecule * const mol)
     80bool BondGraph::ConstructBondGraph(molecule * const mol)
    8081{
    8182  bool status = true;
     
    8586
    8687  if (BondLengthMatrix == NULL) { // no bond length matrix parsed?
    87     SetMaxDistanceToMaxOfCovalentRadii(out, mol);
    88     mol->CreateAdjacencyList(out, max_distance, IsAngstroem, &BondGraph::CovalentMinMaxDistance, this);
     88    SetMaxDistanceToMaxOfCovalentRadii(mol);
     89    mol->CreateAdjacencyList(max_distance, IsAngstroem, &BondGraph::CovalentMinMaxDistance, this);
    8990  } else
    90     mol->CreateAdjacencyList(out, max_distance, IsAngstroem, &BondGraph::BondLengthMatrixMinMaxDistance, this);
     91    mol->CreateAdjacencyList(max_distance, IsAngstroem, &BondGraph::BondLengthMatrixMinMaxDistance, this);
    9192
    9293  return status;
     
    110111 * \param *mol molecule with all atoms and their respective elements.
    111112 */
    112 double BondGraph::SetMaxDistanceToMaxOfCovalentRadii(ofstream * const out, const molecule * const mol)
     113double BondGraph::SetMaxDistanceToMaxOfCovalentRadii(const molecule * const mol)
    113114{
    114115  max_distance = 0.;
     
    152153{
    153154  if (BondLengthMatrix == NULL) {// safety measure if no matrix has been parsed yet
    154     cerr << Verbose(1) << "WARNING:  BondLengthMatrixMinMaxDistance() called without having parsed the bond length matrix yet!" << endl;
     155    eLog() << Verbose(1) << "WARNING:  BondLengthMatrixMinMaxDistance() called without having parsed the bond length matrix yet!" << endl;
    155156    CovalentMinMaxDistance(Walker, OtherWalker, MinDistance, MaxDistance, IsAngstroem);
    156157  } else {
Note: See TracChangeset for help on using the changeset viewer.