gen2dot.cppGo to the documentation of this file.00001 /** gen2dot.cpp Utility to convert gen files to dot files */ 00002 00003 /* FAU Discrete Event Systems Library (libfaudes) 00004 00005 Copyright (C) 2006 Bernd Opitz 00006 Exclusive copyright is granted to Klaus Schmidt 00007 00008 This library is free software; you can redistribute it and/or 00009 modify it under the terms of the GNU Lesser General Public 00010 License as published by the Free Software Foundation; either 00011 version 2.1 of the License, or (at your option) any later version. 00012 00013 This library is distributed in the hope that it will be useful, 00014 but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 Lesser General Public License for more details. 00017 00018 You should have received a copy of the GNU Lesser General Public 00019 License along with this library; if not, write to the Free Software 00020 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 00021 00022 00023 #include "gen2dot.h" 00024 00025 using namespace faudes; 00026 00027 int main(int argc, char *argv[]) { 00028 00029 // simple command line 00030 if (argc != 2) { 00031 std::cerr << "gen2dot: " << VersionString() << std::endl; 00032 std::cerr << "usage: gen2dot <generator>" << std::endl; 00033 exit(1); 00034 } 00035 00036 // read gen file 00037 Generator g(argv[1]); 00038 00039 // fix output file name 00040 std::string basename = argv[1]; 00041 if (basename.rfind(".gen") < basename.size()) { 00042 basename.resize(basename.rfind(".gen")); 00043 } 00044 std::string dotfilename = basename+".dot"; 00045 00046 // write dot file 00047 g.DotWrite(dotfilename); 00048 00049 return 0; 00050 } libFAUDES 2.23h --- 2014.04.03 --- c++ api documentaion by doxygen |