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