Orbiter 2022
Combinatorial Objects
design_create_description.cpp
Go to the documentation of this file.
1/*
2 * design_create_description.cpp
3 *
4 * Created on: Sep 19, 2019
5 * Author: betten
6 */
7
8
9
10
11#include "orbiter.h"
12
13using namespace std;
14
15namespace orbiter {
16namespace layer5_applications {
17namespace apps_combinatorics {
18
19
21{
22 f_q = FALSE;
23 q = 0;
25 iso = 0;
27 //family_name;
28
32 //std::string list_of_blocks_text;
33
35 //std::string list_of_blocks_from_file_fname;
36
38}
39
41{
42 freeself();
43}
44
46{
47}
48
50{
51 null();
52}
53
54int design_create_description::read_arguments(int argc, std::string *argv,
55 int verbose_level)
56{
57 int f_v = (verbose_level >= 1);
58 int i;
60
61 cout << "design_create_description::read_arguments" << endl;
62 for (i = 0; i < argc; i++) {
63
64 if (ST.stringcmp(argv[i], "-q") == 0) {
65 f_q = TRUE;
66 q = ST.strtoi(argv[++i]);
67 if (f_v) {
68 cout << "-q " << q << endl;
69 }
70 }
71 else if (ST.stringcmp(argv[i], "-catalogue") == 0) {
73 iso = ST.strtoi(argv[++i]);
74 if (f_v) {
75 cout << "-catalogue " << iso << endl;
76 }
77 }
78 else if (ST.stringcmp(argv[i], "-family") == 0) {
79 f_family = TRUE;
80 family_name.assign(argv[++i]);
81 if (f_v) {
82 cout << "-family " << family_name << endl;
83 }
84 }
85 else if (ST.stringcmp(argv[i], "-list_of_blocks") == 0) {
87 list_of_blocks_v = ST.strtoi(argv[++i]);
88 list_of_blocks_k = ST.strtoi(argv[++i]);
89 list_of_blocks_text.assign(argv[++i]);
90 if (f_v) {
91 cout << "-list_of_blocks " << list_of_blocks_v
92 << " " << list_of_blocks_k
93 << " " << list_of_blocks_text
94 << endl;
95 }
96 }
97 else if (ST.stringcmp(argv[i], "-list_of_blocks_from_file") == 0) {
99 list_of_blocks_v = ST.strtoi(argv[++i]);
100 list_of_blocks_k = ST.strtoi(argv[++i]);
101 list_of_blocks_from_file_fname.assign(argv[++i]);
102 if (f_v) {
103 cout << "-list_of_blocks_from_file " << list_of_blocks_v
104 << " " << list_of_blocks_k
106 << endl;
107 }
108 }
109 else if (ST.stringcmp(argv[i], "-no_group") == 0) {
111 if (f_v) {
112 cout << "-no_group " << endl;
113 }
114 }
115 else if (ST.stringcmp(argv[i], "-end") == 0) {
116 break;
117 }
118 } // next i
119 cout << "design_create_description::read_arguments done" << endl;
120 return i + 1;
121}
122
123
125{
126 if (!f_q) {
127 cout << "design_create_description::get_q "
128 "q has not been set yet" << endl;
129 exit(1);
130 }
131 return q;
132}
133
135{
136 if (f_q) {
137 cout << "-q " << q << endl;
138 }
139 if (f_catalogue) {
140 cout << "-catalogue " << iso << endl;
141 }
142 if (f_family) {
143 cout << "-family " << family_name << endl;
144 }
145 if (f_list_of_blocks) {
146 cout << "-list_of_blocks " << list_of_blocks_v
147 << " " << list_of_blocks_k
148 << " " << list_of_blocks_text
149 << endl;
150 }
152 cout << "-list_of_blocks_from_file " << list_of_blocks_v
153 << " " << list_of_blocks_k
155 << endl;
156 }
157 if (f_no_group) {
158 cout << "-no_group " << endl;
159 }
160}
161
162
163}}}
164
165
166
167
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