diag2dot.cpp
Go to the documentation of this file.
1/** diag2dot.cpp Utility to convert gen files to dot files */
2
3/* FAU Discrete Event Systems Library (libfaudes)
4
5 Copyright (C) 2006 Bernd Opitz
6 Exclusive copyright is granted to Klaus Schmidt
7
8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Lesser General Public
10 License as published by the Free Software Foundation; either
11 version 2.1 of the License, or (at your option) any later version.
12
13 This library is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
17
18 You should have received a copy of the GNU Lesser General Public
19 License along with this library; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
21
22
23#include "libfaudes.h"
24#include <iostream>
25
26using namespace faudes;
27
28int main(int argc, char *argv[]) {
29 if (argc != 2) {
30 std::cerr << "usage: diag2dot <generator>" << std::endl;
31 exit(1);
32 }
33
34 // read gen file
35 Diagnoser g(argv[1]);
36
37 // fix output file name
38 std::string basename = argv[1];
39 if (basename.rfind(".gen") < basename.size()) {
40 basename.resize(basename.rfind(".gen"));
41 }
42 std::string dotfilename = basename+".dot";
43
44 // write dot file
45 g.DotWrite(dotfilename);
46
47 return 0;
48}
int main()
void DotWrite(const std::string &rFileName) const

libFAUDES 2.33k --- 2025.09.16 --- c++ api documentaion by doxygen