From a39cb0aaf87caf650941edd59790fbdc33a9d605 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Sun, 12 Oct 2014 16:50:36 -0700 Subject: [PATCH] break up geometry grammars - refs #2526 --- ...rs.cpp => mapnik_json_feature_grammar.cpp} | 4 --- ....cpp => mapnik_json_generator_grammar.cpp} | 6 +--- .../python/mapnik_json_geometry_grammar.cpp | 27 +++++++++++++++++ .../python/mapnik_svg_generator_grammar.cpp | 28 +++++++++++++++++ .../python/mapnik_wkt_generator_grammar.cpp | 30 +++++++++++++++++++ bindings/python/mapnik_wkt_grammar.cpp | 27 +++++++++++++++++ 6 files changed, 113 insertions(+), 9 deletions(-) rename bindings/python/{mapnik_parser_grammars.cpp => mapnik_json_feature_grammar.cpp} (84%) rename bindings/python/{mapnik_generator_grammars.cpp => mapnik_json_generator_grammar.cpp} (80%) create mode 100644 bindings/python/mapnik_json_geometry_grammar.cpp create mode 100644 bindings/python/mapnik_svg_generator_grammar.cpp create mode 100644 bindings/python/mapnik_wkt_generator_grammar.cpp create mode 100644 bindings/python/mapnik_wkt_grammar.cpp diff --git a/bindings/python/mapnik_parser_grammars.cpp b/bindings/python/mapnik_json_feature_grammar.cpp similarity index 84% rename from bindings/python/mapnik_parser_grammars.cpp rename to bindings/python/mapnik_json_feature_grammar.cpp index b2420f04a..938093263 100644 --- a/bindings/python/mapnik_parser_grammars.cpp +++ b/bindings/python/mapnik_json_feature_grammar.cpp @@ -21,12 +21,8 @@ *****************************************************************************/ #include -#include #include -#include #include using iterator_type = std::string::const_iterator; -template struct mapnik::wkt::wkt_collection_grammar; template struct mapnik::json::feature_grammar; -template struct mapnik::json::geometry_grammar; \ No newline at end of file diff --git a/bindings/python/mapnik_generator_grammars.cpp b/bindings/python/mapnik_json_generator_grammar.cpp similarity index 80% rename from bindings/python/mapnik_generator_grammars.cpp rename to bindings/python/mapnik_json_generator_grammar.cpp index 3f3deb637..bc7bc5f37 100644 --- a/bindings/python/mapnik_generator_grammars.cpp +++ b/bindings/python/mapnik_json_generator_grammar.cpp @@ -21,16 +21,12 @@ *****************************************************************************/ #include -#include +#include #include #include -#include #include using sink_type = std::back_insert_iterator; template struct mapnik::json::feature_generator_grammar; template struct mapnik::json::geometry_generator_grammar; template struct mapnik::json::multi_geometry_generator_grammar; -template struct mapnik::svg::svg_path_generator; -template struct mapnik::wkt::wkt_generator; -template struct mapnik::wkt::wkt_multi_generator; diff --git a/bindings/python/mapnik_json_geometry_grammar.cpp b/bindings/python/mapnik_json_geometry_grammar.cpp new file mode 100644 index 000000000..dff5bc47b --- /dev/null +++ b/bindings/python/mapnik_json_geometry_grammar.cpp @@ -0,0 +1,27 @@ +/***************************************************************************** + * + * This file is part of Mapnik (c++ mapping toolkit) + * + * Copyright (C) 2014 Artem Pavlenko, Jean-Francois Doyon + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + *****************************************************************************/ + +#include +#include + +using iterator_type = std::string::const_iterator; +template struct mapnik::json::geometry_grammar; \ No newline at end of file diff --git a/bindings/python/mapnik_svg_generator_grammar.cpp b/bindings/python/mapnik_svg_generator_grammar.cpp new file mode 100644 index 000000000..051eb0add --- /dev/null +++ b/bindings/python/mapnik_svg_generator_grammar.cpp @@ -0,0 +1,28 @@ +/***************************************************************************** + * + * This file is part of Mapnik (c++ mapping toolkit) + * + * Copyright (C) 2014 Artem Pavlenko, Jean-Francois Doyon + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + *****************************************************************************/ + +#include +#include +#include + +using sink_type = std::back_insert_iterator; +template struct mapnik::svg::svg_path_generator; diff --git a/bindings/python/mapnik_wkt_generator_grammar.cpp b/bindings/python/mapnik_wkt_generator_grammar.cpp new file mode 100644 index 000000000..bc9cceec1 --- /dev/null +++ b/bindings/python/mapnik_wkt_generator_grammar.cpp @@ -0,0 +1,30 @@ +/***************************************************************************** + * + * This file is part of Mapnik (c++ mapping toolkit) + * + * Copyright (C) 2014 Artem Pavlenko, Jean-Francois Doyon + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + *****************************************************************************/ + +#include +#include +#include +#include + +using sink_type = std::back_insert_iterator; +template struct mapnik::wkt::wkt_generator; +template struct mapnik::wkt::wkt_multi_generator; diff --git a/bindings/python/mapnik_wkt_grammar.cpp b/bindings/python/mapnik_wkt_grammar.cpp new file mode 100644 index 000000000..dd18f660c --- /dev/null +++ b/bindings/python/mapnik_wkt_grammar.cpp @@ -0,0 +1,27 @@ +/***************************************************************************** + * + * This file is part of Mapnik (c++ mapping toolkit) + * + * Copyright (C) 2014 Artem Pavlenko, Jean-Francois Doyon + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + *****************************************************************************/ + +#include +#include + +using iterator_type = std::string::const_iterator; +template struct mapnik::wkt::wkt_collection_grammar;