Orbiter 2022
Combinatorial Objects
tree_draw_options.cpp
Go to the documentation of this file.
1/*
2 * tree_draw_options.cpp
3 *
4 * Created on: Jan 3, 2022
5 * Author: betten
6 */
7
8
9
10
11
12
13#include "foundations.h"
14
15
16using namespace std;
17
18
19namespace orbiter {
20namespace layer1_foundations {
21namespace graphics {
22
23
25{
26 f_file = FALSE;
27 //file_name;
28
31
33 //select_path_text;
34
37
38}
39
40
42{
43}
44
45
47 int argc, std::string *argv,
48 int verbose_level)
49{
50 int f_v = (verbose_level >= 1);
51 int i;
53
54 if (f_v) {
55 cout << "tree_draw_options::read_arguments" << endl;
56 }
57
58 for (i = 0; i < argc; i++) {
59
60
61 if (ST.stringcmp(argv[i], "-file") == 0) {
62 f_file = TRUE;
63 file_name.assign(argv[++i]);
64 if (f_v) {
65 cout << "-file " << file_name << " " << endl;
66 }
67 }
68 else if (ST.stringcmp(argv[i], "-restrict") == 0) {
70 restrict_excluded_color = ST.strtoi(argv[++i]);
71 if (f_v) {
72 cout << "-restrict " << restrict_excluded_color << " " << endl;
73 }
74 }
75 else if (ST.stringcmp(argv[i], "-select_path") == 0) {
77 select_path_text.assign(argv[++i]);
78 if (f_v) {
79 cout << "-select_path " << select_path_text << " " << endl;
80 }
81 }
82
83 else if (ST.stringcmp(argv[i], "-end") == 0) {
84 cout << "-end" << endl;
85 break;
86 }
87 else {
88 cout << "tree_draw_options::read_arguments "
89 "unrecognized option " << argv[i] << endl;
90 }
91 } // next i
92 if (f_v) {
93 cout << "tree_draw_options::read_arguments done" << endl;
94 }
95 return i + 1;
96}
97
99{
100 if (f_file) {
101 cout << "-file " << file_name << " " << endl;
102 }
103 if (f_restrict) {
104 cout << "-restrict " << restrict_excluded_color << " " << endl;
105 }
106 if (f_select_path) {
107 cout << "-select_path " << select_path_text << " " << endl;
108 }
110 cout << "has draw_vertex_callback function" << endl;
111 }
112}
113
114
115
116
117
118}}}
119
functions related to strings and character arrays
int read_arguments(int argc, std::string *argv, int verbose_level)
void(* draw_vertex_callback)(tree *T, mp_graphics *G, int *v, int layer, tree_node *N, int x, int y, int dx, int dy)
Definition: graphics.h:1524
#define TRUE
Definition: foundations.h:231
#define FALSE
Definition: foundations.h:234
the orbiter library for the classification of combinatorial objects