#ifndef _paras_hpp_INCLUDED #define _paras_hpp_INCLUDED #include #include // name, type, short-name,must-need, default ,low, high, comments #define PARAS \ PARA( simplify , int , 's' , false , 1 , 0 , 1 , "Use Simplify (only preprocess)") \ PARA( port , int , 'p' , false , 2389 , 0 , 1 , "Master Server Listerning Port") \ // name, short-name, must-need, default, comments #define STR_PARAS \ STR_PARA( instance , 'i' , true , "" , "CNF format instance") \ STR_PARA( solvers , '\0' , true , "" , "A Solver List of \"ip:port\" Format, Seperate by ,") struct paras { #define PARA(N, T, S, M, D, L, H, C) \ T N = D; PARAS #undef PARA #define STR_PARA(N, S, M, D, C) \ std::string N = D; STR_PARAS #undef STR_PARA static void parse(int argc, char* argv[]); void print_paras (); }; extern paras* opt; #define OPT(N) (opt->N) #endif