regulators: Implements support for if action

Enhance the configuration file parser to support the if action element.

Signed-off-by: Bob King <Bob_King@wistron.com>
Change-Id: Iadb6835dd28151a1dd278f6b2a19568a3072ad5e
diff --git a/phosphor-regulators/src/config_file_parser.hpp b/phosphor-regulators/src/config_file_parser.hpp
index 7104356..e04f81f 100644
--- a/phosphor-regulators/src/config_file_parser.hpp
+++ b/phosphor-regulators/src/config_file_parser.hpp
@@ -27,6 +27,7 @@
 #include "i2c_write_bit_action.hpp"
 #include "i2c_write_byte_action.hpp"
 #include "i2c_write_bytes_action.hpp"
+#include "if_action.hpp"
 #include "not_action.hpp"
 #include "or_action.hpp"
 #include "pmbus_write_vout_command_action.hpp"
@@ -417,6 +418,18 @@
     parseI2CWriteBytes(const nlohmann::json& element);
 
 /**
+ * Parses a JSON element containing an if action.
+ *
+ * Returns the corresponding C++ IfAction object.
+ *
+ * Throws an exception if parsing fails.
+ *
+ * @param element JSON element
+ * @return IfAction object
+ */
+std::unique_ptr<IfAction> parseIf(const nlohmann::json& element);
+
+/**
  * Parses a JSON element containing an 8-bit signed integer.
  *
  * Returns the corresponding C++ int8_t value.