add .clang-format
Change-Id: I6d9ec8401dcd46781ea258bf8998faa2507fa91d
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/argument.hpp b/argument.hpp
index 8a25aea..df61de1 100644
--- a/argument.hpp
+++ b/argument.hpp
@@ -1,6 +1,7 @@
#pragma once
#include <getopt.h>
+
#include <map>
#include <string>
#include <vector>
@@ -14,48 +15,48 @@
*/
class ArgumentParser
{
- public:
- ArgumentParser() = delete;
- ~ArgumentParser() = default;
- ArgumentParser(const ArgumentParser&) = delete;
- ArgumentParser& operator=(const ArgumentParser&) = delete;
- ArgumentParser(ArgumentParser&&) = default;
- ArgumentParser& operator=(ArgumentParser&&) = default;
+ public:
+ ArgumentParser() = delete;
+ ~ArgumentParser() = default;
+ ArgumentParser(const ArgumentParser&) = delete;
+ ArgumentParser& operator=(const ArgumentParser&) = delete;
+ ArgumentParser(ArgumentParser&&) = default;
+ ArgumentParser& operator=(ArgumentParser&&) = default;
- /** @brief Constructs ArgumentParser object
- *
- * @param argc - the main function's argc passed as is
- * @param argv - the main function's argv passed as is
- * @return Object constructed
- */
- ArgumentParser(int argc, char * const argv[]);
+ /** @brief Constructs ArgumentParser object
+ *
+ * @param argc - the main function's argc passed as is
+ * @param argv - the main function's argv passed as is
+ * @return Object constructed
+ */
+ ArgumentParser(int argc, char* const argv[]);
- /** @brief Given an option, returns its argument(optarg)
- *
- * @param opt - command line option string
- *
- * @return argument which is a standard optarg
- */
- const std::vector<std::string>& operator[](const std::string& opt);
+ /** @brief Given an option, returns its argument(optarg)
+ *
+ * @param opt - command line option string
+ *
+ * @return argument which is a standard optarg
+ */
+ const std::vector<std::string>& operator[](const std::string& opt);
- /** @brief Displays usage
- *
- * @param argv - the main function's argv passed as is
- */
- static void usage(char * const argv[]);
+ /** @brief Displays usage
+ *
+ * @param argv - the main function's argv passed as is
+ */
+ static void usage(char* const argv[]);
- /** @brief Set to 'true' when an option is passed */
- static const std::string trueString;
+ /** @brief Set to 'true' when an option is passed */
+ static const std::string trueString;
- private:
- /** @brief Option to argument mapping */
- std::map<const std::string, std::vector<std::string> > arguments;
+ private:
+ /** @brief Option to argument mapping */
+ std::map<const std::string, std::vector<std::string>> arguments;
- /** @brief Array of struct options as needed by getopt_long */
- static const option options[];
+ /** @brief Array of struct options as needed by getopt_long */
+ static const option options[];
- /** @brief optstring as needed by getopt_long */
- static const char* optionStr;
+ /** @brief optstring as needed by getopt_long */
+ static const char* optionStr;
};
} // namespace watchdog