1
0
Fork 0
terragear/src/Lib/e00/teste00.cxx

31 lines
744 B
C++
Raw Normal View History

2000-11-22 22:17:58 +00:00
#include <fstream>
#include "e00.hxx"
using std::ifstream;
int main (int ac, const char ** av)
{
for (int i = 1; i < ac; i++) {
cerr << "Reading " << av[i] << endl;
ifstream input(av[i]);
E00 data;
try {
data.readE00(input);
} catch (E00Exception &e) {
cerr << "Reading " << av[i] << " failed with exception "
<< e.message << endl;
exit(1);
}
cerr << "Read " << av[i] << " successfully" << endl;
cerr << "Read " << data.nPoints() << " point(s)" << endl;
cerr << "Read " << data.nLines() << " line segment(s)" << endl;
cerr << "Read " << data.nPolygons() << " polygon(s)" << endl;
cerr << " (including enclosing polygon)" << endl;
data.write(cout);
}
return 0;
}