-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
33 lines (24 loc) · 743 Bytes
/
main.cpp
File metadata and controls
33 lines (24 loc) · 743 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <iostream>
#include <fstream>
#include <list>
#include <map>
#include "DiagramReader.h"
// Usage: (on linux)
// run from console with one parameter as the filename for the source file
// $./main class_diagram.class
// then using graphviz convert the .dot file into .png with:
// $ dot -Tpng class_diagram_from_file.dot -o dst.png
// if dot is not installed, you can install from package manager
int main(int argc, char **argv) {
if(argc != 2) {
std::cerr << "Not enough arguments";
}
//test();
DiagramReader dr;
dr.readFromPath(argv[1]); //class_diagram.class
std::ofstream file;
file.open("class_diagram_from_file.dot");
file << dr.getContent();
file.close();
return 0;
}