Orbiter 2022
Combinatorial Objects
draw_projective_curve_description.cpp
Go to the documentation of this file.
1/*
2 * draw_projective_curve_description.cpp
3 *
4 * Created on: May 2, 2021
5 * Author: betten
6 */
7
8
9
10
11#include "foundations.h"
12
13
14using namespace std;
15
16
17namespace orbiter {
18namespace layer1_foundations {
19namespace graphics {
20
21
23{
25 number = 0;
26
27 f_file = FALSE;
28 //std::string fname;
29
32
35
38
39
40}
41
43{
44
45}
46
47
48
50 int argc, std::string *argv,
51 int verbose_level)
52{
53 int f_v = (verbose_level >= 1);
54 int i;
56
57 if (f_v) {
58 cout << "draw_projective_curve_description::read_arguments" << endl;
59 }
60 for (i = 0; i < argc; i++) {
61
62 if (ST.stringcmp(argv[i], "-number") == 0) {
63 f_number = TRUE;
64 number = ST.strtoi(argv[++i]);
65 if (f_v) {
66 cout << "-number " << number << endl;
67 }
68 }
69 else if (ST.stringcmp(argv[i], "-file") == 0) {
70 f_file = TRUE;
71 fname.assign(argv[++i]);
72 if (f_v) {
73 cout << "-file " << fname << endl;
74 }
75 }
76 else if (ST.stringcmp(argv[i], "-animate") == 0) {
78 animate_nb_of_steps = ST.strtoi(argv[++i]);
79 if (f_v) {
80 cout << "-animate " << animate_nb_of_steps << endl;
81 }
82 }
83 else if (ST.stringcmp(argv[i], "-animate_with_transition") == 0) {
85 animate_nb_of_steps = ST.strtoi(argv[++i]);
87 if (f_v) {
88 cout << "-animate_with_transition " << animate_nb_of_steps
89 << " " << animate_transition_nb_of_steps << endl;
90 }
91 }
92 else if (ST.stringcmp(argv[i], "-title_page") == 0) {
94 if (f_v) {
95 cout << "-title_page " << endl;
96 }
97 }
98 else if (ST.stringcmp(argv[i], "-trailer_page") == 0) {
100 if (f_v) {
101 cout << "-trailer_page " << endl;
102 }
103 }
104 else if (ST.stringcmp(argv[i], "-end") == 0) {
105 if (f_v) {
106 cout << "-end" << endl;
107 }
108 break;
109 }
110 else {
111 cout << "draw_projective_curve_description::read_arguments "
112 "unrecognized option " << argv[i] << endl;
113 }
114 } // next i
115 if (f_v) {
116 cout << "draw_projective_curve_description::read_arguments done" << endl;
117 }
118 return i + 1;
119}
120
122{
123 if (f_number) {
124 cout << "-number " << number << endl;
125 }
126 if (f_file) {
127 cout << "-file " << fname << endl;
128 }
129 if (f_animate) {
130 cout << "-animate " << animate_nb_of_steps << endl;
131 }
133 cout << "-animate_with_transition " << animate_nb_of_steps
134 << " " << animate_transition_nb_of_steps << endl;
135 }
136 if (f_title_page) {
137 cout << "-title_page " << endl;
138 }
139 if (f_trailer_page) {
140 cout << "-trailer_page " << endl;
141 }
142}
143
144
145
146}}}
147
148
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