/*
* Project: MoleCuilder
* Description: creates and alters molecular systems
* Copyright (C) 2012 University of Bonn. All rights reserved.
*
*
* This file is part of MoleCuilder.
*
* MoleCuilder is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* MoleCuilder is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with MoleCuilder. If not, see .
*/
/*
* ControllerOptions_MPQCCommandJob.cpp
*
* Created on: Jun 6, 2012
* Author: heber
*/
// include config.h
#ifdef HAVE_CONFIG_H
#include
#endif
#include "CodePatterns/MemDebug.hpp"
#include "CodePatterns/Log.hpp"
#include "ControllerOptions_MPQCCommandJob.hpp"
int ControllerOptions_MPQCCommandJob::parseExecutable(boost::program_options::variables_map &vm) {
if (command == "addjobs") {
if (!vm.count("executable")) {
ELOG(1, "'"+command+"' requires two options: [executable] [jobcommand].");
return 255;
}
executable = vm["executable"].as< std::string >();
}
return 0;
}
int ControllerOptions_MPQCCommandJob::parseFragmentpath(boost::program_options::variables_map &vm) {
if (command == "receivempqc") {
if (!vm.count("fragment-path")) {
ELOG(1, "'"+command+"' requires two options: [fragment-path] [jobids].");
return 255;
}
fragmentpath = vm["fragment-path"].as< std::string >();
}
return 0;
}
int ControllerOptions_MPQCCommandJob::parseJobfiles(boost::program_options::variables_map &vm) {
if (command == "addjobs") {
if (!vm.count("jobfiles")) {
ELOG(1, "'"+command+"' requires two options: [executable] [jobfiles].");
return 255;
}
jobfiles = vm["jobfiles"].as< std::vector >();
}
return 0;
}
int ControllerOptions_MPQCCommandJob::parseIds(boost::program_options::variables_map &vm) {
if (command == "receivempqc") {
if (vm.count("ids")) {
ids = vm["ids"].as< std::vector >();
}
}
return 0;
}