ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/zoe/trunk/Zoe.cpp
(Generate patch)

Comparing trunk/Zoe.cpp (file contents):
Revision 42 by douglas, 2004-07-23T17:52:53-07:00 vs.
Revision 43 by douglas, 2004-08-15T21:33:25-07:00

# Line 48 | Line 48 | int main(int argc, char* argv[])
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;
# Line 64 | Line 58 | int main(int argc, char* argv[])
58  
59   Zoe::Zoe()
60   {
61 +        if (!(collector || publisher)) usage();
62 +        
63          configure();
64          initialize();
65  
# Line 75 | Line 71 | bool Zoe::debug(false), Zoe::collector(f
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" : "");
# Line 175 | Line 179 | void Zoe::configure()
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';

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines