19 #ifndef TESSERACT_TRAINING_COMMANDLINEFLAGS_H_
20 #define TESSERACT_TRAINING_COMMANDLINEFLAGS_H_
22 #ifdef USE_STD_NAMESPACE
28 #define INT_PARAM_FLAG(name, val, comment) \
29 INT_VAR(FLAGS_##name, val, comment)
30 #define DECLARE_INT_PARAM_FLAG(name) \
31 extern INT_VAR_H(FLAGS_##name, 0, "")
32 #define DOUBLE_PARAM_FLAG(name, val, comment) \
33 double_VAR(FLAGS_##name, val, comment)
34 #define DECLARE_DOUBLE_PARAM_FLAG(name) \
35 extern double_VAR_H(FLAGS_##name, "", "")
36 #define BOOL_PARAM_FLAG(name, val, comment) \
37 BOOL_VAR(FLAGS_##name, val, comment)
38 #define DECLARE_BOOL_PARAM_FLAG(name) \
39 extern BOOL_VAR_H(FLAGS_##name, 0, "")
40 #define STRING_PARAM_FLAG(name, val, comment) \
41 STRING_VAR(FLAGS_##name, val, comment)
42 #define DECLARE_STRING_PARAM_FLAG(name) \
43 extern STRING_VAR_H(FLAGS_##name, "", "")
47 #include "base/commandlineflags.h"
48 #define INT_PARAM_FLAG(name, val, comment) \
49 DEFINE_int32(name, val, comment)
50 #define DECLARE_INT_PARAM_FLAG(name) \
52 #define DOUBLE_PARAM_FLAG(name, val, comment) \
53 DEFINE_double(name, val, comment)
54 #define DECLARE_DOUBLE_PARAM_FLAG(name) \
56 #define BOOL_PARAM_FLAG(name, val, comment) \
57 DEFINE_bool(name, val, comment)
58 #define DECLARE_BOOL_PARAM_FLAG(name) \
60 #define STRING_PARAM_FLAG(name, val, comment) \
61 DEFINE_string(name, val, comment)
62 #define DECLARE_STRING_PARAM_FLAG(name) \
79 char*** argv,
const bool remove_flags);
83 #endif // TESSERACT_TRAINING_COMMANDLINEFLAGS_H_
void ParseCommandLineFlags(const char *usage, int *argc, char ***argv, const bool remove_flags)