/*
 * FragmentationAutomationAction.def
 *
 *  Created on: May 18, 2012
 *      Author: heber
 */

// all includes and forward declarations necessary for non-integral types below
#include <boost/filesystem/path.hpp>
#include <string>
#include <vector>

#include "Parameters/Validators/DummyValidator.hpp"
#include "Parameters/Validators/Ops_Validator.hpp"
#include "Parameters/Validators/RangeValidator.hpp"
#include "Parameters/Validators/STLVectorValidator.hpp"
#include "Parameters/Validators/Specific/ParserFileValidator.hpp"
#include "Parameters/Validators/Specific/FilePresentValidator.hpp"

// i.e. there is an integer with variable name Z that can be found in
// ValueStorage by the token "Z" -> first column: int, Z, "Z"
// "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value
#define paramtypes (std::vector< boost::filesystem::path >)(std::string)(std::string)(std::string)(boost::filesystem::path)(unsigned int)(unsigned int)(unsigned int)(bool)
#define paramtokens ("fragment-jobs")("fragment-path")("server-address")("server-port")("fragment-executable")("grid-level")("near-field-cells")("interpolation-degree")("DoLongrange")
#define paramdescriptions ("vector of fragment files")("prefix of each fragment file")("hostname of server")("controller port of server")("executable to launch on clients")("resolution of multigrid")("number of cells used in smearing out core charge")("interpolation degree for getting the nuclei potential from the grid")("whether to calculate long-range contributions")
#define paramdefaults (NOPARAM_DEFAULT)(NOPARAM_DEFAULT)(PARAM_DEFAULT("127.0.0.1"))(PARAM_DEFAULT("1026"))(NOPARAM_DEFAULT)(PARAM_DEFAULT(5))(PARAM_DEFAULT(3))(PARAM_DEFAULT(3))(PARAM_DEFAULT("0"))
#define paramreferences (jobfiles)(path)(host)(port)(executable)(level)(near_field_cells)(interpolation_degree)(DoLongrange)
#define paramvalids \
(STLVectorValidator< std::vector< boost::filesystem::path > >(ParserFileValidator() && FilePresentValidator())) \
(DummyValidator< std::string >()) \
(DummyValidator< std::string >()) \
(DummyValidator< std::string >()) \
(DummyValidator< boost::filesystem::path >()) \
(RangeValidator< unsigned int >(1, 10)) \
(RangeValidator< unsigned int >(1, 20)) \
(RangeValidator< unsigned int >(1, 10)) \
(DummyValidator< bool >())

#undef statetypes
#undef statereferences

// some defines for all the names, you may use ACTION, STATE and PARAMS
#define CATEGORY Fragmentation
#define MENUNAME "fragmentation"
#define MENUPOSITION 3
#define ACTIONNAME FragmentationAutomation
#define TOKEN "fragment-automation"


// finally the information stored in the ActionTrait specialization
#define DESCRIPTION "calculates each fragment by using a server with a client pool"
#undef SHORTFORM
