add .clang-format
Change-Id: I6627b5569c2e0f730be7331403218b823a2c622f
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/interfaces.hpp b/interfaces.hpp
index c16d19e..1ebd1cb 100644
--- a/interfaces.hpp
+++ b/interfaces.hpp
@@ -2,29 +2,33 @@
#include <chrono>
-
-struct ReadReturn {
+struct ReadReturn
+{
double value;
std::chrono::high_resolution_clock::time_point updated;
- bool operator==(const ReadReturn &rhs) const {
+ bool operator==(const ReadReturn &rhs) const
+ {
return (this->value == rhs.value && this->updated == rhs.updated);
}
};
-
/*
* A ReadInterface is a plug-in for the PluggableSensor and anyone implementing
* this basically is providing a way to read a sensor.
*/
class ReadInterface
{
- public:
- ReadInterface() { }
+ public:
+ ReadInterface()
+ {
+ }
- virtual ~ReadInterface() { }
+ virtual ~ReadInterface()
+ {
+ }
- virtual ReadReturn read(void) = 0;
+ virtual ReadReturn read(void) = 0;
};
/*
@@ -33,29 +37,31 @@
*/
class WriteInterface
{
- public:
- WriteInterface(int64_t min, int64_t max)
- : _min(min),
- _max(max)
- { }
+ public:
+ WriteInterface(int64_t min, int64_t max) : _min(min), _max(max)
+ {
+ }
- virtual ~WriteInterface() { }
+ virtual ~WriteInterface()
+ {
+ }
- virtual void write(double value) = 0;
+ virtual void write(double value) = 0;
- /*
- * All WriteInterfaces have min/max available in case they want to error
- * check.
- */
- int64_t getMin(void)
- {
- return _min;
- }
- int64_t getMax(void)
- {
- return _max;
- }
- private:
- int64_t _min;
- int64_t _max;
+ /*
+ * All WriteInterfaces have min/max available in case they want to error
+ * check.
+ */
+ int64_t getMin(void)
+ {
+ return _min;
+ }
+ int64_t getMax(void)
+ {
+ return _max;
+ }
+
+ private:
+ int64_t _min;
+ int64_t _max;
};