Ignore:
Timestamp:
Feb 3, 2010, 4:42:06 PM (16 years ago)
Author:
Tillmann Crueger <crueger@…>
Children:
b9f422
Parents:
bc1fbf
Message:

Changed all observed places to new observer structure

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/molecule.cpp

    rbc1fbf r8501eb  
    7171
    7272void molecule::setName(const std::string _name){
    73   START_OBSERVER;
     73  OBSERVE;
    7474  strncpy(name,_name.c_str(),MAXSTRINGSIZE);
    75   FINISH_OBSERVER;
    7675}
    7776
     
    104103{
    105104  bool retval = false;
    106   START_OBSERVER;
     105  OBSERVE;
    107106  if (pointer != NULL) {
    108107    pointer->sort = &pointer->nr;
     
    123122    retval = add(pointer, end);
    124123  }
    125   FINISH_OBSERVER;
    126124  return retval;
    127125};
     
    135133{
    136134  atom *retval = NULL;
    137   START_OBSERVER;
     135  OBSERVE;
    138136  if (pointer != NULL) {
    139137    atom *walker = new atom(pointer);
     
    147145    retval=walker;
    148146  }
    149   FINISH_OBSERVER;
    150147  return retval;
    151148};
     
    188185{
    189186  bool AllWentWell = true;    // flag gathering the boolean return value of molecule::AddAtom and other functions, as return value on exit
    190   START_OBSERVER;
     187  OBSERVE;
    191188  double bondlength;  // bond length of the bond to be replaced/cut
    192189  double bondangle;  // bond angle of the bond to be replaced/cut
     
    235232  if (BondRescale == -1) {
    236233    eLog() << Verbose(1) << "There is no typical hydrogen bond distance in replacing bond (" << TopOrigin->Name << "<->" << TopReplacement->Name << ") of degree " << TopBond->BondDegree << "!" << endl;
    237     RETURN_OBSERVER(false);
     234    return false;
    238235    BondRescale = bondlength;
    239236  } else {
     
    315312      if (bondangle == -1) {
    316313        eLog() << Verbose(1) << "There is no typical hydrogen bond angle in replacing bond (" << TopOrigin->Name << "<->" << TopReplacement->Name << ") of degree " << TopBond->BondDegree << "!" << endl;
    317         RETURN_OBSERVER(false);
     314        return false;
    318315        bondangle = 0;
    319316      }
     
    442439  Free(&matrix);
    443440
    444   FINISH_OBSERVER;
    445441//  Log() << Verbose(3) << "End of AddHydrogenReplacementAtom." << endl;
    446442  return AllWentWell;
     
    468464    return false;
    469465
    470   START_OBSERVER;
     466  OBSERVE;
    471467  getline(xyzfile,line,'\n'); // Read numer of atoms in file
    472468  input = new istringstream(line);
     
    509505  xyzfile.close();
    510506  delete(input);
    511   FINISH_OBSERVER;
    512507  return true;
    513508};
Note: See TracChangeset for help on using the changeset viewer.