- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/UIElements/CommandLineUI/CommandLineDialog.cpp
r84c494 rb9c847 27 27 #include "verbose.hpp" 28 28 #include "World.hpp" 29 #include "Box.hpp"30 29 31 30 #include "atom.hpp" … … 66 65 } 67 66 67 void CommandLineDialog::queryStrings(const char* title, vector<string> * target, string _description){ 68 registerQuery(new StringsCommandLineQuery(title,target, _description)); 69 } 70 68 71 void CommandLineDialog::queryAtom(const char* title, atom **target, string _description) { 69 72 registerQuery(new AtomCommandLineQuery(title,target, _description)); … … 74 77 } 75 78 76 void CommandLineDialog::queryVector(const char* title, Vector *target, bool check, string _description) {77 registerQuery(new VectorCommandLineQuery(title,target,c heck, _description));78 } 79 80 void CommandLineDialog::queryBox(const char* title, Box*cellSize, string _description) {79 void CommandLineDialog::queryVector(const char* title, Vector *target,const double *const cellSize, bool check, string _description) { 80 registerQuery(new VectorCommandLineQuery(title,target,cellSize,check, _description)); 81 } 82 83 void CommandLineDialog::queryBox(const char* title, double ** const cellSize, string _description) { 81 84 registerQuery(new BoxCommandLineQuery(title,cellSize,_description)); 82 85 } … … 140 143 if (CommandLineParser::getInstance().vm.count(getTitle())) { 141 144 tmp = CommandLineParser::getInstance().vm[getTitle()].as<string>(); 145 return true; 146 } else { 147 DoeLog(1) && (eLog() << Verbose(1) << "CommandLineUI parsing error: Missing string for " << getTitle() << "." << endl); 148 return false; 149 } 150 } 151 152 CommandLineDialog::StringsCommandLineQuery::StringsCommandLineQuery(string title,vector<string> *_target, string _description) : 153 Dialog::StringsQuery(title,_target, _description) 154 {} 155 156 CommandLineDialog::StringsCommandLineQuery::~StringsCommandLineQuery() {} 157 158 bool CommandLineDialog::StringsCommandLineQuery::handle() { 159 if (CommandLineParser::getInstance().vm.count(getTitle())) { 160 tmp = CommandLineParser::getInstance().vm[getTitle()].as< vector<string> >(); 142 161 return true; 143 162 } else { … … 203 222 } 204 223 205 CommandLineDialog::VectorCommandLineQuery::VectorCommandLineQuery(string title, Vector *_target, bool _check, string _description) :206 Dialog::VectorQuery(title,_target,_c heck, _description)224 CommandLineDialog::VectorCommandLineQuery::VectorCommandLineQuery(string title, Vector *_target, const double *const _cellSize, bool _check, string _description) : 225 Dialog::VectorQuery(title,_target,_cellSize,_check, _description) 207 226 {} 208 227 … … 225 244 226 245 227 CommandLineDialog::BoxCommandLineQuery::BoxCommandLineQuery(string title, Box*_cellSize, string _description) :246 CommandLineDialog::BoxCommandLineQuery::BoxCommandLineQuery(string title, double ** const _cellSize, string _description) : 228 247 Dialog::BoxQuery(title,_cellSize, _description) 229 248 {}
Note:
See TracChangeset
for help on using the changeset viewer.