Overpass API regression suite coverage (Nova Scotia) / overpass_api/statements/timeline.h
overpass_api/statements/timeline.h
20 of 27 instrumented lines run by the suite (74.1%) 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__STATEMENTS__TIMELINE_H20#define DE__OSM3S___OVERPASS_API__STATEMENTS__TIMELINE_H22#include <map>23#include <string>24#include <vector>26#include "evaluator.h"27#include "statement.h"30/* === The statement <em>timeline</em> ===32''since v0.7.55''34The statement <em>timeline</em> takes type and id of an object and optionally version as arguments.35It then returns a derived structure containing the meta information of the specified version.36If no version is specified then one object for each known version is returned.37Each of these objects has tags <em>ref</em>, <em>reftype</em>, and <em>refversion</em> to identify the reference.38In addition, it has tags <em>created</em> and <em>expired</em> that contain the relevant timestamps.40The base syntax is42 timeline(<Type>, <Ref>);44resp.46 timeline(<Type>, <Ref>, <Version>);48where <Type> is one of the three literals node, way, or relation.50In addition, an output set <Set> can be specified:52 timeline(<Type>, <Ref>)->.<Set>;54resp.56 timeline(<Type>, <Ref>, <Version>)->.<Set>;58*/60class Timeline_Statement : public Output_Statement61{62public:63 Timeline_Statement(int line_number_, const std::map< std::string, std::string >& attributes,64 Parsed_Query& global_settings);66 virtual void execute(Resource_Manager& rman);68 static Generic_Statement_Maker< Timeline_Statement > statement_maker;70 static std::string to_string(int type)80 virtual std::string dump_xml(const std::string& indent) const90 virtual std::string dump_compact_ql(const std::string& indent) const99 virtual std::string dump_pretty_ql(const std::string& indent) const108private:109 int type;110 uint64 ref;111 uint32 version;112};115#endif