blob: c2458660fc55ac251bdc7437603c19a9bb5f9149 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#ifndef ACTIVITYOF_H
#define ACTIVITYOF_H
#include "activity.h"
#include "vehicles/vehicle.h"
template<typename T> class Activity::Of : public Activity {
void
apply(Vehicle * v, TickDuration dur) override
{
if (auto tv = dynamic_cast<Can<T> *>(v)) {
tv->doActivity(static_cast<T *>(this), dur);
}
}
};
#endif
|