Changeset 00ea61


Ignore:
Timestamp:
May 18, 2016, 10:03:09 PM (9 years ago)
Author:
Frederik Heber <heber@…>
Children:
706d48
Parents:
ed8a68
git-author:
Frederik Heber <heber@…> (03/10/16 14:11:01)
git-committer:
Frederik Heber <heber@…> (05/18/16 22:03:09)
Message:

ExportGraph::operator() now returns bool.

Location:
src
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • src/Actions/FragmentationAction/FragmentationAction.cpp

    red8a68 r00ea61  
    405405      exporter.setPrefix(params.prefix.get());
    406406      exporter.setOutputTypes(params.types.get());
    407       exporter();
     407      if (!exporter())
     408        return Action::failure;
    408409    } else {
    409410      // store molecule's fragment in FragmentJobQueue
    410411      ExportGraph_ToJobs exporter(TotalGraph, treatment, saturation, globalsaturationpositions);
    411412      exporter.setLevel(params.level.get());
    412       exporter();
     413      if (!exporter())
     414        return Action::failure;
    413415    }
    414416    ExportGraph_ToAtomFragments exporter(TotalGraph, treatment, saturation, globalsaturationpositions);
    415     exporter();
     417    if (!exporter())
     418      return Action::failure;
    416419  }
    417420  if (!AtomFragmentsMap::getInstance().checkCompleteness()) {
  • src/Fragmentation/Exporters/ExportGraph.hpp

    red8a68 r00ea61  
    4848  typedef boost::shared_ptr<SaturatedFragment> SaturatedFragment_ptr;
    4949
    50   virtual void operator()()=0;
     50  virtual bool operator()()=0;
    5151
    5252  /** Returns a saturated fragment for immediate use only.
  • src/Fragmentation/Exporters/ExportGraph_ToAtomFragments.cpp

    red8a68 r00ea61  
    5757{}
    5858
    59 void ExportGraph_ToAtomFragments::operator()()
     59bool ExportGraph_ToAtomFragments::operator()()
    6060{
    6161  AtomFragmentsMap &atomfragments = AtomFragmentsMap::getInstance();
     
    9292  if (CurrentFragment == NULL) {
    9393    ELOG(1, "Some error while obtaining the next fragment occured.");
    94     return;
     94    return false;
    9595  }
     96  return true;
    9697}
  • src/Fragmentation/Exporters/ExportGraph_ToAtomFragments.hpp

    red8a68 r00ea61  
    4242  virtual ~ExportGraph_ToAtomFragments();
    4343
    44         void operator()();
     44        bool operator()();
    4545};
    4646
  • src/Fragmentation/Exporters/ExportGraph_ToFiles.cpp

    red8a68 r00ea61  
    103103/** Actual implementation of the export to files function.
    104104 */
    105 void ExportGraph_ToFiles::operator()()
     105bool ExportGraph_ToFiles::operator()()
    106106{
    107107  LOG(1, "INFO: Writing " << TotalGraph.size() << " possible bond fragmentation configs.");
     
    136136  if (CurrentFragment == NULL) {
    137137    ELOG(1, "Some error while obtaining the next fragment occured.");
    138     return;
     138    return false;
    139139  }
    140140  ForcesFile.close();
     
    150150  // restore orbital and Stop values
    151151  //CalculateOrbitals(*configuration);
     152  return true;
    152153}
    153154
  • src/Fragmentation/Exporters/ExportGraph_ToFiles.hpp

    red8a68 r00ea61  
    3737        virtual ~ExportGraph_ToFiles();
    3838
    39         void operator()();
     39        bool operator()();
    4040
    4141        void setPrefix(const std::string &_prefix) {
  • src/Fragmentation/Exporters/ExportGraph_ToJobs.cpp

    red8a68 r00ea61  
    6868{}
    6969
    70 void ExportGraph_ToJobs::operator()()
     70bool ExportGraph_ToJobs::operator()()
    7171{
    7272  std::vector<FragmentJob::ptr> jobs;
     
    131131  if (CurrentFragment == NULL) {
    132132    ELOG(1, "Some error while obtaining the next fragment occured.");
    133     return;
     133    return false;
    134134  }
    135135
    136136  // push final jobs
    137137  FragmentJobQueue::getInstance().addJobs(jobs, KeySets, FullKeySets);
     138
     139  return true;
    138140}
  • src/Fragmentation/Exporters/ExportGraph_ToJobs.hpp

    red8a68 r00ea61  
    4444  virtual ~ExportGraph_ToJobs();
    4545
    46         void operator()();
     46        bool operator()();
    4747
    4848  /** Sets the level for the sampling of the density.
Note: See TracChangeset for help on using the changeset viewer.