source: subversion/applications/lib/libosm/test3.cpp @ 34393

Last change on this file since 34393 was 4242, checked in by jonb, 12 years ago

remove redundant test code from test3.cpp

File size: 545 bytes
Line 
1#include "Parser.h"
2#include "Client.h"
3#include "Node.h"
4#include <iostream>
5#include <fstream>
6#include <sstream>
7
8using std::cout;
9using std::cerr;
10using std::endl;
11
12int main(int argc,char* argv[])
13{
14        if(argc != 2)
15        {
16                cerr<<"Usage: test InOsmFile > out.osm" << endl;
17                exit(1);
18        }
19       
20        std::ifstream in(argv[1]);
21        OSM::Components *comp1 = OSM::Parser::parse(in);
22        in.close();
23
24        if (comp1 == NULL) {
25                cerr << "Error occurred while parsing: " << argv[1] << endl;
26                return 1;
27        }
28       
29        comp1->toXML(std::cout);
30
31        delete comp1;
32
33        return 0;
34}
Note: See TracBrowser for help on using the repository browser.