-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcmd_line_options.h
74 lines (54 loc) · 1.49 KB
/
cmd_line_options.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#pragma once
#include <string>
#include <fstream>
#include <iostream>
typedef struct cmd_line_args
{
private:
int seq_len_;
bool changeable = true;
bool use_sparse_ = true; // use sparse pseudo loop
bool use_garbage_collection_ = true;
char print_trace_arrow_info_ = 0;
char print_candidate_list_info_ = 0;
public:
void set_sequence_length(int length) {
if (changeable)
seq_len_ = length;
}
void set_use_sparse(bool use_sparse) {
if (changeable)
use_sparse_ = use_sparse;
}
void set_use_garbage_collection(bool use_garbage_collection) {
if (changeable)
use_garbage_collection_ = use_garbage_collection;
}
void set_print_trace_arrow_info(char ptai) {
if (changeable)
print_trace_arrow_info_ = ptai;
}
void set_print_candidate_list_info(char pcli) {
if (changeable)
print_candidate_list_info_ = pcli;
}
void set_done() {
changeable = false;
}
const int sequence_length() const {
return seq_len_;
}
const bool use_sparse() const {
return use_sparse_;
}
const bool use_garbage_collection() const {
return use_garbage_collection_;
}
const char print_trace_arrow_info() const {
return print_trace_arrow_info_;
}
const char print_candidate_list_info() const {
return print_candidate_list_info_;
}
}cmd_line_args;
extern cmd_line_args cmd_line_options;