| 59 | } |
| 60 | |
| 61 | class matchById: public std::unary_function<const AlienBase *, bool> |
| 62 | { |
| 63 | public: |
| 64 | /// Remember ID. |
| 65 | matchById(int id) : _id(id) { /* Empty by design. */ } |
| 66 | /// Match with stored ID. |
| 67 | bool operator()(const AlienBase *ab) const { return ab->getId() == _id; } |
| 68 | private: |
| 69 | int _id; |
| 70 | }; |
| 71 | |
| 72 | /** |
| 73 | * @param node The YAML node containing the data. |