Overpass API regression suite coverage (Saxony) / overpass_api/output_formats/output_custom.h
overpass_api/output_formats/output_custom.h
1 of 2 instrumented lines run by the suite (50.0%) 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#ifndef DE__OSM3S___OVERPASS_API__OUTPUT_FORMATS__OUTPUT_CUSTOM_H20#define DE__OSM3S___OVERPASS_API__OUTPUT_FORMATS__OUTPUT_CUSTOM_H23#include "../core/datatypes.h"24#include "../core/geometry.h"25#include "../frontend/output_handler.h"27#include <string>28#include <vector>31class Output_Custom : public Output_Handler32{33public:34 Output_Custom(bool redirect_, const std::string& template_name_, const std::string& url_)3541 q : redirect(redirect_), template_name(template_name_), url(url_), template_contains_js(false), count(0) {}37 virtual bool write_http_headers();38 virtual void write_payload_header(const std::string& db_dir,39 const std::string& timestamp, const std::string& area_timestamp);40 virtual void write_footer();41 virtual void display_remark(const std::string& text);42 virtual void display_error(const std::string& text);46 virtual void print_item(const Node_Skeleton& skel,47 const Opaque_Geometry& geometry,48 const std::vector< std::pair< std::string, std::string > >* tags,49 const OSM_Element_Metadata_Skeleton< Node::Id_Type >* meta,50 const std::map< uint32, std::string >* users,51 Output_Mode mode,52 const Feature_Action& action = keep,53 const Node_Skeleton* new_skel = 0,54 const Opaque_Geometry* new_geometry = 0,55 const std::vector< std::pair< std::string, std::string > >* new_tags = 0,56 const OSM_Element_Metadata_Skeleton< Node::Id_Type >* new_meta = 0);58 virtual void print_item(const Way_Skeleton& skel,59 const Opaque_Geometry& geometry,60 const std::vector< std::pair< std::string, std::string > >* tags,61 const OSM_Element_Metadata_Skeleton< Way::Id_Type >* meta,62 const std::map< uint32, std::string >* users,63 Output_Mode mode,64 const Feature_Action& action = keep,65 const Way_Skeleton* new_skel = 0,66 const Opaque_Geometry* new_geometry = 0,67 const std::vector< std::pair< std::string, std::string > >* new_tags = 0,68 const OSM_Element_Metadata_Skeleton< Way::Id_Type >* new_meta = 0);70 virtual void print_item(const Relation_Skeleton& skel,71 const Opaque_Geometry& geometry,72 const std::vector< std::pair< std::string, std::string > >* tags,73 const OSM_Element_Metadata_Skeleton< Relation::Id_Type >* meta,74 const std::map< uint32, std::string >* roles,75 const std::map< uint32, std::string >* users,76 Output_Mode mode,77 const Feature_Action& action = keep,78 const Relation_Skeleton* new_skel = 0,79 const Opaque_Geometry* new_geometry = 0,80 const std::vector< std::pair< std::string, std::string > >* new_tags = 0,81 const OSM_Element_Metadata_Skeleton< Relation::Id_Type >* new_meta = 0);83 virtual void print_item(const Derived_Skeleton& skel,84 const Opaque_Geometry& geometry,85 const std::vector< std::pair< std::string, std::string > >* tags,86 Output_Mode mode,87 const Feature_Action& action = keep);89private:90 void set_output_templates();92 bool redirect;93 std::string template_name;94 std::string url;95 std::string db_dir;96 std::string timestamp;97 std::string area_timestamp;98 bool template_contains_js;99 unsigned int count;100 std::string header;101 std::string node_template;102 std::string way_template;103 std::string relation_template;104 std::string first_type;105 unsigned long long first_id;106 std::string output;107};110#endif