Overpass API regression suite coverage (Saxony) / overpass_api/dispatch/scripting_core.cc
overpass_api/dispatch/scripting_core.cc
124 of 142 instrumented lines run by the suite (87.3%) 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 "resource_manager.h"20#include "scripting_core.h"21#include "../core/parsed_query.h"22#include "../core/settings.h"23#include "../frontend/console_output.h"24#include "../frontend/map_ql_parser.h"25#include "../frontend/user_interface.h"26#include "../statements/area_query.h"27#include "../statements/coord_query.h"28#include "../statements/id_query.h"29#include "../statements/make_area.h"30#include "../statements/map_to_area.h"31#include "../statements/osm_script.h"32#include "../statements/query.h"33#include "../statements/statement.h"34#include "../statements/statement_dump.h"35#include "../../expat/expat_justparse_interface.h"36#include "../../template_db/dispatcher.h"37#include "../../template_db/types.h"39#include <errno.h>40#include <fcntl.h>41#include <sys/mman.h>42#include <sys/select.h>43#include <sys/stat.h>44#include <sys/types.h>45#include <unistd.h>47#include <cstdlib>48#include <cstring>49#include <ctime>50#include <fstream>51#include <sstream>52#include <string>53#include <vector>56namespace57{58 std::vector< Statement* > statement_stack_;59 std::vector< Statement_Dump* > statement_dump_stack_;60 std::vector< std::string > text_stack;61 Script_Parser xml_parser;63 template< class TStatement >64 std::vector< TStatement* >& statement_stack();66 template< >69 template< >709908 q std::vector< Statement_Dump* >& statement_stack< Statement_Dump >() { return statement_dump_stack_; }71}74int determine_area_level(Error_Output* error_output, int area_level)95Statement::Factory* stmt_factory_global = 0;96Statement_Dump::Factory* stmt_dump_factory_global = 0;98Statement::Factory* get_factory(Statement::Factory*)103Statement_Dump::Factory* get_factory(Statement_Dump::Factory*)108template< class TStatement >109void start(const char *el, const char **attr)119template< class TStatement >120void end(const char *el)130/* statement->set_endpos(get_tag_end());*/143bool parse_and_validate144 (Statement::Factory& stmt_factory, Parsed_Query& parsed_query,145 const std::string& xml_raw, Error_Output* error_output, Debug_Level debug_level)178248 q for (std::vector< Statement_Dump* >::iterator it = statement_stack< Statement_Dump >().begin();242std::vector< Statement* >* get_statement_stack()