-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnev2plx_config.h
38 lines (30 loc) · 897 Bytes
/
nev2plx_config.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#pragma once
#ifndef NEV2PLX_CONFIG_H_INCLUDED
#define NEV2PLX_CONFIG_H_INCLUDED
#include <ostream>
#include <string>
#include <boost/program_options.hpp>
#include <boost/filesystem.hpp>
namespace opts = boost::program_options;
namespace fs = boost::filesystem;
class Config {
public:
Config(void);
std::string get_input(void) const;
std::string get_output(void) const;
bool get_overwrite(void) const;
size_t get_buffer_sz(void) const;
void parse(int argc, char** argv);
friend std::ostream& operator<<(std::ostream &out, const Config &c);
private:
bool _valid;
opts::positional_options_description pos;
opts::options_description desc;
void setInput(const opts::variables_map& vm);
void setOutput(const opts::variables_map& vm);
std::string _input;
std::string _output;
bool _overwrite;
size_t _buffer_sz;
};
#endif /* NEV2PLX_CONFIG_H_INCLUDED */