[Lemon-commits] [lemon_svn] hegyi: r1723 - hugo/trunk/src/work/peter
Lemon SVN
svn at lemon.cs.elte.hu
Mon Nov 6 20:47:11 CET 2006
Author: hegyi
Date: Fri Apr 1 15:42:31 2005
New Revision: 1723
Added:
hugo/trunk/src/work/peter/graphocska.lgf
Modified:
hugo/trunk/src/work/peter/Makefile
hugo/trunk/src/work/peter/graph-displayer.cc
Log:
To run graph-displayer with sample input, type make run, but do not move the nodes, YET
Modified: hugo/trunk/src/work/peter/Makefile
==============================================================================
--- hugo/trunk/src/work/peter/Makefile (original)
+++ hugo/trunk/src/work/peter/Makefile Fri Apr 1 15:42:31 2005
@@ -5,6 +5,6 @@
g++ xy-reader.cc -W -Wall -ansi -pedantic -o xyr -I../..
run: gd
- ./gd
+ ./gd graphocska.lgf
.PHONY: run
Modified: hugo/trunk/src/work/peter/graph-displayer.cc
==============================================================================
--- hugo/trunk/src/work/peter/graph-displayer.cc (original)
+++ hugo/trunk/src/work/peter/graph-displayer.cc Fri Apr 1 15:42:31 2005
@@ -279,6 +279,11 @@
int main(int argc, char *argv[])
{
+ if(argc<2)
+ {
+ std::cerr << "USAGE: gd <input filename.lgf>" << endl;
+ return 0;
+ }
Coordinates coosvector;
@@ -291,7 +296,7 @@
CoordReaderMap xreader('x',cm);
CoordReaderMap yreader('y',cm);
- std::ifstream is("graphocska.lemon");
+ std::ifstream is(argv[1]);
GraphReader<Graph> reader(is, g);
reader.addNodeMap("coordinates_x", xreader);
Added: hugo/trunk/src/work/peter/graphocska.lgf
==============================================================================
--- (empty file)
+++ hugo/trunk/src/work/peter/graphocska.lgf Fri Apr 1 15:42:31 2005
@@ -0,0 +1,11 @@
+ at nodeset
+id coordinates_x coordinates_y
+1 300 300
+2 -300 -300
+3 300 -300
+4 -300 300
+5 100 100
+6 -100 -100
+7 -100 100
+8 100 -100
+ at end
More information about the Lemon-commits
mailing list