48 |
|
{ |
49 |
|
if (!Zoe::debug) Zoe::debug = true; |
50 |
|
} |
51 |
< |
else |
52 |
< |
{ |
53 |
< |
cerr << "Usage: " << Zoe::program << " [-config=config] " |
54 |
< |
"[-collector] [-publisher] [-color] [-D]\n"; |
55 |
< |
|
56 |
< |
return 1; |
57 |
< |
} |
51 |
> |
else Zoe::usage(); |
52 |
|
} |
53 |
|
|
54 |
|
Zoe zoe; |
58 |
|
|
59 |
|
Zoe::Zoe() |
60 |
|
{ |
61 |
+ |
if (!(collector || publisher)) usage(); |
62 |
+ |
|
63 |
|
configure(); |
64 |
|
initialize(); |
65 |
|
|
71 |
|
Zoe::color(false); |
72 |
|
ext::String Zoe::program, Zoe::config("zoe.xml"); |
73 |
|
|
74 |
+ |
void Zoe::usage() |
75 |
+ |
{ |
76 |
+ |
cerr << "Usage: " << Zoe::program << " [-config=config] [-collector] " |
77 |
+ |
"[-publisher] [-color] [-D]\n"; |
78 |
+ |
|
79 |
+ |
exit(1); |
80 |
+ |
} |
81 |
+ |
|
82 |
|
ext::String Zoe::generator(Generator generator) |
83 |
|
{ |
84 |
|
ext::String generator_(generator == all || generator == agent ? "Zoe" : ""); |
179 |
|
cerr << "}\n"; |
180 |
|
} |
181 |
|
|
178 |
– |
if (!collector && !publisher) { collector = true; publisher = true; } |
179 |
– |
|
182 |
|
if (debug) cerr << "collector = " << lexical_cast<ext::String>(collector) |
183 |
|
<< "\npublisher = " << lexical_cast<ext::String>(publisher) |
184 |
|
<< "\ncolor = " << lexical_cast<ext::String>(color) << '\n'; |