OpenTTD
flowmapper.h
Go to the documentation of this file.
1 /* $Id: flowmapper.h 26166 2013-12-20 14:57:44Z fonsinchen $ */
2 
3 /*
4  * This file is part of OpenTTD.
5  * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
6  * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7  * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
8  */
9 
12 #ifndef FLOWMAPPER_H_
13 #define FLOWMAPPER_H_
14 
15 #include "linkgraphjob_base.h"
16 
24 class FlowMapper : public ComponentHandler {
25 public:
26 
32  FlowMapper(bool scale) : scale(scale) {}
33  virtual void Run(LinkGraphJob &job) const;
34 
38  virtual ~FlowMapper() {}
39 private:
40 
44  const bool scale;
45 };
46 
47 #endif /* FLOWMAPPER_H_ */
const bool scale
Whether the flow mapper should scale all flows to monthly values.
Definition: flowmapper.h:44
virtual void Run(LinkGraphJob &job) const
Map the paths generated by the MCF solver into flows associated with nodes.
Definition: flowmapper.cpp:21
Map the path trees generated by the MCF solver into flows.
Definition: flowmapper.h:24
FlowMapper(bool scale)
Create a flow mapper.
Definition: flowmapper.h:32
virtual ~FlowMapper()
Virtual destructor has to be defined because of virtual Run().
Definition: flowmapper.h:38
A handler doing "something" on a link graph component.
Some typedefs for component handlers.
Class for calculation jobs to be run on link graphs.
Definition: linkgraphjob.h:31