Overpass API regression suite coverage (Nova Scotia) / overpass_api/statements/explicit_geometry.cc
overpass_api/statements/explicit_geometry.cc
152 of 204 instrumented lines run by the suite (74.5%) at 8edf11b0419c (this file on GitHub).
runnever runcolumns: line, executions, queries (click for the queries that run the line)
1/** Copyright 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Roland Olbricht et al.2 *3 * This file is part of Overpass_API.4 *5 * Overpass_API is free software: you can redistribute it and/or modify6 * it under the terms of the GNU Affero General Public License as7 * published by the Free Software Foundation, either version 3 of the8 * License, or (at your option) any later version.9 *10 * Overpass_API is distributed in the hope that it will be useful,11 * but WITHOUT ANY WARRANTY; without even the implied warranty of12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13 * GNU General Public License for more details.14 *15 * You should have received a copy of the GNU Affero General Public License16 * along with Overpass_API. If not, see <http://www.gnu.org/licenses/>.17 */19#include "explicit_geometry.h"22Opaque_Geometry* Eval_Point_Geometry_Task::make_point(const std::string& lat_s, const std::string& lon_s)34Evaluator_Point::Statement_Maker Evaluator_Point::statement_maker;35Evaluator_Point::Evaluator_Maker Evaluator_Point::evaluator_maker;38Statement* Evaluator_Point::Evaluator_Maker::create_evaluator(39 const Token_Node_Ptr& tree_it, Statement::QL_Context tree_context,40 Statement::Factory& stmt_factory, Parsed_Query& global_settings, Error_Output* error_output)42608 q if (!tree_it.assert_is_function(error_output) || !tree_it.assert_has_input_set(error_output, false)47608 q Evaluator_Point* result = new Evaluator_Point(tree_it->line_col.first, attributes, global_settings);51567 q tree_it.rhs().lhs(), tree_context, Statement::Single_Return_Type_Checker(Statement::string));550 error_output->add_parse_error("First argument of pt(...) must be an evaluator", tree_it->line_col.first);58567 q tree_it.rhs().rhs(), tree_context, Statement::Single_Return_Type_Checker(Statement::string));620 error_output->add_parse_error("Second argument of pt(...) must be an evaluator", tree_it->line_col.first);71Evaluator_Point::Evaluator_Point72 (int line_number_, const std::map< std::string, std::string >& input_attributes, Parsed_Query& global_settings)80void Evaluator_Point::add_statement(Statement* statement, std::string text)94Requested_Context Evaluator_Point::request_context() const111//-----------------------------------------------------------------------------114Opaque_Geometry* Eval_Linestring_Geometry_Task::make_linestring(const std::vector< Eval_Geometry_Task* >& tasks)1170 for (std::vector< Eval_Geometry_Task* >::const_iterator it = tasks.begin(); it != tasks.end(); ++it)127template< typename Context >128Opaque_Geometry* Eval_Linestring_Geometry_Task::make_linestring(129 const std::vector< Eval_Geometry_Task* >& tasks, const Context& data)1321149886 q for (std::vector< Eval_Geometry_Task* >::const_iterator it = tasks.begin(); it != tasks.end(); ++it)142Evaluator_Linestring::Statement_Maker Evaluator_Linestring::statement_maker;143Evaluator_Linestring::Evaluator_Maker Evaluator_Linestring::evaluator_maker;146Statement* Evaluator_Linestring::Evaluator_Maker::create_evaluator(147 const Token_Node_Ptr& tree_it, Statement::QL_Context tree_context,148 Statement::Factory& stmt_factory, Parsed_Query& global_settings, Error_Output* error_output)150287 q if (!tree_it.assert_is_function(error_output) || !tree_it.assert_has_input_set(error_output, false)155287 q Evaluator_Linestring* result = new Evaluator_Linestring(tree_it->line_col.first, attributes, global_settings);167847 q for (std::vector< Token_Node_Ptr >::const_iterator it = args.begin(); it != args.end(); ++it)1810 error_output->add_parse_error("Every argument of lstr(...) must be an evaluator", (*it)->line_col.first);188Evaluator_Linestring::Evaluator_Linestring189 (int line_number_, const std::map< std::string, std::string >& input_attributes, Parsed_Query& global_settings)197void Evaluator_Linestring::add_statement(Statement* statement, std::string text)207Requested_Context Evaluator_Linestring::request_context() const210217 q for (std::vector< Evaluator* >::const_iterator it = points.begin(); it != points.end(); ++it)216//-----------------------------------------------------------------------------219Opaque_Geometry* Eval_Polygon_Geometry_Task::make_polygon(const std::vector< Eval_Geometry_Task* >& tasks)2220 for (std::vector< Eval_Geometry_Task* >::const_iterator it = tasks.begin(); it != tasks.end(); ++it)232template< typename Context >233Opaque_Geometry* Eval_Polygon_Geometry_Task::make_polygon(234 const std::vector< Eval_Geometry_Task* >& tasks, const Context& data)237363804 q for (std::vector< Eval_Geometry_Task* >::const_iterator it = tasks.begin(); it != tasks.end(); ++it)247Evaluator_Polygon::Statement_Maker Evaluator_Polygon::statement_maker;248Evaluator_Polygon::Evaluator_Maker Evaluator_Polygon::evaluator_maker;251Statement* Evaluator_Polygon::Evaluator_Maker::create_evaluator(252 const Token_Node_Ptr& tree_it, Statement::QL_Context tree_context,253 Statement::Factory& stmt_factory, Parsed_Query& global_settings, Error_Output* error_output)255205 q if (!tree_it.assert_is_function(error_output) || !tree_it.assert_has_input_set(error_output, false)260205 q Evaluator_Polygon* result = new Evaluator_Polygon(tree_it->line_col.first, attributes, global_settings);272405 q for (std::vector< Token_Node_Ptr >::const_iterator it = args.begin(); it != args.end(); ++it)2860 error_output->add_parse_error("Every argument of poly(...) must be an evaluator", (*it)->line_col.first);293Evaluator_Polygon::Evaluator_Polygon294 (int line_number_, const std::map< std::string, std::string >& input_attributes, Parsed_Query& global_settings)302void Evaluator_Polygon::add_statement(Statement* statement, std::string text)312Requested_Context Evaluator_Polygon::request_context() const