Overpass API regression suite coverage (Nova Scotia) / overpass_api/output_formats/output_popup.cc
overpass_api/output_formats/output_popup.cc
165 of 176 instrumented lines run by the suite (93.8%) 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 "../../expat/escape_xml.h"20#include "../frontend/basic_formats.h"21#include "output_popup.h"23#include <cmath>24#include <fstream>27bool Tag_Filter::matches(const std::vector< std::pair< std::string, std::string > >* tags) const3139329 q for (std::vector< std::pair< std::string, std::string > >::const_iterator it = tags->begin(); it != tags->end(); ++it)40std::string link_if_any(const std::vector< std::pair< std::string, std::string > >& tags)4416546 q for (std::vector< std::pair< std::string, std::string > >::const_iterator it = tags.begin(); it != tags.end(); ++it)4916546 q for (std::vector< std::pair< std::string, std::string > >::const_iterator it = tags.begin(); it != tags.end(); ++it)5416546 q for (std::vector< std::pair< std::string, std::string > >::const_iterator it = tags.begin(); it != tags.end(); ++it)64std::string title_if_any(const std::string& link, const std::string& title_key,65 const std::vector< std::pair< std::string, std::string > >& tags)6916376 q for (std::vector< std::pair< std::string, std::string > >::const_iterator it = tags.begin(); it != tags.end(); ++it)88void Category_Filter::set_title(const std::string& title)94void Category_Filter::set_title_key(const std::string& title_key_)100template< typename TSkel > std::string elem_type() { return ""; }106template< typename TSkel >107std::string print(const std::string& title_key,108 const TSkel& skel, const std::vector< std::pair< std::string, std::string > >* tags)1273716 q for (std::vector< std::pair< std::string, std::string > >::const_iterator it = tags->begin();135bool Category_Filter::consider(const Node_Skeleton& skel,136 const std::vector< std::pair< std::string, std::string > >* tags)138187886 q std::vector< std::vector< Tag_Filter* > >::const_iterator it_conj = filter_disjunction.begin();158bool Category_Filter::consider(const Way_Skeleton& skel,159 const std::vector< std::pair< std::string, std::string > >* tags)1614509 q std::vector< std::vector< Tag_Filter* > >::const_iterator it_conj = filter_disjunction.begin();181bool Category_Filter::consider(const Relation_Skeleton& skel,182 const std::vector< std::pair< std::string, std::string > >* tags)18410484 q std::vector< std::vector< Tag_Filter* > >::const_iterator it_conj = filter_disjunction.begin();204bool Output_Popup::write_http_headers()211void Output_Popup::write_payload_header212 (const std::string& db_dir_, const std::string& timestamp_, const std::string& area_timestamp_)227void Output_Popup::display_remark(const std::string& text)229 //TODO233void Output_Popup::display_error(const std::string& text)235 //TODO239void Output_Popup::write_footer()2414018 q for (std::vector< Category_Filter* >::iterator it = categories.begin(); it != categories.end(); ++it)248void Output_Popup::print_item(const Node_Skeleton& skel,249 const Opaque_Geometry& geometry,250 const std::vector< std::pair< std::string, std::string > >* tags,251 const OSM_Element_Metadata_Skeleton< Node::Id_Type >* meta,252 const std::map< uint32, std::string >* users,253 Output_Mode mode,254 const Feature_Action& action,255 const Node_Skeleton* new_skel,256 const Opaque_Geometry* new_geometry,257 const std::vector< std::pair< std::string, std::string > >* new_tags,258 const OSM_Element_Metadata_Skeleton< Node::Id_Type >* new_meta)260308756 q for (std::vector< Category_Filter* >::iterator it = categories.begin(); it != categories.end(); ++it)268void Output_Popup::print_item(const Way_Skeleton& skel,269 const Opaque_Geometry& geometry,270 const std::vector< std::pair< std::string, std::string > >* tags,271 const OSM_Element_Metadata_Skeleton< Way::Id_Type >* meta,272 const std::map< uint32, std::string >* users,273 Output_Mode mode,274 const Feature_Action& action,275 const Way_Skeleton* new_skel,276 const Opaque_Geometry* new_geometry,277 const std::vector< std::pair< std::string, std::string > >* new_tags,278 const OSM_Element_Metadata_Skeleton< Way::Id_Type >* new_meta)2806039 q for (std::vector< Category_Filter* >::iterator it = categories.begin(); it != categories.end(); ++it)288void Output_Popup::print_item(const Relation_Skeleton& skel,289 const Opaque_Geometry& geometry,290 const std::vector< std::pair< std::string, std::string > >* tags,291 const OSM_Element_Metadata_Skeleton< Relation::Id_Type >* meta,292 const std::map< uint32, std::string >* roles,293 const std::map< uint32, std::string >* users,294 Output_Mode mode,295 const Feature_Action& action,296 const Relation_Skeleton* new_skel,297 const Opaque_Geometry* new_geometry,298 const std::vector< std::pair< std::string, std::string > >* new_tags,299 const OSM_Element_Metadata_Skeleton< Relation::Id_Type >* new_meta)30120694 q for (std::vector< Category_Filter* >::iterator it = categories.begin(); it != categories.end(); ++it)309void Output_Popup::print_item(const Derived_Skeleton& skel,310 const Opaque_Geometry& geometry,311 const std::vector< std::pair< std::string, std::string > >* tags,312 Output_Mode mode,313 const Feature_Action& action)315 // Intentionally empty