blob: a26efd172d972e8fc3f7f4309824ba7eec526127 (
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) const override
{
if (auto tv = dynamic_cast<Can<T> *>(v)) {
tv->doActivity(static_cast<const T *>(this), dur);
}
}
};
#endif
|