Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/UIElements/CommandLineUI/CommandLineDialog.cpp

    r84c494 rb9c847  
    2727#include "verbose.hpp"
    2828#include "World.hpp"
    29 #include "Box.hpp"
    3029
    3130#include "atom.hpp"
     
    6665}
    6766
     67void CommandLineDialog::queryStrings(const char* title, vector<string> * target, string _description){
     68  registerQuery(new StringsCommandLineQuery(title,target, _description));
     69}
     70
    6871void CommandLineDialog::queryAtom(const char* title, atom **target, string _description) {
    6972  registerQuery(new AtomCommandLineQuery(title,target, _description));
     
    7477}
    7578
    76 void CommandLineDialog::queryVector(const char* title, Vector *target, bool check, string _description) {
    77   registerQuery(new VectorCommandLineQuery(title,target,check, _description));
    78 }
    79 
    80 void CommandLineDialog::queryBox(const char* title, Box* cellSize, string _description) {
     79void 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
     83void CommandLineDialog::queryBox(const char* title, double ** const cellSize, string _description) {
    8184  registerQuery(new BoxCommandLineQuery(title,cellSize,_description));
    8285}
     
    140143  if (CommandLineParser::getInstance().vm.count(getTitle())) {
    141144    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
     152CommandLineDialog::StringsCommandLineQuery::StringsCommandLineQuery(string title,vector<string> *_target, string _description) :
     153    Dialog::StringsQuery(title,_target, _description)
     154{}
     155
     156CommandLineDialog::StringsCommandLineQuery::~StringsCommandLineQuery() {}
     157
     158bool CommandLineDialog::StringsCommandLineQuery::handle() {
     159  if (CommandLineParser::getInstance().vm.count(getTitle())) {
     160    tmp = CommandLineParser::getInstance().vm[getTitle()].as< vector<string> >();
    142161    return true;
    143162  } else {
     
    203222}
    204223
    205 CommandLineDialog::VectorCommandLineQuery::VectorCommandLineQuery(string title, Vector *_target, bool _check, string _description) :
    206     Dialog::VectorQuery(title,_target,_check, _description)
     224CommandLineDialog::VectorCommandLineQuery::VectorCommandLineQuery(string title, Vector *_target, const double *const _cellSize, bool _check, string _description) :
     225    Dialog::VectorQuery(title,_target,_cellSize,_check, _description)
    207226{}
    208227
     
    225244
    226245
    227 CommandLineDialog::BoxCommandLineQuery::BoxCommandLineQuery(string title, Box* _cellSize, string _description) :
     246CommandLineDialog::BoxCommandLineQuery::BoxCommandLineQuery(string title, double ** const _cellSize, string _description) :
    228247    Dialog::BoxQuery(title,_cellSize, _description)
    229248{}
Note: See TracChangeset for help on using the changeset viewer.