Medial Code Documentation
Loading...
Searching...
No Matches
CmdArgs.h
1#ifndef __CMD_ARGS__
2#define __CMD_ARGS__
3#include <MedUtils/MedUtils/MedUtils.h>
4#include <fstream>
5#include <MedProcessTools/MedProcessTools/MedSamples.h>
6
7#define LOCAL_SECTION LOG_APP
8#define LOCAL_LEVEL LOG_DEF_LEVEL
9
11private:
12 void post_process() {
13 }
14public:
15 string amconfig;
16 string amlib;
17 string in_jsons;
18 string jreq;
19 int prediction_time;
20 int pid_id;
21
22 int test_stage;
23
24 bool calc_by_type;
25
26 ProgramArgs() {
27 po::options_description options("Required options");
28 options.add_options()
29 ("amconfig", po::value<string>(&amconfig)->required(), "ampath")
30 ("amlib", po::value<string>(&amlib)->default_value(""), "amlib")
31 ("in_jsons", po::value<string>(&in_jsons)->required(), "in_jsons")
32 ("jreq", po::value<string>(&jreq)->default_value(""), "jreq")
33 ("pid_id", po::value<int>(&pid_id)->default_value(1), "pid id")
34 ("prediction_time", po::value<int>(&prediction_time)->default_value(20210101), "prediction_time")
35 ("test_stage", po::value<int>(&test_stage)->default_value(0), "test stage")
36 ("calc_by_type", po::value<bool>(&calc_by_type)->default_value(false), "calc_by_type")
37
38 ;
39
40 init(options);
41 }
42};
43
44
45#endif
Definition CmdArgs.h:10
A basic class wrapper to parse command args has default "h", "help", "debug" and "base_config" for re...
Definition MedUtils.h:122
void init(po::options_description &prg_options, const string &app_l="")
an init function
Definition MedUtils.cpp:355