1 #pragma once 2 3 #include "status.hpp" 4 5 #include <memory> 6 7 namespace ipmi_flash 8 { 9 10 // This type will just return success upon trigger(), and even before calling 11 // trigger. 12 class SkipAction : public TriggerableActionInterface 13 { 14 public: 15 static std::unique_ptr<TriggerableActionInterface> CreateSkipAction(); 16 17 SkipAction() = default; 18 ~SkipAction() = default; 19 20 // Disallow copy and assign. 21 SkipAction(const SkipAction&) = delete; 22 SkipAction& operator=(const SkipAction&) = delete; 23 SkipAction(SkipAction&&) = default; 24 SkipAction& operator=(SkipAction&&) = default; 25 26 bool trigger() override 27 { 28 return true; 29 } 30 void abort() override 31 {} 32 ActionStatus status() override 33 { 34 return ActionStatus::success; 35 } 36 }; 37 38 } // namespace ipmi_flash 39