#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "IntStr.h" #include "benchmark_parser.h" #include #include template struct Breader : public Benchmark_visitor { typedef typename CGAL::Quotient NT1; typedef typename K::Point_2 Point_2; typedef typename K::Circle_2 Circle_2; typedef std::list Circles; typedef std::list Points; typedef std::list Numbers; typedef std::list > Polygon; typedef std::list Polygons; Points points; Numbers numbers; Circles circles; Polygons polygons; int x_; int y_; Breader() {} virtual void token_not_handled( std::string s) {} virtual void accept_benchmark_name( std::string s) { Benchmark_visitor::accept_benchmark_name(s); std::cerr << "name '" << s << "', "; } virtual void accept_classification( std::string problem, std::string geom, std::string clas, std::string family, std::string instance, std::string release) { if ((problem != "Arrangement") && (problem != "CSG") && (problem != " ")) error_handler ( "classification error"); if ((geom != "Lines") && (geom != "Circles") && (geom != "Conics") && (geom != "Cubics") && (geom != "Quartics") && (geom != "ArbitraryDegreeCurves") && ( geom != "Quadrics") && (geom != "Tori") && (geom != "Planes") && (geom != " ")) error_handler ( "classification error" ); if ((clas != "FullCurves") && (clas != "Ellipses") && (clas != "BoundedArcs") && (clas != "UnboundedArcs") && (clas != "FullSurfaces") && (clas != "BoundedPatches") && (clas != "UnboundedPatches") && (clas != " ")) error_handler ( "classification error" ); } virtual void begin_circle_2() { std::cerr << "circle begin" << std::endl; x_=0; y_=0; } virtual void end_circle_2() { std::cerr << "circle end" << std::endl; //Circle_2 cyrc = typename K::Construct_circle_2()(Point_2(x_,y_), integer*integer); NT1 r= numbers.back(); Circle_2 circ = typename K::Construct_circle_2()(points.back(), r*r); circles.push_back(circ); } virtual void accept_point_2( std::string x, std::string y) { std::cerr << "accept_point_2 :"< NT1; typedef CGAL::Cartesian Linear_k1; typedef CGAL::Algebraic_kernel_for_circles_2_2 Algebraic_k1; typedef CGAL::Circular_kernel_2 CK; typedef CK::Circular_arc_2 Circular_arc_2; typedef CK::Line_arc_2 Line_arc_2; typedef CGAL::Variant_traits CircularK_Variant_Traits; typedef boost::variant< Circular_arc_2, Line_arc_2 > CircularKVarArc; typedef std::vector CircularKVarArcContainer; CircularKVarArcContainer arc; typedef CGAL::Arrangement_2 Pmwx; typedef CGAL::Arr_naive_point_location Point_location; Pmwx _pm; Point_location _pl(_pm); typedef CK::Circle_2 Circle_2; typedef std::list Circles; int exit_status = 0; if ( argc < 2) { return 0; } else { for ( int i = 1; i < argc; ++i) { Breader check; std::cerr << "File '" << argv[i] << "', "<