* AutomationEventList management functions */
| 10 | * AutomationEventList management functions |
| 11 | */ |
| 12 | class AutomationEventList : public ::AutomationEventList { |
| 13 | public: |
| 14 | AutomationEventList(const ::AutomationEventList& automationEventList) |
| 15 | : ::AutomationEventList(automationEventList) { |
| 16 | // Nothing. |
| 17 | } |
| 18 | |
| 19 | /** |
| 20 | * Load an empty automation events list. |
| 21 | */ |
| 22 | AutomationEventList() { set(::LoadAutomationEventList(0)); } |
| 23 | |
| 24 | /** |
| 25 | * Load automation events list from file. |
| 26 | * |
| 27 | * @param fileName The file path to load the automation events list from. |
| 28 | */ |
| 29 | AutomationEventList(const char* fileName) { Load(fileName); } |
| 30 | |
| 31 | AutomationEventList(const AutomationEventList&) = delete; |
| 32 | |
| 33 | AutomationEventList(AutomationEventList&& other) noexcept { |
| 34 | set(other); |
| 35 | |
| 36 | other.capacity = 0; |
| 37 | other.count = 0; |
| 38 | other.events = nullptr; |
| 39 | } |
| 40 | |
| 41 | ~AutomationEventList() { Unload(); } |
| 42 | |
| 43 | GETTER(unsigned int, Capacity, capacity) |
| 44 | GETTER(unsigned int, Count, count) |
| 45 | GETTER(AutomationEvent*, Events, events) |
| 46 | |
| 47 | AutomationEventList& operator=(const ::AutomationEventList& other) { |
| 48 | set(other); |
| 49 | return *this; |
| 50 | } |
| 51 | |
| 52 | AutomationEventList& operator=(const AutomationEventList&) = delete; |
| 53 | |
| 54 | AutomationEventList& operator=(AutomationEventList&& other) noexcept { |
| 55 | if (this == &other) { |
| 56 | return *this; |
| 57 | } |
| 58 | |
| 59 | Unload(); |
| 60 | set(other); |
| 61 | |
| 62 | other.capacity = 0; |
| 63 | other.count = 0; |
| 64 | other.events = nullptr; |
| 65 | |
| 66 | return *this; |
| 67 | } |
| 68 | |
| 69 | /** |
nothing calls this directly
no outgoing calls
no test coverage detected