@brief Call AlienMission::think() with proper parameters. * This function object calls AlienMission::think() with the proper parameters. */
| 1094 | * This function object calls AlienMission::think() with the proper parameters. |
| 1095 | */ |
| 1096 | class callThink: public std::unary_function<AlienMission*, void> |
| 1097 | { |
| 1098 | public: |
| 1099 | /// Store the parameters. |
| 1100 | /** |
| 1101 | * @param game The game engine. |
| 1102 | * @param globe The globe object. |
| 1103 | */ |
| 1104 | callThink(Game &game, const Globe &globe) : _game(game), _globe(globe) { /* Empty by design. */ } |
| 1105 | /// Call AlienMission::think() with stored parameters. |
| 1106 | void operator()(AlienMission *am) const { am->think(_game, _globe); } |
| 1107 | private: |
| 1108 | Game &_game; |
| 1109 | const Globe &_globe; |
| 1110 | }; |
| 1111 | |
| 1112 | /** @brief Process a TerrorSite. |
| 1113 | * This function object will count down towards expiring a TerrorSite, and handle expired TerrorSites. |