HILA
Loading...
Searching...
No Matches
cmdline.h
1#ifndef CMDLINE_H
2#define CMDLINE_H
3
4#include <map>
5#include <vector>
6#include <string>
7
8class cmdlinearguments {
9 private:
10 int argc;
11 const char **argv;
12
13 // map to hold the flag-sorted command line arguments
14 // argmap_val is defined in cmdline.cpp
15 std::map<std::string, struct argmap_val> argmap;
16
17 std::vector<std::string> read_arg_vector(const char *flag);
18 std::vector<std::string> parse_help(std::string);
19 void quit_with_help();
20 void fill_argmap();
21
22 public:
23 cmdlinearguments();
24 void initialise_args(int argc0, char **argv0);
25 std::vector<std::string> values(std::string);
26 void add_flag(std::string flag, std::string help_text);
27 void print_help();
28 int flag_set(const char *flag);
29 bool flag_present(const char *flag);
30 long get_int(const char *flag, int i = 0);
31 double get_double(const char *flag, int i = 0);
32 std::string get_string(const char *flag, int i = 0);
33
34};
35
36namespace hila{
37extern cmdlinearguments cmdline;
38}
39
40#endif
Implement hila::swap for gauge fields.
Definition array.h:981