Changeset f10b0c for src/Actions/CommandAction
- Timestamp:
- Jun 11, 2012, 9:53:19 AM (13 years ago)
- 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:
- 95f965
- Parents:
- b9c69d
- git-author:
- Michael Ankele <ankele@…> (04/24/12 13:55:16)
- git-committer:
- Frederik Heber <heber@…> (06/11/12 09:53:19)
- Location:
- src/Actions/CommandAction
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/CommandAction/BondLengthTableAction.cpp
rb9c69d rf10b0c 43 43 ostringstream usage; 44 44 45 LOG(0, "Using " << params.BondGraphFileName << " as bond length table.");45 LOG(0, "Using " << params.BondGraphFileName.get() << " as bond length table."); 46 46 BondGraph *&BG = World::getInstance().getBondGraph(); 47 47 … … 57 57 58 58 BG->CleanupBondLengthTable(); 59 if ((!params.BondGraphFileName. empty())60 && boost::filesystem::exists(params.BondGraphFileName )) {61 std::ifstream input(params.BondGraphFileName. string().c_str());59 if ((!params.BondGraphFileName.get().empty()) 60 && boost::filesystem::exists(params.BondGraphFileName.get())) { 61 std::ifstream input(params.BondGraphFileName.get().string().c_str()); 62 62 if ((input.good()) && (BG->LoadBondLengthTable(input))) { 63 63 LOG(0, "Bond length table parsed successfully."); … … 96 96 BondGraph *&BG = World::getInstance().getBondGraph(); 97 97 BG->CleanupBondLengthTable(); 98 std::ifstream input(state->params.BondGraphFileName. string().c_str());98 std::ifstream input(state->params.BondGraphFileName.get().string().c_str()); 99 99 if ((input.good()) && (BG->LoadBondLengthTable(input))) { 100 100 LOG(0, "Bond length table parsed successfully."); -
src/Actions/CommandAction/ElementDbAction.cpp
rb9c69d rf10b0c 60 60 // TODO: Make databasepath a std::string 61 61 config *configuration = World::getInstance().getConfig(); 62 strcpy(configuration->databasepath, params.databasepath. branch_path().string().c_str());62 strcpy(configuration->databasepath, params.databasepath.get().branch_path().string().c_str()); 63 63 64 64 // load table … … 96 96 // TODO: Make databasepath a std::string 97 97 config *configuration = World::getInstance().getConfig(); 98 strcpy(configuration->databasepath, state->params.databasepath. branch_path().string().c_str());98 strcpy(configuration->databasepath, state->params.databasepath.get().branch_path().string().c_str()); 99 99 100 100 // load table -
src/Actions/CommandAction/FastParsingAction.cpp
rb9c69d rf10b0c 40 40 bool oldvalue = configuration->FastParsing; 41 41 42 configuration->FastParsing = params.fastparsing ;42 configuration->FastParsing = params.fastparsing.get(); 43 43 if (configuration->FastParsing) 44 44 LOG(0, "I won't parse trajectories."); … … 65 65 66 66 config *configuration = World::getInstance().getConfig(); 67 configuration->FastParsing = state->params.fastparsing ;67 configuration->FastParsing = state->params.fastparsing.get(); 68 68 if (configuration->FastParsing) 69 69 LOG(0, "I won't parse trajectories."); -
src/Actions/CommandAction/HelpAction.cpp
rb9c69d rf10b0c 63 63 std::cout << std::endl; 64 64 // print list of actions or its options 65 if (params.actionname == "none") {65 if (params.actionname.get() == "none") { 66 66 // print list of all Actions 67 67 std::cout << "Here is a list of all available Actions:" << std::endl; … … 75 75 } else { 76 76 // retrieve command from Registry and print its help 77 if (ActionRegistry::getInstance().isActionPresentByName(params.actionname )) {78 const Action *instance = ActionRegistry::getInstance().getActionByName(params.actionname );77 if (ActionRegistry::getInstance().isActionPresentByName(params.actionname.get())) { 78 const Action *instance = ActionRegistry::getInstance().getActionByName(params.actionname.get()); 79 79 // else give description of Action and its option value if present 80 80 std::cout << instance->help(); … … 82 82 std::cout << std::endl; 83 83 } else { 84 ELOG(1, "No action is known by the name " << params.actionname << ".");84 ELOG(1, "No action is known by the name " << params.actionname.get() << "."); 85 85 return Action::failure; 86 86 } -
src/Actions/CommandAction/VerboseAction.cpp
rb9c69d rf10b0c 37 37 int oldverbosity = getVerbosity(); 38 38 39 if (oldverbosity != params.verbosity ) {39 if (oldverbosity != params.verbosity.get()) { 40 40 // prepare undo state 41 41 CommandVerboseState *UndoState = new CommandVerboseState(oldverbosity, params); 42 42 // set new verbosity 43 setVerbosity(params.verbosity );44 LOG(0, "Setting verbosity from " << oldverbosity << " to " << params.verbosity << ".");43 setVerbosity(params.verbosity.get()); 44 LOG(0, "Setting verbosity from " << oldverbosity << " to " << params.verbosity.get() << "."); 45 45 return Action::state_ptr(UndoState); 46 46 } else { … … 53 53 CommandVerboseState *state = assert_cast<CommandVerboseState*>(_state.get()); 54 54 55 LOG(0, "Setting verbosity from " << state->params.verbosity << " to " << state->oldverbosity << ".");55 LOG(0, "Setting verbosity from " << state->params.verbosity.get() << " to " << state->oldverbosity << "."); 56 56 setVerbosity(state->oldverbosity); 57 57 … … 62 62 CommandVerboseState *state = assert_cast<CommandVerboseState*>(_state.get()); 63 63 64 LOG(0, "Setting verbosity from " << state->oldverbosity << " to " << state->params.verbosity << ".");65 setVerbosity(state->params.verbosity );64 LOG(0, "Setting verbosity from " << state->oldverbosity << " to " << state->params.verbosity.get() << "."); 65 setVerbosity(state->params.verbosity.get()); 66 66 67 67 return Action::state_ptr(_state);
Note:
See TracChangeset
for help on using the changeset viewer.