Orbiter 2022
Combinatorial Objects
geometry_builder_description.cpp
Go to the documentation of this file.
1/*
2 * geometry_builder_description.cpp
3 *
4 * Created on: Aug 24, 2021
5 * Author: betten
6 */
7
8
9
10
11#include "foundations.h"
12
13using namespace std;
14
15
16
17namespace orbiter {
18namespace layer1_foundations {
19namespace geometry_builder {
20
21
22
24{
25 f_V = FALSE;
26 //std::string V_text;
27 f_B = FALSE;
28 //std::string B_text;
29 f_TDO = FALSE;
30 //std::string TDO_text;
31 f_fuse = FALSE;
32 //std::string fuse_text;
33
35 girth = 0;
36
38 lambda = 0;
39
40 f_find_square = TRUE; /* JS 120100 */
41
42 f_simple = FALSE; /* JS 180100 */
43
46
48
49 //std::vector<std::string> test_lines;
50 //std::vector<std::string> test2_lines;
51
52
53 f_split = FALSE;
54 split_line = 0;
56 split_modulo = 1;
57
58 //std::vector<int> print_at_line;
59
61 //std::string fname_GEO;
62}
63
65{
66}
67
69 int argc, std::string *argv,
70 int verbose_level)
71{
72 int f_v = (verbose_level >= 1);
73 int i;
75
76 if (f_v) {
77 cout << "geometry_builder_description::read_arguments" << endl;
78 }
79 for (i = 0; i < argc; i++) {
80 if (ST.stringcmp(argv[i], "-V") == 0) {
81 f_V = TRUE;
82 V_text.assign(argv[++i]);
83 if (f_v) {
84 cout << "-V " << V_text << endl;
85 }
86 }
87 else if (ST.stringcmp(argv[i], "-B") == 0) {
88 f_B = TRUE;
89 B_text.assign(argv[++i]);
90 if (f_v) {
91 cout << "-B " << B_text << endl;
92 }
93 }
94 else if (ST.stringcmp(argv[i], "-TDO") == 0) {
95 f_TDO = TRUE;
96 TDO_text.assign(argv[++i]);
97 if (f_v) {
98 cout << "-TDO " << TDO_text << endl;
99 }
100 }
101 else if (ST.stringcmp(argv[i], "-fuse") == 0) {
102 f_fuse = TRUE;
103 fuse_text.assign(argv[++i]);
104 if (f_v) {
105 cout << "-fuse " << fuse_text << endl;
106 }
107 }
108 else if (ST.stringcmp(argv[i], "-girth") == 0) {
110 girth = ST.strtoi(argv[++i]);
111 if (f_v) {
112 cout << "-girth_test " << girth << endl;
113 }
114 }
115 else if (ST.stringcmp(argv[i], "-lambda") == 0) {
116 f_lambda = TRUE;
117 lambda = ST.strtoi(argv[++i]);
118 if (f_v) {
119 cout << "-lambda " << lambda << endl;
120 }
121 }
122 else if (ST.stringcmp(argv[i], "-no_square_test") == 0) {
124 if (f_v) {
125 cout << "-no_square_test " << endl;
126 }
127 }
128 else if (ST.stringcmp(argv[i], "-simple") == 0) {
129 f_simple = TRUE;
130 if (f_v) {
131 cout << "-simple " << endl;
132 }
133 }
134 else if (ST.stringcmp(argv[i], "-search_tree") == 0) {
136 if (f_v) {
137 cout << "-search_tree " << endl;
138 }
139 }
140 else if (ST.stringcmp(argv[i], "-search_tree_flags") == 0) {
142 if (f_v) {
143 cout << "-search_tree_flags " << endl;
144 }
145 }
146 else if (ST.stringcmp(argv[i], "-orderly") == 0) {
147 f_orderly = TRUE;
148 if (f_v) {
149 cout << "-orderly " << endl;
150 }
151 }
152 else if (ST.stringcmp(argv[i], "-test") == 0) {
153 string lines;
154 lines.assign(argv[++i]);
155 test_lines.push_back(lines);
156 if (f_v) {
157 cout << "-test " << lines << endl;
158 }
159 }
160 else if (ST.stringcmp(argv[i], "-test2") == 0) {
161 string lines;
162 lines.assign(argv[++i]);
163 test2_lines.push_back(lines);
164 if (f_v) {
165 cout << "-test2 " << lines << endl;
166 }
167 }
168 else if (ST.stringcmp(argv[i], "-split") == 0) {
169 f_split = TRUE;
170 split_line = ST.strtoi(argv[++i]);
171 split_remainder = ST.strtoi(argv[++i]);
172 split_modulo = ST.strtoi(argv[++i]);
173 if (f_v) {
174 cout << "-split " << split_line << " "
175 << split_remainder << " " << split_modulo << endl;
176 }
177 }
178 else if (ST.stringcmp(argv[i], "-print_at_line") == 0) {
179 int a;
180 a = ST.strtoi(argv[++i]);
181 print_at_line.push_back(a);
182 if (f_v) {
183 cout << "-print_at_line " << a << endl;
184 }
185 }
186 else if (ST.stringcmp(argv[i], "-fname_GEO") == 0) {
188 fname_GEO.assign(argv[++i]);
189 if (f_v) {
190 cout << "-fname_GEO " << fname_GEO << endl;
191 }
192 }
193 else if (ST.stringcmp(argv[i], "-end") == 0) {
194 cout << "-end" << endl;
195 break;
196 }
197 else {
198 cout << "geometry_builder_description::read_arguments "
199 "unrecognized option " << argv[i] << endl;
200 }
201 } // next i
202 if (f_v) {
203 cout << "geometry_builder_description::read_arguments done" << endl;
204 }
205 return i + 1;
206}
207
209{
210 if (f_V) {
211 cout << "-V " << V_text << endl;
212 }
213 if (f_B) {
214 cout << "-B " << B_text << endl;
215 }
216 if (f_TDO) {
217 cout << "-TDO " << TDO_text << endl;
218 }
219 if (f_fuse) {
220 cout << "-fuse " << fuse_text << endl;
221 }
222 if (f_girth_test) {
223 cout << "-girth " << girth << endl;
224 }
225 if (f_lambda) {
226 cout << "-lambda " << lambda << endl;
227 }
228 if (f_find_square == FALSE) {
229 cout << "-no_square_test " << endl;
230 }
231 if (f_simple) {
232 cout << "-simple " << endl;
233 }
234 if (f_search_tree) {
235 cout << "-search_tree " << endl;
236 }
238 cout << "-search_tree_flags " << endl;
239 }
240 if (f_orderly) {
241 cout << "-orderly " << endl;
242 }
243 if (test_lines.size()) {
244 int i;
245
246 for (i = 0; i < test_lines.size(); i++) {
247 cout << "-test " << test_lines[i] << " " << endl;
248 }
249 }
250 if (test2_lines.size()) {
251 int i;
252
253 for (i = 0; i < test2_lines.size(); i++) {
254 cout << "-test2 " << test2_lines[i] << " " << endl;
255 }
256 }
257 if (f_split) {
258 cout << "-split " << split_line << " " << split_remainder << " " << split_modulo << endl;
259 }
260 if (print_at_line.size()) {
261 int i;
262
263 for (i = 0; i < print_at_line.size(); i++) {
264 cout << "-print_at_line " << print_at_line[i] << endl;
265 }
266 }
267 if (f_fname_GEO) {
268 cout << "-fname_GEO " << fname_GEO << endl;
269 }
270}
271
272
273
274
275}}}
276
functions related to strings and character arrays
#define TRUE
Definition: foundations.h:231
#define FALSE
Definition: foundations.h:234
the orbiter library for the classification of combinatorial objects