Ignore:
Timestamp:
Jul 2, 2012, 7:54:12 AM (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:
9d14c3
Parents:
6b3a37
git-author:
Frederik Heber <heber@…> (03/04/12 20:11:38)
git-committer:
Frederik Heber <heber@…> (07/02/12 07:54:12)
Message:

FIX: Renamed ReceiveJobsOperation -> SendJobsOperation in file and class.

  • also name is receivejobs -> sendjobs.
  • also renamed ControllerChoices enum ReceiveJobs -> SendJobs.
  • The Operations should have been named actively, i.e. from the point of the instance who executes it.
Location:
src/Fragmentation/Automation/Controller
Files:
1 edited
2 moved

Legend:

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

    r6b3a37 r425fc6  
    77
    88/*
    9  * ReceiveJobsOperation.cpp
     9 * SendJobsOperation.cpp
    1010 *
    1111 *  Created on: Dec 11, 2011
     
    3434#include "Jobs/FragmentJob.hpp"
    3535
    36 #include "Controller/Commands/ReceiveJobsOperation.hpp"
     36#include "Controller/Commands/SendJobsOperation.hpp"
    3737
    3838/** Handle connect operation to receive jobs from controller
     
    4141 * \param endpoint_iterator endpoint of the connection
    4242 */
    43 void ReceiveJobsOperation::handle_connect(const boost::system::error_code& e,
     43void SendJobsOperation::handle_connect(const boost::system::error_code& e,
    4444    boost::asio::ip::tcp::resolver::iterator endpoint_iterator)
    4545{
     
    4848  {
    4949    // Successfully established connection. Give choice.
    50     enum ControllerChoices choice = ReceiveJobs;
     50    enum ControllerChoices choice = SendJobs;
    5151    connection_.async_write(choice,
    52       boost::bind(&ReceiveJobsOperation::handle_SendJobs, this,
     52      boost::bind(&SendJobsOperation::handle_SendJobs, this,
    5353      boost::asio::placeholders::error));
    5454  } else if (endpoint_iterator != boost::asio::ip::tcp::resolver::iterator()) {
     
    5757    boost::asio::ip::tcp::endpoint endpoint = *endpoint_iterator;
    5858    connection_.socket().async_connect(endpoint,
    59       boost::bind(&ReceiveJobsOperation::handle_connect, this,
     59      boost::bind(&SendJobsOperation::handle_connect, this,
    6060      boost::asio::placeholders::error, ++endpoint_iterator));
    6161  } else {
     
    7272 * \param e error code if something went wrong
    7373 */
    74 void ReceiveJobsOperation::handle_SendJobs(const boost::system::error_code& e)
     74void SendJobsOperation::handle_SendJobs(const boost::system::error_code& e)
    7575{
    7676  Info info(__FUNCTION__);
     
    8282    LOG(1, "INFO: Sending "+toString(jobs.size())+" jobs ...");
    8383    connection_.async_write(jobs,
    84       boost::bind(&ReceiveJobsOperation::handle_FinishOperation, this,
     84      boost::bind(&SendJobsOperation::handle_FinishOperation, this,
    8585      boost::asio::placeholders::error));
    8686  }
     
    100100 * \param e error code if something went wrong
    101101 */
    102 void ReceiveJobsOperation::handle_FinishOperation(const boost::system::error_code& e)
     102void SendJobsOperation::handle_FinishOperation(const boost::system::error_code& e)
    103103{
    104104  Info info(__FUNCTION__);
     
    114114 * \param _jobs jobs to add
    115115 */
    116 void ReceiveJobsOperation::addJobs(const std::vector<FragmentJob::ptr> &_jobs)
     116void SendJobsOperation::addJobs(const std::vector<FragmentJob::ptr> &_jobs)
    117117{
    118118  jobs.reserve(jobs.size()+_jobs.size());
     
    120120    jobs.push_back(job);
    121121  }
    122   LOG(1, "INFO: ReceiveJobsOperation now contains " << jobs.size() << " job(s).");
     122  LOG(1, "INFO: SendJobsOperation now contains " << jobs.size() << " job(s).");
    123123}
    124124
  • src/Fragmentation/Automation/Controller/Commands/SendJobsOperation.hpp

    r6b3a37 r425fc6  
    11/*
    2  * ReceiveJobsOperation.hpp
     2 * SendJobsOperation.hpp
    33 *
    44 *  Created on: Dec 11, 2011
     
    66 */
    77
    8 #ifndef FRAGMENTCONTROLLER_RECEIVEJOBSOPERATION_HPP_
    9 #define FRAGMENTCONTROLLER_RECEIVEJOBSOPERATION_HPP_
     8#ifndef FRAGMENTCONTROLLER_SENDJOBSOPERATION_HPP_
     9#define FRAGMENTCONTROLLER_SENDJOBSOPERATION_HPP_
    1010
    1111// include config.h
     
    2323#include "Controller/Commands/AsyncOperation.hpp"
    2424
    25 class ReceiveJobsOperation : public AsyncOperation {
     25class SendJobsOperation : public AsyncOperation {
    2626public:
    27   /// Constructor for class ReceiveJobsOperation.
    28   ReceiveJobsOperation(Connection &_connection) :
    29     AsyncOperation(std::string("receivejobs"), _connection) {}
    30   /// Destructor for class ReceiveJobsOperation
    31   ~ReceiveJobsOperation() {}
     27  /// Constructor for class SendJobsOperation.
     28  SendJobsOperation(Connection &_connection) :
     29    AsyncOperation(std::string("sendjobs"), _connection) {}
     30  /// Destructor for class SendJobsOperation
     31  ~SendJobsOperation() {}
    3232
    3333public:
     
    5858};
    5959
    60 #endif /* FRAGMENTCONTROLLER_RECEIVEJOBSOPERATION_HPP_ */
     60#endif /* FRAGMENTCONTROLLER_SENDJOBSOPERATION_HPP_ */
  • src/Fragmentation/Automation/Controller/FragmentController.cpp

    r6b3a37 r425fc6  
    3030#include "Controller/Commands/CheckResultsOperation.hpp"
    3131#include "Controller/Commands/GetNextJobIdOperation.hpp"
    32 #include "Controller/Commands/ReceiveJobsOperation.hpp"
     32#include "Controller/Commands/SendJobsOperation.hpp"
    3333#include "Controller/Commands/SendResultsOperation.hpp"
    3434#include "Controller/Commands/ShutdownOperation.hpp"
     
    4949  Commands.registerInstance(new CheckResultsOperation(connection_));
    5050  Commands.registerInstance(new GetNextJobIdOperation(connection_));
    51   Commands.registerInstance(new ReceiveJobsOperation(connection_));
     51  Commands.registerInstance(new SendJobsOperation(connection_));
    5252  Commands.registerInstance(new SendResultsOperation(connection_));
    5353  Commands.registerInstance(new ShutdownOperation(connection_));
Note: See TracChangeset for help on using the changeset viewer.