1 | /*
|
---|
2 | * Project: MoleCuilder
|
---|
3 | * Description: creates and alters molecular systems
|
---|
4 | * Copyright (C) 2010-2012 University of Bonn. All rights reserved.
|
---|
5 | * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
|
---|
6 | */
|
---|
7 |
|
---|
8 | /*
|
---|
9 | * CommandLineDialog.cpp
|
---|
10 | *
|
---|
11 | * Created on: May 8, 2010
|
---|
12 | * Author: heber
|
---|
13 | */
|
---|
14 |
|
---|
15 | // include config.h
|
---|
16 | #ifdef HAVE_CONFIG_H
|
---|
17 | #include <config.h>
|
---|
18 | #endif
|
---|
19 |
|
---|
20 | #include "CodePatterns/MemDebug.hpp"
|
---|
21 |
|
---|
22 | #include "CommandLineUI/CommandLineDialog.hpp"
|
---|
23 | #include "CommandLineUI/Query/CommandLineQuery.hpp"
|
---|
24 |
|
---|
25 |
|
---|
26 | using namespace std;
|
---|
27 |
|
---|
28 |
|
---|
29 | CommandLineDialog::CommandLineDialog()
|
---|
30 | {
|
---|
31 | }
|
---|
32 |
|
---|
33 | CommandLineDialog::~CommandLineDialog()
|
---|
34 | {
|
---|
35 | }
|
---|
36 |
|
---|
37 |
|
---|
38 | void CommandLineDialog::queryEmpty(const char* title, std::string _description){
|
---|
39 | registerQuery(new EmptyCommandLineQuery(title, _description));
|
---|
40 | }
|
---|
41 |
|
---|
42 | void CommandLineDialog::queryInt(Parameter<int> ¶m, const char* title, std::string _description){
|
---|
43 | registerQuery(new IntCommandLineQuery(param, title, _description));
|
---|
44 | }
|
---|
45 |
|
---|
46 | void CommandLineDialog::queryInts(Parameter<std::vector<int> > ¶m, const char* title, std::string _description){
|
---|
47 | registerQuery(new IntsCommandLineQuery(param, title, _description));
|
---|
48 | }
|
---|
49 |
|
---|
50 | void CommandLineDialog::queryUnsignedInt(Parameter<unsigned int> ¶m, const char* title, std::string _description){
|
---|
51 | registerQuery(new UnsignedIntCommandLineQuery(param, title, _description));
|
---|
52 | }
|
---|
53 |
|
---|
54 | void CommandLineDialog::queryUnsignedInts(Parameter<std::vector<unsigned int> > ¶m, const char* title, std::string _description){
|
---|
55 | registerQuery(new UnsignedIntsCommandLineQuery(param, title, _description));
|
---|
56 | }
|
---|
57 |
|
---|
58 | void CommandLineDialog::queryBoolean(Parameter<bool> ¶m, const char* title, std::string _description){
|
---|
59 | registerQuery(new BooleanCommandLineQuery(param, title, _description));
|
---|
60 | }
|
---|
61 |
|
---|
62 | void CommandLineDialog::queryDouble(Parameter<double> ¶m, const char* title, std::string _description){
|
---|
63 | registerQuery(new DoubleCommandLineQuery(param, title, _description));
|
---|
64 | }
|
---|
65 |
|
---|
66 | void CommandLineDialog::queryDoubles(Parameter<std::vector<double> > ¶m, const char* title, std::string _description){
|
---|
67 | registerQuery(new DoublesCommandLineQuery(param, title, _description));
|
---|
68 | }
|
---|
69 |
|
---|
70 | void CommandLineDialog::queryString(Parameter<std::string> ¶m, const char* title, std::string _description){
|
---|
71 | registerQuery(new StringCommandLineQuery(param, title, _description));
|
---|
72 | }
|
---|
73 |
|
---|
74 | void CommandLineDialog::queryStrings(Parameter<std::vector<std::string> > ¶m, const char* title, std::string _description){
|
---|
75 | registerQuery(new StringsCommandLineQuery(param, title, _description));
|
---|
76 | }
|
---|
77 |
|
---|
78 | void CommandLineDialog::queryAtom(Parameter<const atom *> ¶m, const char* title, std::string _description) {
|
---|
79 | registerQuery(new AtomCommandLineQuery(param, title, _description));
|
---|
80 | }
|
---|
81 |
|
---|
82 | void CommandLineDialog::queryAtoms(Parameter<std::vector<const atom *> > ¶m, const char* title, std::string _description) {
|
---|
83 | registerQuery(new AtomsCommandLineQuery(param, title, _description));
|
---|
84 | }
|
---|
85 |
|
---|
86 | void CommandLineDialog::queryMolecule(Parameter<const molecule *> ¶m, const char* title, std::string _description) {
|
---|
87 | registerQuery(new MoleculeCommandLineQuery(param, title, _description));
|
---|
88 | }
|
---|
89 |
|
---|
90 | void CommandLineDialog::queryMolecules(Parameter<std::vector<const molecule *> > ¶m, const char* title, std::string _description) {
|
---|
91 | registerQuery(new MoleculesCommandLineQuery(param, title, _description));
|
---|
92 | }
|
---|
93 |
|
---|
94 | void CommandLineDialog::queryVector(Parameter<Vector> ¶m, const char* title, bool check, std::string _description) {
|
---|
95 | registerQuery(new VectorCommandLineQuery(param, title,check, _description));
|
---|
96 | }
|
---|
97 |
|
---|
98 | void CommandLineDialog::queryVectors(Parameter<std::vector<Vector> > ¶m, const char* title, bool check, std::string _description) {
|
---|
99 | registerQuery(new VectorsCommandLineQuery(param, title,check, _description));
|
---|
100 | }
|
---|
101 |
|
---|
102 | void CommandLineDialog::queryBox(Parameter<Box> ¶m, const char* title, std::string _description) {
|
---|
103 | registerQuery(new BoxCommandLineQuery(param, title,_description));
|
---|
104 | }
|
---|
105 |
|
---|
106 | void CommandLineDialog::queryElement(Parameter<const element *> ¶m, const char* title, std::string _description){
|
---|
107 | registerQuery(new ElementCommandLineQuery(param, title, _description));
|
---|
108 | }
|
---|
109 |
|
---|
110 | void CommandLineDialog::queryElements(Parameter<std::vector<const element *> > ¶m, const char* title, std::string _description){
|
---|
111 | registerQuery(new ElementsCommandLineQuery(param, title, _description));
|
---|
112 | }
|
---|
113 |
|
---|
114 | void CommandLineDialog::queryFile(Parameter<boost::filesystem::path> ¶m, const char* title, std::string _description){
|
---|
115 | registerQuery(new FileCommandLineQuery(param, title, _description));
|
---|
116 | }
|
---|
117 |
|
---|
118 | void CommandLineDialog::queryRandomNumberDistribution_Parameters(Parameter<RandomNumberDistribution_Parameters> ¶m, const char* title, std::string _description){
|
---|
119 | registerQuery(new RandomNumberDistribution_ParametersCommandLineQuery(param, title, _description));
|
---|
120 | }
|
---|
121 |
|
---|
122 | /************************** Query Infrastructure ************************/
|
---|
123 | /* ---> shifted to folder Query */
|
---|
124 | /************************************************************************/
|
---|