Classes | Namespaces | Defines | Typedefs | Functions
clasp_options.cpp File Reference
#include <clasp/cli/clasp_options.h>
#include <clasp/minimize_constraint.h>
#include <clasp/lookahead.h>
#include <clasp/unfounded_check.h>
#include <program_opts/program_options.h>
#include <program_opts/typed_value.h>
#include <cstring>
#include <cstdarg>
#include <cfloat>
#include <fstream>
#include <clasp/cli/clasp_cli_configs.inl>
#include <clasp/cli/clasp_cli_options.inl>
Include dependency graph for clasp_options.cpp:

Go to the source code of this file.

Classes

struct  Clasp::Cli::ClaspCliConfig::ParseContext::Frame
struct  Clasp::Cli::ClaspCliConfig::ParseContext
class  Clasp::Cli::ClaspCliConfig::ProgOption

Namespaces

namespace  bk_lib
namespace  Clasp
namespace  Clasp::Cli

Defines

#define AGGREGATE(...)   { __VA_ARGS__ }
#define ARG(a)   ->a
#define CLASP_ASP_OPTIONS   asp
#define CLASP_ASP_OPTIONS   asp
#define CLASP_ASP_OPTIONS
#define CLASP_CLI_AUX_CONFIGS
#define CLASP_CLI_AUX_CONFIGS
#define CLASP_CLI_DEFAULT_CONFIGS
#define CLASP_CLI_DEFAULT_CONFIGS
#define CLASP_CONTEXT_OPTIONS   configOpts
#define CLASP_CONTEXT_OPTIONS   (*ctxOpts)
#define CLASP_CONTEXT_OPTIONS
#define CLASP_ENUM_OPTIONS   solving
#define CLASP_ENUM_OPTIONS   enumerate
#define CLASP_ENUM_OPTIONS
#define CLASP_SEARCH_BASIC_OPTIONS   search
#define CLASP_SEARCH_BASIC_OPTIONS   (*search)
#define CLASP_SEARCH_BASIC_OPTIONS
#define CLASP_SEARCH_REDUCE_OPTIONS   lookback
#define CLASP_SEARCH_REDUCE_OPTIONS   search->reduce
#define CLASP_SEARCH_REDUCE_OPTIONS
#define CLASP_SEARCH_RESTART_OPTIONS   lookback
#define CLASP_SEARCH_RESTART_OPTIONS   search->restart
#define CLASP_SEARCH_RESTART_OPTIONS
#define CLASP_SOLVE_OPTIONS   solving
#define CLASP_SOLVE_OPTIONS   solve
#define CLASP_SOLVE_OPTIONS
#define CLASP_SOLVER_BASIC_OPTIONS   search
#define CLASP_SOLVER_BASIC_OPTIONS   (*solver)
#define CLASP_SOLVER_BASIC_OPTIONS
#define CLASP_SOLVER_LOOKBACK_OPTIONS   lookback
#define CLASP_SOLVER_LOOKBACK_OPTIONS   (*solver)
#define CLASP_SOLVER_LOOKBACK_OPTIONS
#define CONFIG(x, y, z)   case config_##x: return ConfigIter("/[" #x "]\0/" y " " z "\0");
#define CONFIG(x, y, z)   "/[" #x "]\0/" z "\0"
#define CONVERT(str, to)   ( bk_lib::string_cast((str), (to)) )
#define CONVERT_EX(str, to, n)   ( xconvert((str), (to), &(str), (n)) && !*(str) )
#define GROUP_BEGIN(X)   X.addOptions()
#define GROUP_END(X)   ;
#define HEU_PARAM   "hparam"
#define IS_OFF(str)   ( convFlag((str), TEMP) && TEMP == 0 )
#define MANY_ARG   ""
#define MANY_DESC
#define MAP(x, y)   static_cast<const char*>(x), static_cast<int>(y)
#define NO_ARG
#define OPTION(n, k, a, d, x)   (n,createOption(opt_##k)a, d)
#define OPTION(n, k, a, d, x)   case opt_##k: x ;
#define OPTION(n, k, a, d, x)   case opt_##k: optName = n; break;
#define PAIR(T, U)   std::pair<T,U>
#define SET(x, v)   ( ((x)=(v)) == (v) )
#define SET_ENUM(x, v, X,...)   ( findInValueList((v), x, X, ##__VA_ARGS__, MAP(0,0)) )
#define SET_ENUM_U(x, v, X,...)   ( findInValueList((v), TEMP, X, ##__VA_ARGS__, MAP(0,0)) && SET(x, TEMP) )
#define SET_LEQ(x, v, m)   ( ((v)<=(m)) && SET((x), (v)) )
#define SET_OR_FILL(x, v)   ( SET((x),(v)) || ((x) = 0, (x) = ~(x),true) )
#define SET_OR_ZERO(x, v)   ( SET((x),(v)) || SET((x),uint32(0)) )
#define SET_R(x, v, lo, hi)   ( ((lo)<=(v)) && ((v)<=(hi)) && SET((x), (v)) )
#define STORE(x)   return bk_lib::string_cast(VALUE, x)
#define STORE_ENUM(x, X,...)   return SET_ENUM(x, VALUE, X, ##__VA_ARGS__)
#define STORE_ENUM_U(x, X,...)   return SET_ENUM_U(x, VALUE, X, ##__VA_ARGS__)
#define STORE_FLAG(x)   return convFlag(VALUE,TEMP) && SET(x, TEMP)
#define STORE_LEQ(x, y)   STORE(TEMP) && SET_LEQ(x, TEMP, y)
#define STORE_OR_FILL(x)   STORE(TEMP) && SET_OR_FILL(x, TEMP)
#define STORE_OR_ZERO(x)   STORE(TEMP) && SET_OR_ZERO(x, TEMP)
#define TEMP   (_tmp_)
#define VALUE   (_val_)

