From c357c47be8a3f210f9eee9a05cc13f1051b036d3 Mon Sep 17 00:00:00 2001 From: Alex Gilday Date: Wed, 21 Mar 2018 13:54:09 +0000 Subject: COMPMID-1008: Fix Doxygen issues Change-Id: Ie73d8771f85d1f5b059f3a56f1bbd73c98e94a38 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/124723 Reviewed-by: Michalis Spyrou Tested-by: Jenkins --- tests/framework/command_line/CommonOptions.h | 46 ++++++++++++++------------- tests/framework/command_line/EnumListOption.h | 9 ++++-- tests/framework/command_line/EnumOption.h | 9 ++++-- tests/framework/command_line/ListOption.h | 9 ++++-- tests/framework/command_line/SimpleOption.h | 20 ++++++++++-- 5 files changed, 63 insertions(+), 30 deletions(-) (limited to 'tests/framework/command_line') diff --git a/tests/framework/command_line/CommonOptions.h b/tests/framework/command_line/CommonOptions.h index 2da2c99874..651316c557 100644 --- a/tests/framework/command_line/CommonOptions.h +++ b/tests/framework/command_line/CommonOptions.h @@ -40,15 +40,15 @@ enum class LogFormat; enum class LogLevel; /** Common command line options used to configure the framework - * - * The options in this object get populated when "parse()" is called on the parser used to construct it. - * The expected workflow is: - * - * CommandLineParser parser; - * CommonOptions options( parser ); - * parser.parse(argc, argv); - * if(options.log_level->value() > LogLevel::NONE) --> Use the options values - */ + * + * The options in this object get populated when "parse()" is called on the parser used to construct it. + * The expected workflow is: + * + * CommandLineParser parser; + * CommonOptions options( parser ); + * parser.parse(argc, argv); + * if(options.log_level->value() > LogLevel::NONE) --> Use the options values + */ class CommonOptions { public: @@ -57,7 +57,9 @@ public: * @param[in,out] parser A parser on which "parse()" hasn't been called yet. */ CommonOptions(CommandLineParser &parser); + /** Prevent instances of this class from being copy constructed */ CommonOptions(const CommonOptions &) = delete; + /** Prevent instances of this class from being copied */ CommonOptions &operator=(const CommonOptions &) = delete; /** Create the printers based on parsed command line options * @@ -67,19 +69,19 @@ public: */ std::vector> create_printers(); - ToggleOption *help; - EnumListOption *instruments; - SimpleOption *iterations; - SimpleOption *threads; - EnumOption *log_format; - SimpleOption *log_file; - EnumOption *log_level; - ToggleOption *throw_errors; - ToggleOption *color_output; - ToggleOption *pretty_console; - SimpleOption *json_file; - SimpleOption *pretty_file; - std::vector> log_streams; + ToggleOption *help; /**< Show help option */ + EnumListOption *instruments; /**< Instruments option */ + SimpleOption *iterations; /**< Number of iterations option */ + SimpleOption *threads; /**< Number of threads option */ + EnumOption *log_format; /**< Log format option */ + SimpleOption *log_file; /**< Log file option */ + EnumOption *log_level; /**< Logging level option */ + ToggleOption *throw_errors; /**< Throw errors option */ + ToggleOption *color_output; /**< Color output option */ + ToggleOption *pretty_console; /**< Pretty console option */ + SimpleOption *json_file; /**< JSON output file option */ + SimpleOption *pretty_file; /**< Pretty output file option */ + std::vector> log_streams; /**< Log streams */ }; } // namespace framework diff --git a/tests/framework/command_line/EnumListOption.h b/tests/framework/command_line/EnumListOption.h index 6155a5da4c..39006d86b9 100644 --- a/tests/framework/command_line/EnumListOption.h +++ b/tests/framework/command_line/EnumListOption.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 ARM Limited. + * Copyright (c) 2017-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -60,7 +60,12 @@ public: EnumListOption(std::string name, std::set allowed_values, std::initializer_list &&default_values); bool parse(std::string value) override; - std::string help() const override; + std::string help() const override; + + /** Get the values of the option. + * + * @return a list of the selected option values. + */ const std::vector &value() const; private: diff --git a/tests/framework/command_line/EnumOption.h b/tests/framework/command_line/EnumOption.h index 1abba77b4b..14d61859ae 100644 --- a/tests/framework/command_line/EnumOption.h +++ b/tests/framework/command_line/EnumOption.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 ARM Limited. + * Copyright (c) 2017-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -59,7 +59,12 @@ public: bool parse(std::string value) override; std::string help() const override; - const T &value() const; + + /** Get the selected value. + * + * @return get the selected enum value. + */ + const T &value() const; private: std::set _allowed_values{}; diff --git a/tests/framework/command_line/ListOption.h b/tests/framework/command_line/ListOption.h index 8b1bb3d05a..07184e8e3b 100644 --- a/tests/framework/command_line/ListOption.h +++ b/tests/framework/command_line/ListOption.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 ARM Limited. + * Copyright (c) 2017-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -53,7 +53,12 @@ public: ListOption(std::string name, std::initializer_list &&default_values); bool parse(std::string value) override; - std::string help() const override; + std::string help() const override; + + /** Get the list of option values. + * + * @return get the list of option values. + */ const std::vector &value() const; private: diff --git a/tests/framework/command_line/SimpleOption.h b/tests/framework/command_line/SimpleOption.h index e6e8045840..d02778e781 100644 --- a/tests/framework/command_line/SimpleOption.h +++ b/tests/framework/command_line/SimpleOption.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 ARM Limited. + * Copyright (c) 2017-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -50,9 +50,25 @@ public: */ SimpleOption(std::string name, T default_value); + /** Parses the given string. + * + * @param[in] value String representation as passed on the command line. + * + * @return True if the value could be parsed by the specific subclass. + */ bool parse(std::string value) override; + + /** Help message for the option. + * + * @return String representing the help message for the specific subclass. + */ std::string help() const override; - const T &value() const; + + /** Get the option value. + * + * @return the option value. + */ + const T &value() const; protected: T _value{}; -- cgit v1.2.1