OpenTTD Source  20240919-master-gdf0233f4c2
ComponentHandler Class Referenceabstract

A handler doing "something" on a link graph component. More...

#include <linkgraphschedule.h>

Inheritance diagram for ComponentHandler:
DemandHandler FlowMapper InitHandler MCFHandler< Tpass >

Public Member Functions

virtual ~ComponentHandler ()=default
 Destroy the handler. More...
 
virtual void Run (LinkGraphJob &job) const =0
 Run the handler. More...
 

Detailed Description

A handler doing "something" on a link graph component.

It must not keep any state as it is called concurrently from different threads.

Definition at line 21 of file linkgraphschedule.h.

Constructor & Destructor Documentation

◆ ~ComponentHandler()

virtual ComponentHandler::~ComponentHandler ( )
virtualdefault

Destroy the handler.

Must be given due to virtual Run.

Member Function Documentation

◆ Run()

virtual void ComponentHandler::Run ( LinkGraphJob job) const
pure virtual

Run the handler.

A link graph handler must not read or write any data outside the given component as that would create a potential desync.

Parameters
jobLink graph component to run the handler on.

Implemented in MCFHandler< Tpass >, DemandHandler, FlowMapper, and InitHandler.


The documentation for this class was generated from the following file: