Changeset d6fe76 for src/Fragmentation


Ignore:
Timestamp:
May 17, 2012, 3:21:54 PM (13 years ago)
Author:
Frederik Heber <heber@…>
Branches:
Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
Children:
9948a7
Parents:
167b63
git-author:
Frederik Heber <heber@…> (12/11/11 16:44:18)
git-committer:
Frederik Heber <heber@…> (05/17/12 15:21:54)
Message:

Added a "testfunction" to each ...Operation along with handle_connect.

  • this is to test whether we can place the initial connect into the class Operation and have only specific functions required lateron in the derived classes.
Location:
src/Fragmentation/Automation/Controller/Commands
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • src/Fragmentation/Automation/Controller/Commands/CheckResultsOperation.cpp

    r167b63 rd6fe76  
    117117  disconnect();
    118118}
     119
     120void CheckResultsOperation::handle_connect(const boost::system::error_code& e,
     121    boost::asio::ip::tcp::resolver::iterator endpoint_iterator)
     122{}
     123
  • src/Fragmentation/Automation/Controller/Commands/CheckResultsOperation.hpp

    r167b63 rd6fe76  
    3636  virtual void operator()();
    3737
     38  // virtual function pointer to the connection handler
     39  virtual void handle_connect(const boost::system::error_code& e,
     40      boost::asio::ip::tcp::resolver::iterator endpoint_iterator);
     41
    3842  /// Handle completion of a CheckResults operation.
    3943  void handle_connect_check(const boost::system::error_code& e,
  • src/Fragmentation/Automation/Controller/Commands/Operation.cpp

    r167b63 rd6fe76  
    9696}
    9797
     98void Operation::testfunction(const std::string& _host, const std::string& _service)
     99{
     100  Info info(__FUNCTION__);
     101  // Resolve the host name into an IP address.
     102  boost::asio::ip::tcp::resolver resolver(connection_.socket().get_io_service());
     103  boost::asio::ip::tcp::resolver::query query(_host, _service);
     104  boost::asio::ip::tcp::resolver::iterator endpoint_iterator =
     105    resolver.resolve(query);
     106  boost::asio::ip::tcp::endpoint endpoint = *endpoint_iterator;
     107
     108  // Start an asynchronous connect operation.
     109  std::cout << "Connecting to endpoint " << endpoint << " ..." << std::endl;
     110  connection_.socket().async_connect(endpoint,
     111    boost::bind(&Operation::handle_connect, this,
     112      boost::asio::placeholders::error, ++endpoint_iterator));
     113}
  • src/Fragmentation/Automation/Controller/Commands/Operation.hpp

    r167b63 rd6fe76  
    3030  // virtual function pointer to the operation to do
    3131  virtual void operator()() = 0;
     32
     33  // virtual function pointer to the connection handler
     34  virtual void handle_connect(const boost::system::error_code& e,
     35      boost::asio::ip::tcp::resolver::iterator endpoint_iterator) = 0;
     36
     37  void testfunction(const std::string& _host, const std::string& _service);
    3238
    3339  /// Handle completion of an operation.
  • src/Fragmentation/Automation/Controller/Commands/ReceiveJobsOperation.cpp

    r167b63 rd6fe76  
    150150  disconnect();
    151151}
     152
     153void ReceiveJobsOperation::handle_connect(const boost::system::error_code& e,
     154    boost::asio::ip::tcp::resolver::iterator endpoint_iterator)
     155{}
     156
  • src/Fragmentation/Automation/Controller/Commands/ReceiveJobsOperation.hpp

    r167b63 rd6fe76  
    3535  virtual void operator()();
    3636
     37  // virtual function pointer to the connection handler
     38  virtual void handle_connect(const boost::system::error_code& e,
     39      boost::asio::ip::tcp::resolver::iterator endpoint_iterator);
     40
    3741  /// Handle completion of a calculate operation.
    3842  void handle_connect_calc(const boost::system::error_code& e,
  • src/Fragmentation/Automation/Controller/Commands/SendResultsOperation.cpp

    r167b63 rd6fe76  
    148148}
    149149
     150void SendResultsOperation::handle_connect(const boost::system::error_code& e,
     151    boost::asio::ip::tcp::resolver::iterator endpoint_iterator)
     152{}
  • src/Fragmentation/Automation/Controller/Commands/SendResultsOperation.hpp

    r167b63 rd6fe76  
    3535  virtual void operator()();
    3636
     37  // virtual function pointer to the connection handler
     38  virtual void handle_connect(const boost::system::error_code& e,
     39      boost::asio::ip::tcp::resolver::iterator endpoint_iterator);
     40
    3741  /// Handle completion of a GetResults operation.
    3842  void handle_connect_get(const boost::system::error_code& e,
  • src/Fragmentation/Automation/Controller/Commands/ShutdownOperation.cpp

    r167b63 rd6fe76  
    9494}
    9595
     96void ShutdownOperation::handle_connect(const boost::system::error_code& e,
     97    boost::asio::ip::tcp::resolver::iterator endpoint_iterator)
     98{}
  • src/Fragmentation/Automation/Controller/Commands/ShutdownOperation.hpp

    r167b63 rd6fe76  
    3434  virtual void operator()();
    3535
     36  // virtual function pointer to the connection handler
     37  virtual void handle_connect(const boost::system::error_code& e,
     38      boost::asio::ip::tcp::resolver::iterator endpoint_iterator);
     39
    3640  /// Handle completion of a Shutdown operation.
    3741  void handle_connect_shutdown(const boost::system::error_code& e,
Note: See TracChangeset for help on using the changeset viewer.