cpp-stat-bench 0.24.0
Benchmark library with statistics for C++.
Loading...
Searching...
No Matches
command_line_parser.h
Go to the documentation of this file.
1/*
2 * Copyright 2021 MusicScience37 (Kenta Kabashima)
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
20#pragma once
21
22// Following is required for build using GCC.
23#include <lyra/lyra.hpp> // IWYU pragma: keep
24// IWYU pragma: no_include <lyra/cli.hpp>
25
27
28namespace stat_bench {
29namespace runner {
30
35public:
40
41 CommandLineParser(const CommandLineParser&) = delete;
43 auto operator=(const CommandLineParser&) -> CommandLineParser& = delete;
44 auto operator=(CommandLineParser&&) -> CommandLineParser& = delete;
45
50
57 void parse_cli(int argc, const char** argv);
58
67 [[nodiscard]] auto cli() -> lyra::cli& { return cli_; }
68
74 [[nodiscard]] auto config() -> const Config& { return config_; }
75
76private:
78 Config config_{};
79
81 lyra::cli cli_{};
82};
83
84} // namespace runner
85} // namespace stat_bench
auto config() -> const Config &
Get the configuration.
auto cli() -> lyra::cli &
Access to the command line interface definition.
void parse_cli(int argc, const char **argv)
Parse command line arguments.
Definition of Runner class.
Namespace of classes to run benchmarks.
Namespace of stat_bench source codes.
Class of configurations.
Definition config.h:54