summaryrefslogtreecommitdiffstats
path: root/sensorset.hpp
diff options
context:
space:
mode:
authorPatrick Venture <venture@google.com>2018-08-31 10:10:53 -0700
committerPatrick Venture <venture@google.com>2018-08-31 12:42:31 -0700
commit043d32306e00484afc446a44789b61869ea14f84 (patch)
tree786a28de89a2a916ba5c2e4b73411516a10dc8af /sensorset.hpp
parent901f117733c828aa7519610eb23ce112b9d068a8 (diff)
downloadphosphor-hwmon-043d32306e00484afc446a44789b61869ea14f84.tar.gz
phosphor-hwmon-043d32306e00484afc446a44789b61869ea14f84.zip
add .clang-format
Change-Id: I94ce26d595367e08d6fb3734535bcd855f1b1473 Signed-off-by: Patrick Venture <venture@google.com>
Diffstat (limited to 'sensorset.hpp')
-rw-r--r--sensorset.hpp94
1 files changed, 46 insertions, 48 deletions
diff --git a/sensorset.hpp b/sensorset.hpp
index 420761f..8ad0d5a 100644
--- a/sensorset.hpp
+++ b/sensorset.hpp
@@ -19,58 +19,56 @@
*/
class SensorSet
{
- public:
- typedef std::map<std::pair<std::string, std::string>,
- std::set<std::string>> container_t;
- using mapped_type = container_t::mapped_type;
- using key_type = container_t::key_type;
+ public:
+ typedef std::map<std::pair<std::string, std::string>, std::set<std::string>>
+ container_t;
+ using mapped_type = container_t::mapped_type;
+ using key_type = container_t::key_type;
- /**
- * @brief Constructor
- * @details Builds a map of the hwmon sysfs files in the passed
- * in directory.
- *
- * @param[in] path - path to the hwmon device directory
- *
- */
- explicit SensorSet(const std::string& path);
- ~SensorSet() = default;
- SensorSet() = delete;
- SensorSet(const SensorSet&) = delete;
- SensorSet& operator=(const SensorSet&) = delete;
- SensorSet(SensorSet&&) = default;
- SensorSet& operator=(SensorSet&&) = default;
+ /**
+ * @brief Constructor
+ * @details Builds a map of the hwmon sysfs files in the passed
+ * in directory.
+ *
+ * @param[in] path - path to the hwmon device directory
+ *
+ */
+ explicit SensorSet(const std::string& path);
+ ~SensorSet() = default;
+ SensorSet() = delete;
+ SensorSet(const SensorSet&) = delete;
+ SensorSet& operator=(const SensorSet&) = delete;
+ SensorSet(SensorSet&&) = default;
+ SensorSet& operator=(SensorSet&&) = default;
- /**
- * @brief Returns an iterator to the beginning of the map
- *
- * @return const_iterator
- */
- container_t::const_iterator begin()
- {
- return const_cast<const container_t&>(container).begin();
- }
+ /**
+ * @brief Returns an iterator to the beginning of the map
+ *
+ * @return const_iterator
+ */
+ container_t::const_iterator begin()
+ {
+ return const_cast<const container_t&>(container).begin();
+ }
- /**
- * @brief Returns an iterator to the end of the map
- *
- * @return const_iterator
- */
- container_t::const_iterator end()
- {
- return const_cast<const container_t&>(container).end();
- }
-
- private:
-
- /**
- * @brief The map of hwmon files in the directory
- * @details For example:
- * key = pair("temp", "1")
- * value = "input"
- */
- container_t container;
+ /**
+ * @brief Returns an iterator to the end of the map
+ *
+ * @return const_iterator
+ */
+ container_t::const_iterator end()
+ {
+ return const_cast<const container_t&>(container).end();
+ }
+ private:
+ /**
+ * @brief The map of hwmon files in the directory
+ * @details For example:
+ * key = pair("temp", "1")
+ * value = "input"
+ */
+ container_t container;
};
// vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
OpenPOWER on IntegriCloud