torc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
testParse.cpp
Go to the documentation of this file.
1 // Torc - Copyright 2011-2013 University of Southern California. All Rights Reserved.
2 // $HeadURL$
3 // $Id$
4 
5 // This program is free software: you can redistribute it and/or modify it under the terms of the
6 // GNU General Public License as published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
10 // without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
11 // the GNU General Public License for more details.
12 //
13 // You should have received a copy of the GNU General Public License along with this program. If
14 // not, see <http://www.gnu.org/licenses/>.
15 
18 
19 using namespace torc::physical;
20 
21 int main(int argc, char *argv[]) {
22  typedef std::string string;
23 
24  if (argc != 3) {
25  std::cout << "Usage: " << argv[0] << " <input xdlrc file>" << " <output xdlrc file>" <<std::endl;
26  return 1;
27  }
28 
29  ParsePrimitive parser;
30  std::cout << "\n\nReading " <<argv[1] << std::endl;
31  PrimitiveSetSharedPtr ps = parser.ParsePrimitiveFile(argv[1]);
32  std::cout << "DONE!" << std::endl;
33 
34  WritePrimitive writer;
35  std::cout << "\n\nwriting into " <<argv[2] << std::endl;
36  writer.WritePrimitiveFile(argv[2],ps);
37  std::cout << "DONE!" << std::endl;
38 
39 
40  return 0;
41 }
int main(int argc, char *argv[])
Definition: testParse.cpp:21
Header for primitive parser.
boost::shared_ptr< PrimitiveSet > PrimitiveSetSharedPtr
Shared pointer encapsulation of a PrimitiveSet.
void WritePrimitiveFile(const char *outFileName, PrimitiveSetSharedPtr primitives)
write an XDLRC file
std::string string
Header for primitive parser.
PrimitiveSetSharedPtr ParsePrimitiveFile(const char *inFileName)
parse an XDLRC file