Changeset f10b0c for src/UIElements/CommandLineUI/Query
- 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/UIElements/CommandLineUI/Query
- Files:
-
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
src/UIElements/CommandLineUI/Query/AtomCommandLineQuery.cpp
rb9c69d rf10b0c 33 33 using namespace std; 34 34 35 CommandLineDialog::AtomCommandLineQuery::AtomCommandLineQuery( std::string title, std::string _description) :36 Dialog::AtomQuery( title, _description)35 CommandLineDialog::AtomCommandLineQuery::AtomCommandLineQuery(Parameter<const atom *> ¶m, std::string title, std::string _description) : 36 Dialog::AtomQuery(param, title, _description) 37 37 {} 38 38 … … 43 43 if (CommandLineParser::getInstance().vm.count(getTitle())) { 44 44 IdxOfAtom = CommandLineParser::getInstance().vm[getTitle()].as<int>(); 45 tmp = World::getInstance().getAtom(AtomById(IdxOfAtom));45 tmp.set(World::getInstance().getAtom(AtomById(IdxOfAtom))); 46 46 return true; 47 47 } else { -
src/UIElements/CommandLineUI/Query/AtomsCommandLineQuery.cpp
rb9c69d rf10b0c 28 28 #include "World.hpp" 29 29 30 CommandLineDialog::AtomsCommandLineQuery::AtomsCommandLineQuery( std::string title, std::string _description) :31 Dialog::AtomsQuery( title, _description)30 CommandLineDialog::AtomsCommandLineQuery::AtomsCommandLineQuery(Parameter<std::vector<const atom *> > ¶m, std::string title, std::string _description) : 31 Dialog::AtomsQuery(param, title, _description) 32 32 {} 33 33 … … 38 38 if (CommandLineParser::getInstance().vm.count(getTitle())) { 39 39 IdxOfAtom = CommandLineParser::getInstance().vm[getTitle()].as< std::vector<int> >(); 40 std::vector<const atom *> temp_atoms; 40 41 for (std::vector<int>::iterator iter = IdxOfAtom.begin(); iter != IdxOfAtom.end(); ++iter) { 41 42 temp = World::getInstance().getAtom(AtomById(*iter)); 42 43 if (temp) 43 t mp.push_back(temp);44 temp_atoms.push_back(temp); 44 45 } 46 tmp.set(temp_atoms); 45 47 return true; 46 48 } else { -
src/UIElements/CommandLineUI/Query/BooleanCommandLineQuery.cpp
rb9c69d rf10b0c 25 25 #include "CodePatterns/Verbose.hpp" 26 26 27 CommandLineDialog::BooleanCommandLineQuery::BooleanCommandLineQuery( std::string title, std::string _description) :28 Dialog::BooleanQuery( title, _description)27 CommandLineDialog::BooleanCommandLineQuery::BooleanCommandLineQuery(Parameter<bool> ¶m, std::string title, std::string _description) : 28 Dialog::BooleanQuery(param, title, _description) 29 29 {} 30 30 … … 33 33 bool CommandLineDialog::BooleanCommandLineQuery::handle() { 34 34 if (CommandLineParser::getInstance().vm.count(getTitle())) { 35 tmp = CommandLineParser::getInstance().vm[getTitle()].as<bool>();35 tmp.set(CommandLineParser::getInstance().vm[getTitle()].as<bool>()); 36 36 return true; 37 37 } else { -
src/UIElements/CommandLineUI/Query/BoxCommandLineQuery.cpp
rb9c69d rf10b0c 27 27 #include "LinearAlgebra/RealSpaceMatrix.hpp" 28 28 29 CommandLineDialog::BoxCommandLineQuery::BoxCommandLineQuery( std::string title, std::string _description) :30 Dialog::BoxQuery( title, _description)29 CommandLineDialog::BoxCommandLineQuery::BoxCommandLineQuery(Parameter<Box> ¶m, std::string title, std::string _description) : 30 Dialog::BoxQuery(param, title, _description) 31 31 {} 32 32 … … 38 38 if (CommandLineParser::getInstance().vm.count(getTitle())) { 39 39 temp = CommandLineParser::getInstance().vm[getTitle()].as< BoxValue >(); 40 tmp = temp.toBox();40 tmp.set(temp.toBox()); 41 41 return true; 42 42 } else { -
src/UIElements/CommandLineUI/Query/CommandLineQuery.hpp
rb9c69d rf10b0c 26 26 class CommandLineDialog::IntCommandLineQuery : public Dialog::IntQuery { 27 27 public: 28 IntCommandLineQuery( std::string title, std::string _description = "");28 IntCommandLineQuery(Parameter<int> ¶m, std::string title, std::string _description = ""); 29 29 virtual ~IntCommandLineQuery(); 30 30 virtual bool handle(); … … 33 33 class CommandLineDialog::IntsCommandLineQuery : public Dialog::IntsQuery { 34 34 public: 35 IntsCommandLineQuery( std::string title, std::string _description = "");35 IntsCommandLineQuery(Parameter<std::vector<int> > ¶m, std::string title, std::string _description = ""); 36 36 virtual ~IntsCommandLineQuery(); 37 37 virtual bool handle(); … … 40 40 class CommandLineDialog::UnsignedIntCommandLineQuery : public Dialog::UnsignedIntQuery { 41 41 public: 42 UnsignedIntCommandLineQuery( std::string title, std::string _description = "");42 UnsignedIntCommandLineQuery(Parameter<unsigned int> ¶m, std::string title, std::string _description = ""); 43 43 virtual ~UnsignedIntCommandLineQuery(); 44 44 virtual bool handle(); … … 47 47 class CommandLineDialog::UnsignedIntsCommandLineQuery : public Dialog::UnsignedIntsQuery { 48 48 public: 49 UnsignedIntsCommandLineQuery( std::string title, std::string _description = "");49 UnsignedIntsCommandLineQuery(Parameter<std::vector<unsigned int> > ¶m, std::string title, std::string _description = ""); 50 50 virtual ~UnsignedIntsCommandLineQuery(); 51 51 virtual bool handle(); … … 54 54 class CommandLineDialog::BooleanCommandLineQuery : public Dialog::BooleanQuery { 55 55 public: 56 BooleanCommandLineQuery( std::string title, std::string _description = "");56 BooleanCommandLineQuery(Parameter<bool> ¶m, std::string title, std::string _description = ""); 57 57 virtual ~BooleanCommandLineQuery(); 58 58 virtual bool handle(); … … 61 61 class CommandLineDialog::DoubleCommandLineQuery : public Dialog::DoubleQuery { 62 62 public: 63 DoubleCommandLineQuery( std::string title, std::string _description = "");63 DoubleCommandLineQuery(Parameter<double> ¶m, std::string title, std::string _description = ""); 64 64 virtual ~DoubleCommandLineQuery(); 65 65 virtual bool handle(); … … 68 68 class CommandLineDialog::DoublesCommandLineQuery : public Dialog::DoublesQuery { 69 69 public: 70 DoublesCommandLineQuery( std::string title, std::string _description = "");70 DoublesCommandLineQuery(Parameter<std::vector<double> > ¶m, std::string title, std::string _description = ""); 71 71 virtual ~DoublesCommandLineQuery(); 72 72 virtual bool handle(); … … 75 75 class CommandLineDialog::StringCommandLineQuery : public Dialog::StringQuery { 76 76 public: 77 StringCommandLineQuery( std::string title, std::string _description = "");77 StringCommandLineQuery(Parameter<std::string> ¶m, std::string title, std::string _description = ""); 78 78 virtual ~StringCommandLineQuery(); 79 79 virtual bool handle(); … … 82 82 class CommandLineDialog::StringsCommandLineQuery : public Dialog::StringsQuery { 83 83 public: 84 StringsCommandLineQuery( std::string title, std::string _description = "");84 StringsCommandLineQuery(Parameter<std::vector<std::string> > ¶m, std::string title, std::string _description = ""); 85 85 virtual ~StringsCommandLineQuery(); 86 86 virtual bool handle(); … … 89 89 class CommandLineDialog::AtomCommandLineQuery : public Dialog::AtomQuery { 90 90 public: 91 AtomCommandLineQuery( std::string title, std::string _description = "");91 AtomCommandLineQuery(Parameter<const atom *> ¶m, std::string title, std::string _description = ""); 92 92 virtual ~AtomCommandLineQuery(); 93 93 virtual bool handle(); … … 96 96 class CommandLineDialog::AtomsCommandLineQuery : public Dialog::AtomsQuery { 97 97 public: 98 AtomsCommandLineQuery( std::string title, std::string _description = "");98 AtomsCommandLineQuery(Parameter<std::vector<const atom *> > ¶m, std::string title, std::string _description = ""); 99 99 virtual ~AtomsCommandLineQuery(); 100 100 virtual bool handle(); … … 103 103 class CommandLineDialog::MoleculeCommandLineQuery : public Dialog::MoleculeQuery { 104 104 public: 105 MoleculeCommandLineQuery( std::string title, std::string _description = "");105 MoleculeCommandLineQuery(Parameter<const molecule *> ¶m, std::string title, std::string _description = ""); 106 106 virtual ~MoleculeCommandLineQuery(); 107 107 virtual bool handle(); … … 110 110 class CommandLineDialog::MoleculesCommandLineQuery : public Dialog::MoleculesQuery { 111 111 public: 112 MoleculesCommandLineQuery( std::string title, std::string _description = "");112 MoleculesCommandLineQuery(Parameter<std::vector<const molecule *> > ¶m, std::string title, std::string _description = ""); 113 113 virtual ~MoleculesCommandLineQuery(); 114 114 virtual bool handle(); … … 117 117 class CommandLineDialog::VectorCommandLineQuery : public Dialog::VectorQuery { 118 118 public: 119 VectorCommandLineQuery( std::string title,bool _check, std::string _description = "");119 VectorCommandLineQuery(Parameter<Vector> ¶m, std::string title,bool _check, std::string _description = ""); 120 120 virtual ~VectorCommandLineQuery(); 121 121 virtual bool handle(); … … 124 124 class CommandLineDialog::VectorsCommandLineQuery : public Dialog::VectorsQuery { 125 125 public: 126 VectorsCommandLineQuery( std::string title,bool _check, std::string _description = "");126 VectorsCommandLineQuery(Parameter<std::vector<Vector> > ¶m, std::string title,bool _check, std::string _description = ""); 127 127 virtual ~VectorsCommandLineQuery(); 128 128 virtual bool handle(); … … 131 131 class CommandLineDialog::BoxCommandLineQuery : public Dialog::BoxQuery { 132 132 public: 133 BoxCommandLineQuery( std::string title, std::string _description = "");133 BoxCommandLineQuery(Parameter<Box> ¶m, std::string title, std::string _description = ""); 134 134 virtual ~BoxCommandLineQuery(); 135 135 virtual bool handle(); … … 138 138 class CommandLineDialog::ElementCommandLineQuery : public Dialog::ElementQuery { 139 139 public: 140 ElementCommandLineQuery( std::string title, std::string _description = "");140 ElementCommandLineQuery(Parameter<const element *> ¶m, std::string title, std::string _description = ""); 141 141 virtual ~ElementCommandLineQuery(); 142 142 virtual bool handle(); … … 145 145 class CommandLineDialog::ElementsCommandLineQuery : public Dialog::ElementsQuery { 146 146 public: 147 ElementsCommandLineQuery( std::string title, std::string _description = "");147 ElementsCommandLineQuery(Parameter<std::vector<const element *> > ¶m, std::string title, std::string _description = ""); 148 148 virtual ~ElementsCommandLineQuery(); 149 149 virtual bool handle(); … … 152 152 class CommandLineDialog::FileCommandLineQuery : public Dialog::FileQuery { 153 153 public: 154 FileCommandLineQuery( std::string title, std::string _description = "");154 FileCommandLineQuery(Parameter<boost::filesystem::path> ¶m, std::string title, std::string _description = ""); 155 155 virtual ~FileCommandLineQuery(); 156 156 virtual bool handle(); … … 159 159 class CommandLineDialog::RandomNumberDistribution_ParametersCommandLineQuery : public Dialog::RandomNumberDistribution_ParametersQuery { 160 160 public: 161 RandomNumberDistribution_ParametersCommandLineQuery( std::string title, std::string _description = "");161 RandomNumberDistribution_ParametersCommandLineQuery(Parameter<RandomNumberDistribution_Parameters> ¶m, std::string title, std::string _description = ""); 162 162 virtual ~RandomNumberDistribution_ParametersCommandLineQuery(); 163 163 virtual bool handle(); -
src/UIElements/CommandLineUI/Query/DoubleCommandLineQuery.cpp
rb9c69d rf10b0c 26 26 27 27 28 CommandLineDialog::DoubleCommandLineQuery::DoubleCommandLineQuery( std::string title, std::string _description) :29 Dialog::DoubleQuery( title, _description)28 CommandLineDialog::DoubleCommandLineQuery::DoubleCommandLineQuery(Parameter<double> ¶m, std::string title, std::string _description) : 29 Dialog::DoubleQuery(param, title, _description) 30 30 {} 31 31 … … 34 34 bool CommandLineDialog::DoubleCommandLineQuery::handle() { 35 35 if (CommandLineParser::getInstance().vm.count(getTitle())) { 36 tmp = CommandLineParser::getInstance().vm[getTitle()].as<double>();36 tmp.set(CommandLineParser::getInstance().vm[getTitle()].as<double>()); 37 37 return true; 38 38 } else { -
src/UIElements/CommandLineUI/Query/DoublesCommandLineQuery.cpp
rb9c69d rf10b0c 25 25 #include "CodePatterns/Verbose.hpp" 26 26 27 CommandLineDialog::DoublesCommandLineQuery::DoublesCommandLineQuery( std::string title, std::string _description) :28 Dialog::DoublesQuery( title, _description)27 CommandLineDialog::DoublesCommandLineQuery::DoublesCommandLineQuery(Parameter<std::vector<double> > ¶m, std::string title, std::string _description) : 28 Dialog::DoublesQuery(param, title, _description) 29 29 {} 30 30 … … 33 33 bool CommandLineDialog::DoublesCommandLineQuery::handle() { 34 34 if (CommandLineParser::getInstance().vm.count(getTitle())) { 35 tmp = CommandLineParser::getInstance().vm[getTitle()].as< std::vector<double> >();35 tmp.set(CommandLineParser::getInstance().vm[getTitle()].as< std::vector<double> >()); 36 36 return true; 37 37 } else { -
src/UIElements/CommandLineUI/Query/ElementCommandLineQuery.cpp
rb9c69d rf10b0c 28 28 #include "World.hpp" 29 29 30 CommandLineDialog::ElementCommandLineQuery::ElementCommandLineQuery( std::string title, std::string _description) :31 Dialog::ElementQuery( title, _description)30 CommandLineDialog::ElementCommandLineQuery::ElementCommandLineQuery(Parameter<const element*> ¶m, std::string title, std::string _description) : 31 Dialog::ElementQuery(param, title, _description) 32 32 {} 33 33 … … 40 40 if (CommandLineParser::getInstance().vm.count(getTitle())) { 41 41 int Z = CommandLineParser::getInstance().vm[getTitle()].as< int >(); 42 tmp = periode->FindElement(Z);43 ASSERT(tmp != NULL, "Invalid element specified in ElementCommandLineQuery");42 tmp.set(periode->FindElement(Z)); 43 ASSERT(tmp.get() != NULL, "Invalid element specified in ElementCommandLineQuery"); 44 44 return true; 45 45 } else { -
src/UIElements/CommandLineUI/Query/ElementsCommandLineQuery.cpp
rb9c69d rf10b0c 28 28 #include "World.hpp" 29 29 30 CommandLineDialog::ElementsCommandLineQuery::ElementsCommandLineQuery( std::string title, std::string _description) :31 Dialog::ElementsQuery( title, _description)30 CommandLineDialog::ElementsCommandLineQuery::ElementsCommandLineQuery(Parameter<std::vector<const element*> > ¶m, std::string title, std::string _description) : 31 Dialog::ElementsQuery(param, title, _description) 32 32 {} 33 33 … … 40 40 if (CommandLineParser::getInstance().vm.count(getTitle())) { 41 41 vector<int> AllElements = CommandLineParser::getInstance().vm[getTitle()].as< vector<int> >(); 42 vector<const element *> temp_elements; 42 43 for (vector<int>::iterator ZRunner = AllElements.begin(); ZRunner != AllElements.end(); ++ZRunner) { 43 44 temp = periode->FindElement(*ZRunner); 44 45 ASSERT(temp != NULL, "Invalid element specified in ElementCommandLineQuery"); 45 t mp.push_back(temp);46 temp_elements.push_back(temp); 46 47 } 48 tmp.set(temp_elements); 47 49 return true; 48 50 } else { -
src/UIElements/CommandLineUI/Query/FileCommandLineQuery.cpp
rb9c69d rf10b0c 25 25 #include "CodePatterns/Verbose.hpp" 26 26 27 CommandLineDialog::FileCommandLineQuery::FileCommandLineQuery( std::string title, std::string _description) :28 Dialog::FileQuery( title, _description)27 CommandLineDialog::FileCommandLineQuery::FileCommandLineQuery(Parameter<boost::filesystem::path> ¶m, std::string title, std::string _description) : 28 Dialog::FileQuery(param, title, _description) 29 29 {} 30 30 … … 33 33 bool CommandLineDialog::FileCommandLineQuery::handle() { 34 34 if (CommandLineParser::getInstance().vm.count(getTitle())) { 35 tmp = CommandLineParser::getInstance().vm[getTitle()].as< boost::filesystem::path >();35 tmp.set(CommandLineParser::getInstance().vm[getTitle()].as< boost::filesystem::path >()); 36 36 return true; 37 37 } else { -
src/UIElements/CommandLineUI/Query/IntCommandLineQuery.cpp
rb9c69d rf10b0c 25 25 #include "CodePatterns/Verbose.hpp" 26 26 27 CommandLineDialog::IntCommandLineQuery::IntCommandLineQuery( std::string title, std::string _description) :28 Dialog::IntQuery( title, _description)27 CommandLineDialog::IntCommandLineQuery::IntCommandLineQuery(Parameter<int> ¶m, std::string title, std::string _description) : 28 Dialog::IntQuery(param, title, _description) 29 29 {} 30 30 … … 33 33 bool CommandLineDialog::IntCommandLineQuery::handle() { 34 34 if (CommandLineParser::getInstance().vm.count(getTitle())) { 35 tmp = CommandLineParser::getInstance().vm[getTitle()].as<int>();35 tmp.set(CommandLineParser::getInstance().vm[getTitle()].as<int>()); 36 36 return true; 37 37 } else { -
src/UIElements/CommandLineUI/Query/IntsCommandLineQuery.cpp
rb9c69d rf10b0c 25 25 #include "CodePatterns/Verbose.hpp" 26 26 27 CommandLineDialog::IntsCommandLineQuery::IntsCommandLineQuery( std::string title, std::string _description) :28 Dialog::IntsQuery( title, _description)27 CommandLineDialog::IntsCommandLineQuery::IntsCommandLineQuery(Parameter<std::vector<int> > ¶m, std::string title, std::string _description) : 28 Dialog::IntsQuery(param, title, _description) 29 29 {} 30 30 … … 33 33 bool CommandLineDialog::IntsCommandLineQuery::handle() { 34 34 if (CommandLineParser::getInstance().vm.count(getTitle())) { 35 tmp = CommandLineParser::getInstance().vm[getTitle()].as< std::vector<int> >();35 tmp.set(CommandLineParser::getInstance().vm[getTitle()].as< std::vector<int> >()); 36 36 return true; 37 37 } else { -
src/UIElements/CommandLineUI/Query/MoleculeCommandLineQuery.cpp
rb9c69d rf10b0c 28 28 #include "CodePatterns/Verbose.hpp" 29 29 30 CommandLineDialog::MoleculeCommandLineQuery::MoleculeCommandLineQuery( std::string title, std::string _description) :31 Dialog::MoleculeQuery( title, _description)30 CommandLineDialog::MoleculeCommandLineQuery::MoleculeCommandLineQuery(Parameter<const molecule *> ¶m, std::string title, std::string _description) : 31 Dialog::MoleculeQuery(param, title, _description) 32 32 {} 33 33 … … 38 38 if (CommandLineParser::getInstance().vm.count(getTitle())) { 39 39 IdxOfMol = CommandLineParser::getInstance().vm[getTitle()].as<int>(); 40 tmp = World::getInstance().getMolecule(MoleculeById(IdxOfMol));40 tmp.set(World::getInstance().getMolecule(MoleculeById(IdxOfMol))); 41 41 return true; 42 42 } else { -
src/UIElements/CommandLineUI/Query/MoleculesCommandLineQuery.cpp
rb9c69d rf10b0c 29 29 #include "World.hpp" 30 30 31 CommandLineDialog::MoleculesCommandLineQuery::MoleculesCommandLineQuery( std::string title, std::string _description) :32 Dialog::MoleculesQuery( title, _description)31 CommandLineDialog::MoleculesCommandLineQuery::MoleculesCommandLineQuery(Parameter<std::vector<const molecule *> > ¶m, std::string title, std::string _description) : 32 Dialog::MoleculesQuery(param, title, _description) 33 33 {} 34 34 … … 39 39 if (CommandLineParser::getInstance().vm.count(getTitle())) { 40 40 IdxOfMol = CommandLineParser::getInstance().vm[getTitle()].as< std::vector<int> >(); 41 std::vector<const molecule *> temp_molecules; 41 42 for (std::vector<int>::iterator iter = IdxOfMol.begin(); iter != IdxOfMol.end(); ++iter) { 42 43 temp = World::getInstance().getMolecule(MoleculeById(*iter)); 43 44 if (temp) 44 t mp.push_back(temp);45 temp_molecules.push_back(temp); 45 46 } 47 tmp.set(temp_molecules); 46 48 return true; 47 49 } else { -
src/UIElements/CommandLineUI/Query/RandomNumberDistribution_ParametersCommandLineQuery.cpp
rb9c69d rf10b0c 31 31 #include "RandomNumbers/RandomNumberDistribution_Parameters.hpp" 32 32 33 CommandLineDialog::RandomNumberDistribution_ParametersCommandLineQuery::RandomNumberDistribution_ParametersCommandLineQuery( std::string title, std::string _description) :34 Dialog::RandomNumberDistribution_ParametersQuery( title, _description)33 CommandLineDialog::RandomNumberDistribution_ParametersCommandLineQuery::RandomNumberDistribution_ParametersCommandLineQuery(Parameter<RandomNumberDistribution_Parameters> ¶m, std::string title, std::string _description) : 34 Dialog::RandomNumberDistribution_ParametersQuery(param, title, _description) 35 35 {} 36 36 … … 42 42 std::stringstream text(stringtext); 43 43 // LOG(1, "INFO: Parameter set from CommandLine is '" << text.str() << "'"); 44 text >> tmp; 44 RandomNumberDistribution_Parameters temp_params; 45 text >> temp_params; 46 tmp.set(temp_params); 45 47 return true; 46 48 } else { -
src/UIElements/CommandLineUI/Query/StringCommandLineQuery.cpp
rb9c69d rf10b0c 25 25 #include "CodePatterns/Verbose.hpp" 26 26 27 CommandLineDialog::StringCommandLineQuery::StringCommandLineQuery( std::string title, std::string _description) :28 Dialog::StringQuery( title, _description)27 CommandLineDialog::StringCommandLineQuery::StringCommandLineQuery(Parameter<std::string> ¶m, std::string title, std::string _description) : 28 Dialog::StringQuery(param, title, _description) 29 29 {} 30 30 … … 33 33 bool CommandLineDialog::StringCommandLineQuery::handle() { 34 34 if (CommandLineParser::getInstance().vm.count(getTitle())) { 35 tmp = CommandLineParser::getInstance().vm[getTitle()].as<string>();35 tmp.set(CommandLineParser::getInstance().vm[getTitle()].as<string>()); 36 36 return true; 37 37 } else { -
src/UIElements/CommandLineUI/Query/StringsCommandLineQuery.cpp
rb9c69d rf10b0c 25 25 #include "CodePatterns/Verbose.hpp" 26 26 27 CommandLineDialog::StringsCommandLineQuery::StringsCommandLineQuery( std::string title, std::string _description) :28 Dialog::StringsQuery( title, _description)27 CommandLineDialog::StringsCommandLineQuery::StringsCommandLineQuery(Parameter<std::vector<std::string> > ¶m, std::string title, std::string _description) : 28 Dialog::StringsQuery(param, title, _description) 29 29 {} 30 30 … … 33 33 bool CommandLineDialog::StringsCommandLineQuery::handle() { 34 34 if (CommandLineParser::getInstance().vm.count(getTitle())) { 35 tmp = CommandLineParser::getInstance().vm[getTitle()].as< std::vector<std::string> >();35 tmp.set(CommandLineParser::getInstance().vm[getTitle()].as< std::vector<std::string> >()); 36 36 return true; 37 37 } else { -
src/UIElements/CommandLineUI/Query/UnsignedIntCommandLineQuery.cpp
rb9c69d rf10b0c 25 25 #include "CodePatterns/Verbose.hpp" 26 26 27 CommandLineDialog::UnsignedIntCommandLineQuery::UnsignedIntCommandLineQuery( std::string title, std::string _description) :28 Dialog::UnsignedIntQuery( title, _description)27 CommandLineDialog::UnsignedIntCommandLineQuery::UnsignedIntCommandLineQuery(Parameter<unsigned int> ¶m, std::string title, std::string _description) : 28 Dialog::UnsignedIntQuery(param, title, _description) 29 29 {} 30 30 … … 33 33 bool CommandLineDialog::UnsignedIntCommandLineQuery::handle() { 34 34 if (CommandLineParser::getInstance().vm.count(getTitle())) { 35 tmp = CommandLineParser::getInstance().vm[getTitle()].as<unsigned int>();35 tmp.set(CommandLineParser::getInstance().vm[getTitle()].as<unsigned int>()); 36 36 return true; 37 37 } else { -
src/UIElements/CommandLineUI/Query/UnsignedIntsCommandLineQuery.cpp
rb9c69d rf10b0c 25 25 #include "CodePatterns/Verbose.hpp" 26 26 27 CommandLineDialog::UnsignedIntsCommandLineQuery::UnsignedIntsCommandLineQuery( std::string title, std::string _description) :28 Dialog::UnsignedIntsQuery( title, _description)27 CommandLineDialog::UnsignedIntsCommandLineQuery::UnsignedIntsCommandLineQuery(Parameter<std::vector<unsigned int> > ¶m, std::string title, std::string _description) : 28 Dialog::UnsignedIntsQuery(param, title, _description) 29 29 {} 30 30 … … 33 33 bool CommandLineDialog::UnsignedIntsCommandLineQuery::handle() { 34 34 if (CommandLineParser::getInstance().vm.count(getTitle())) { 35 tmp = CommandLineParser::getInstance().vm[getTitle()].as< std::vector<unsigned int> >();35 tmp.set(CommandLineParser::getInstance().vm[getTitle()].as< std::vector<unsigned int> >()); 36 36 return true; 37 37 } else { -
src/UIElements/CommandLineUI/Query/VectorCommandLineQuery.cpp
rb9c69d rf10b0c 29 29 #include "World.hpp" 30 30 31 CommandLineDialog::VectorCommandLineQuery::VectorCommandLineQuery( std::string title, bool _check, std::string _description) :32 Dialog::VectorQuery( title,_check, _description)31 CommandLineDialog::VectorCommandLineQuery::VectorCommandLineQuery(Parameter<Vector> ¶m, std::string title, bool _check, std::string _description) : 32 Dialog::VectorQuery(param, title,_check, _description) 33 33 {} 34 34 … … 40 40 if (CommandLineParser::getInstance().vm.count(getTitle())) { 41 41 temp = CommandLineParser::getInstance().vm[getTitle()].as< VectorValue >(); 42 tmp= temp.toVector();43 if ((check) && (!World::getInstance().getDomain().isValid(t mp))) {44 ELOG(1, "Vector " << t mp<< " would be outside of box domain.");42 Vector temp_vector = temp.toVector(); 43 if ((check) && (!World::getInstance().getDomain().isValid(temp_vector))) { 44 ELOG(1, "Vector " << temp_vector << " would be outside of box domain."); 45 45 return false; 46 46 } 47 tmp.set(temp_vector); 47 48 return true; 48 49 } else { -
src/UIElements/CommandLineUI/Query/VectorsCommandLineQuery.cpp
rb9c69d rf10b0c 29 29 #include "World.hpp" 30 30 31 CommandLineDialog::VectorsCommandLineQuery::VectorsCommandLineQuery( std::string title, bool _check, std::string _description) :32 Dialog::VectorsQuery( title,_check, _description)31 CommandLineDialog::VectorsCommandLineQuery::VectorsCommandLineQuery(Parameter<std::vector<Vector> > ¶m, std::string title, bool _check, std::string _description) : 32 Dialog::VectorsQuery(param, title,_check, _description) 33 33 {} 34 34 … … 40 40 if (CommandLineParser::getInstance().vm.count(getTitle())) { 41 41 temporary = CommandLineParser::getInstance().vm[getTitle()].as< std::vector<VectorValue> >(); 42 std::vector<Vector> temp_vectors; 42 43 for(std::vector<VectorValue>::iterator iter = temporary.begin(); iter != temporary.end(); ++iter) { 43 44 temp = (*iter).toVector(); 44 45 if ((!check) || (World::getInstance().getDomain().isValid(temp))) 45 t mp.push_back(temp);46 temp_vectors.push_back(temp); 46 47 else 47 48 ELOG(1, "Vector " << temp << " would be outside of box domain."); 48 49 } 50 tmp.set(temp_vectors); 49 51 return true; 50 52 } else {
Note:
See TracChangeset
for help on using the changeset viewer.