| 1 | #pragma once |
|---|---|
| 2 | |
| 3 | #include "unit.hpp" |
| 4 | |
| 5 | struct Target : public Unit |
| 6 | { |
| 7 | explicit Target(const std::string &id, toml::table &table, std::shared_ptr<const Template> template_ = nullptr, const ArgumentMap &args = {}); |
| 8 | |
| 9 | std::vector<std::string> GetMembers() const |
| 10 | { |
| 11 | return members; |
| 12 | } |
| 13 | |
| 14 | void AddMember(const std::string &unitId) |
| 15 | { |
| 16 | members.push_back(x: unitId); |
| 17 | } |
| 18 | |
| 19 | private: |
| 20 | UnitType GetType() const override |
| 21 | { |
| 22 | return UnitType::Target; |
| 23 | } |
| 24 | bool Start() override; |
| 25 | bool Stop() override; |
| 26 | |
| 27 | private: |
| 28 | std::vector<std::string> members; // units that are part of this target |
| 29 | }; |
| 30 |