psu-ng: Change the GPIOReader class to GPIOInterface
The GPIOReader class only contains a read function. A new write function
will be added so it makes sense for the class to be named Interface
instead of Reader.
Change GPIOReader to GPIOInterface, and change the base class from
GPIOInterface to GPIOInterfaceBase.
Tested: Ran CI.
Change-Id: I2a4abdabe0136a7f73337f0d054d2dd79712f53c
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
diff --git a/phosphor-power-supply/util.hpp b/phosphor-power-supply/util.hpp
index da04020..ca0bf3c 100644
--- a/phosphor-power-supply/util.hpp
+++ b/phosphor-power-supply/util.hpp
@@ -89,26 +89,26 @@
}
};
-std::unique_ptr<GPIOInterface> createGPIO(const std::string& namedGpio);
+std::unique_ptr<GPIOInterfaceBase> createGPIO(const std::string& namedGpio);
-class GPIOReader : public GPIOInterface
+class GPIOInterface : public GPIOInterfaceBase
{
public:
- GPIOReader() = delete;
- virtual ~GPIOReader() = default;
- GPIOReader(const GPIOReader&) = default;
- GPIOReader& operator=(const GPIOReader&) = default;
- GPIOReader(GPIOReader&&) = default;
- GPIOReader& operator=(GPIOReader&&) = default;
+ GPIOInterface() = delete;
+ virtual ~GPIOInterface() = default;
+ GPIOInterface(const GPIOInterface&) = default;
+ GPIOInterface& operator=(const GPIOInterface&) = default;
+ GPIOInterface(GPIOInterface&&) = default;
+ GPIOInterface& operator=(GPIOInterface&&) = default;
/**
* Constructor
*
* @param[in] namedGpio - The string for the gpio-line-name
*/
- GPIOReader(const std::string& namedGpio);
+ GPIOInterface(const std::string& namedGpio);
- static std::unique_ptr<GPIOInterface>
+ static std::unique_ptr<GPIOInterfaceBase>
createGPIO(const std::string& namedGpio);
/**