Typedefs

typedef std::pair< uint32, uint32 > UPair

Functions

template<class T >
static bool Clasp::Cli::convFlag (const char *value, T &out)
template<class T >
static bool Clasp::Cli::findInValueList (const char *value, T &out, const char *k1, int v1,...)
static bool Clasp::Cli::findInValueListImpl (const char *value, int &out, const char *k1, int v1, va_list args)
void Clasp::Cli::validate (const char *ctx, const SolverParams &solver, const SolveParams &search)
template<class T >
static int bk_lib::xconvert (const char *x, pod_vector< T > &out, const char **errPos, int)
static int Clasp::xconvert (const char *x, ScheduleStrategy &out, const char **errPos, int e)

Define Documentation

#define AGGREGATE (   ...)    { __VA_ARGS__ }

Definition at line 56 of file clasp_options.cpp.

#define ARG (   a)    ->a

Definition at line 58 of file clasp_options.cpp.

#define CLASP_ASP_OPTIONS   asp
#define CLASP_ASP_OPTIONS   asp
#define CLASP_CONTEXT_OPTIONS   configOpts
#define CLASP_CONTEXT_OPTIONS   (*ctxOpts)
#define CLASP_ENUM_OPTIONS   solving
#define CLASP_ENUM_OPTIONS   enumerate
#define CLASP_SEARCH_BASIC_OPTIONS   search
#define CLASP_SEARCH_BASIC_OPTIONS   (*search)
#define CLASP_SEARCH_REDUCE_OPTIONS   lookback
#define CLASP_SEARCH_REDUCE_OPTIONS   search->reduce
#define CLASP_SEARCH_RESTART_OPTIONS   lookback
#define CLASP_SEARCH_RESTART_OPTIONS   search->restart
#define CLASP_SOLVE_OPTIONS   solving
#define CLASP_SOLVE_OPTIONS   solve
#define CLASP_SOLVER_BASIC_OPTIONS   search
#define CLASP_SOLVER_BASIC_OPTIONS   (*solver)
#define CLASP_SOLVER_LOOKBACK_OPTIONS   lookback
#define CLASP_SOLVER_LOOKBACK_OPTIONS   (*solver)
#define CONFIG (   x,
  y,
 
)    case config_##x: return ConfigIter("/[" #x "]\0/" y " " z "\0");
#define CONFIG (   x,
  y,
 
)    "/[" #x "]\0/" z "\0"
#define CONVERT (   str,
  to 
)    ( bk_lib::string_cast((str), (to)) )

Definition at line 35 of file clasp_options.cpp.

