Files @ r26102:502baaa2877d
Branch filter:

Location: cpp/openttd-patchpack/source/src/linkgraph/init.h

Michael Lutz
Codechange: Template DoCommand to automagically reflect the parameters of the command proc.

When finished, this will allow each command handler to take individually
different parameters, obliviating the need for bit-packing.
/** @file init.h Declaration of initializing link graph handler. */

#ifndef INIT_H
#define INIT_H

#include "linkgraphjob_base.h"

/**
 * Stateless, thread safe initialization handler. Initializes node and edge
 * annotations.
 */
class InitHandler : public ComponentHandler {
public:

	/**
	 * Initialize the link graph job.
	 * @param job Job to be initialized.
	 */
	virtual void Run(LinkGraphJob &job) const { job.Init(); }

	/**
	 * Virtual destructor has to be defined because of virtual Run().
	 */
	virtual ~InitHandler() {}
};

#endif /* INIT_H */