OpenTTD

init.h
Go to the documentation of this file.
1
3 #ifndef INIT_H
4 #define INIT_H
5
6 #include "linkgraphjob_base.h"
7
12 class InitHandler : public ComponentHandler {
13 public:
14
19 virtual void Run(LinkGraphJob &job) const { job.Init(); }
20
24 virtual ~InitHandler() {}
25 };
26
27 #endif /* INIT_H */
LinkGraphJob::Init
void Init()
Initialize the link graph job: Resize nodes and edges and populate them.
Definition: linkgraphjob.cpp:179
InitHandler::Run
virtual void Run(LinkGraphJob &job) const
Initialize the link graph job.
Definition: init.h:19
InitHandler
Stateless, thread safe initialization hander.
Definition: init.h:12
ComponentHandler
A handler doing "something" on a link graph component.
Definition: linkgraphschedule.h:23
linkgraphjob_base.h
Some typedefs for component handlers.
InitHandler::~InitHandler
virtual ~InitHandler()
Virtual destructor has to be defined because of virtual Run().
Definition: init.h:24
LinkGraphJob
Class for calculation jobs to be run on link graphs.
Definition: linkgraphjob.h:31