Overpass API regression suite coverage (Saxony) / overpass_api/frontend/output_handler_parser.h

overpass_api/frontend/output_handler_parser.h

0 of 1 instrumented lines run by the suite (0.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 modify
6 * it under the terms of the GNU Affero General Public License as
7 * published by the Free Software Foundation, either version 3 of the
8 * 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 of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU Affero General Public License
16 * along with Overpass_API. If not, see <http://www.gnu.org/licenses/>.
17 */
19#ifndef DE__OSM3S___OVERPASS_API__CORE__OUTPUT_HANDLER_PARSER_H
20#define DE__OSM3S___OVERPASS_API__CORE__OUTPUT_HANDLER_PARSER_H
23#include "../../expat/map_ql_input.h"
24#include "../core/datatypes.h"
25#include "output_handler.h"
28#include <map>
29#include <string>
32class Output_Handler_Parser
34public:
35 // You can inherit from this class
360 virtual ~Output_Handler_Parser() {}
38 // You need to provide a name token for each subclass
39 Output_Handler_Parser(const std::string& format_name);
41 // The class to parse the arguments (from ql notation) if any
42 // Return null if and only if a fatal error has happened
43 virtual Output_Handler* new_output_handler(const std::map< std::string, std::string >& input_params,
44 Tokenizer_Wrapper* token, Error_Output* error_output) = 0;
46 static Output_Handler_Parser* get_format_parser(const std::string& format_name);
48private:
49 // Of each subclass only a single instance should exist - hence no assignment or copies are allowed
50 Output_Handler_Parser(const Output_Handler_Parser&);
51 Output_Handler_Parser& operator=(const Output_Handler_Parser&);
53 static std::map< std::string, Output_Handler_Parser* >& registry();
54};
57#endif