#define CONVERT_EX (   str,
  to,
 
)    ( xconvert((str), (to), &(str), (n)) && !*(str) )

Definition at line 36 of file clasp_options.cpp.

#define GROUP_BEGIN (   X)    X.addOptions()
#define GROUP_END (   X)    ;
#define HEU_PARAM   "hparam"

Definition at line 61 of file clasp_options.cpp.

#define IS_OFF (   str)    ( convFlag((str), TEMP) && TEMP == 0 )

Definition at line 34 of file clasp_options.cpp.

#define MANY_ARG   ""
#define MANY_DESC
#define MAP (   x,
 
)    static_cast<const char*>(x), static_cast<int>(y)

Definition at line 53 of file clasp_options.cpp.

#define NO_ARG

Definition at line 54 of file clasp_options.cpp.

#define OPTION (   n,
  k,
  a,
  d,
 
)    (n,createOption(opt_##k)a, d)
#define OPTION (   n,
  k,
  a,
  d,
 
)    case opt_##k: x ;
#define OPTION (   n,
  k,
  a,
  d,
 
)    case opt_##k: optName = n; break;
#define PAIR (   T,
 
)    std::pair<T,U>

Definition at line 55 of file clasp_options.cpp.

#define SET (   x,
 
)    ( ((x)=(v)) == (v) )

Definition at line 39 of file clasp_options.cpp.

#define SET_ENUM (   x,
  v,
  X,
  ... 
)    ( findInValueList((v), x, X, ##__VA_ARGS__, MAP(0,0)) )

Definition at line 37 of file clasp_options.cpp.

#define SET_ENUM_U (   x,
  v,
  X,
  ... 
)    ( findInValueList((v), TEMP, X, ##__VA_ARGS__, MAP(0,0)) && SET(x, TEMP) )

Definition at line 38 of file clasp_options.cpp.

#define SET_LEQ (   x,
  v,
 
)    ( ((v)<=(m)) && SET((x), (v)) )

Definition at line 40 of file clasp_options.cpp.

#define SET_OR_FILL (   x,
 
)    ( SET((x),(v)) || ((x) = 0, (x) = ~(x),true) )

Definition at line 41 of file clasp_options.cpp.

#define SET_OR_ZERO (   x,
 
)    ( SET((x),(v)) || SET((x),uint32(0)) )

Definition at line 42 of file clasp_options.cpp.

#define SET_R (   x,
  v,
  lo,
  hi 
)    ( ((lo)<=(v)) && ((v)<=(hi)) && SET((x), (v)) )

Definition at line 43 of file clasp_options.cpp.

#define STORE (   x)    return bk_lib::string_cast(VALUE, x)

Definition at line 45 of file clasp_options.cpp.

#define STORE_ENUM (   x,
  X,
  ... 
)    return SET_ENUM(x, VALUE, X, ##__VA_ARGS__)

Definition at line 46 of file clasp_options.cpp.

#define STORE_ENUM_U (   x,
  X,
  ... 
)    return SET_ENUM_U(x, VALUE, X, ##__VA_ARGS__)

Definition at line 47 of file clasp_options.cpp.

#define STORE_FLAG (   x)    return convFlag(VALUE,TEMP) && SET(x, TEMP)

Definition at line 51 of file clasp_options.cpp.

#define STORE_LEQ (   x,
 
)    STORE(TEMP) && SET_LEQ(x, TEMP, y)

Definition at line 48 of file clasp_options.cpp.

#define STORE_OR_FILL (   x)    STORE(TEMP) && SET_OR_FILL(x, TEMP)

Definition at line 50 of file clasp_options.cpp.

#define STORE_OR_ZERO (   x)    STORE(TEMP) && SET_OR_ZERO(x, TEMP)

Definition at line 49 of file clasp_options.cpp.

#define TEMP   (_tmp_)

Definition at line 60 of file clasp_options.cpp.

#define VALUE   (_val_)

Definition at line 59 of file clasp_options.cpp.


Typedef Documentation

typedef std::pair<uint32, uint32> UPair

Definition at line 57 of file clasp_options.cpp.



clasp
Author(s): Benjamin Kaufmann
autogenerated on Thu Aug 27 2015 12:41:40