flexiblesusy is hosted by Hepforge, IPPP Durham
FlexibleSUSY
command_line_options.hpp
Go to the documentation of this file.
1// ====================================================================
2// This file is part of FlexibleSUSY.
3//
4// FlexibleSUSY is free software: you can redistribute it and/or modify
5// it under the terms of the GNU General Public License as published
6// by the Free Software Foundation, either version 3 of the License,
7// or (at your option) any later version.
8//
9// FlexibleSUSY is distributed in the hope that it will be useful, but
10// WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12// General Public License for more details.
13//
14// You should have received a copy of the GNU General Public License
15// along with FlexibleSUSY. If not, see
16// <http://www.gnu.org/licenses/>.
17// ====================================================================
18
19#ifndef COMMAND_LINE_OPTIONS_H
20#define COMMAND_LINE_OPTIONS_H
21
22#include <cstdlib>
23#include <iosfwd>
24#include <string>
25
26namespace flexiblesusy {
27
28template <class T>
29class Dynamic_array_view;
30
48public:
50 Command_line_options(int, char*[]);
52
53 bool must_exit() const { return do_exit; }
55 int status() const { return exit_status; }
57 void print_build_info(std::ostream&) const;
58 void print_usage(std::ostream&) const;
59 void print_version(std::ostream&) const;
60 void reset();
61
62 const std::string& get_database_output_file() const { return database_output_file; }
63 const std::string& get_slha_input_file() const { return slha_input_file; }
64 const std::string& get_slha_output_file() const { return slha_output_file; }
65 const std::string& get_program_name() const { return program; }
66 const std::string& get_rgflow_file() const { return rgflow_file; }
67 const std::string& get_spectrum_file() const { return spectrum_file; }
68 const std::string& get_higgsbounds_dataset() const { return higgsbounds_dataset; }
69 const std::string& get_higgssignals_dataset() const { return higgssignals_dataset; }
70
71 static bool get_parameter_value(const std::string&, const std::string&, double&);
72 static bool get_parameter_value(const std::string&, const std::string&, int&);
73 static bool starts_with(const std::string&, const std::string&);
74
75private:
76 bool do_exit{false};
78 int exit_status{EXIT_SUCCESS};
79 std::string program{};
80 std::string database_output_file{};
81 std::string higgssignals_dataset{};
82 std::string higgsbounds_dataset{};
83 std::string rgflow_file{};
84 std::string slha_input_file{};
85 std::string slha_output_file{"-"};
86 std::string spectrum_file{};
87};
88
89} // namespace flexiblesusy
90
91#endif
parses the command line options
static bool get_parameter_value(const std::string &, const std::string &, double &)
const std::string & get_slha_output_file() const
const std::string & get_program_name() const
void print_version(std::ostream &) const
const std::string & get_spectrum_file() const
const std::string & get_rgflow_file() const
void parse(const Dynamic_array_view< char * > &)
static bool starts_with(const std::string &, const std::string &)
const std::string & get_database_output_file() const
const std::string & get_higgsbounds_dataset() const
const std::string & get_slha_input_file() const
void print_usage(std::ostream &) const
void print_build_info(std::ostream &) const
const std::string & get_higgssignals_dataset() const