Bayeux  3.4.1
Core Foundation library for SuperNEMO
variant_registry_cli.h
Go to the documentation of this file.
1 /* Author(s) : Francois Mauger <mauger@lpccaen.in2p3.fr>
3  * Creation date : 2016-11-07
4  * Last modified : 2016-11-07
5  *
6  * Copyright (C) 2016 Francois Mauger <mauger@lpccaen.in2p3.fr>
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 3 of the License, or (at
11  * your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor,
21  * Boston, MA 02110-1301, USA.
22  *
23  * Description:
24  *
25  * A command line interface tool for variant registry.
26  *
27  */
28 
29 #ifndef DATATOOLS_CONFIGURATION_UI_VARIANT_REGISTRY_CLI_H
30 #define DATATOOLS_CONFIGURATION_UI_VARIANT_REGISTRY_CLI_H
31 
32 // Standard library:
33 #include <string>
34 
35 // This project (Bayeux/datatools):
37 #include <datatools/logger.h>
38 
39 namespace datatools {
40 
41  namespace configuration {
42 
43  class variant_registry;
44 
45  namespace ui {
46 
48  {
49  public:
50 
53 
56 
59 
62  cmd_is_parameter_value_enabled(const std::string & param_path_,
63  const std::string & value_token_,
64  bool & enabled_);
65 
68  cmd_set_parameter_value(const std::string & param_path_,
69  const std::string & value_token_);
70 
73  cmd_get_parameter_value(const std::string & param_path_,
74  std::string & value_token_) const;
75 
78  cmd_is_active_variant(const std::string & variant_path_,
79  bool & active_) const;
80 
83  cmd_has_variant(const std::string & variant_path_,
84  bool & existing_) const;
85 
88  cmd_has_parameter(const std::string & parameter_path_,
89  bool & existing_) const;
90 
91  private:
92 
93  datatools::logger::priority _logging_;
95 
96  };
97 
98  } // end of namespace ui
99 
100  } // end of namespace configuration
101 
102 } // end of namespace datatools
103 
104 #endif // DATATOOLS_CONFIGURATION_UI_VARIANT_REGISTRY_CLI_H
105 
106 // Local Variables: --
107 // mode: c++ --
108 // c-file-style: "gnu" --
109 // tab-width: 2 --
110 // End: --
Registry of configuration variant parameters and associated variants.
Definition: variant_registry.h:53
priority
Priority levels for logging from most to least critical.
Definition: logger.h:82
void set_logging(const datatools::logger::priority)
Set the logging priority threshold.
command::returned_info cmd_is_active_variant(const std::string &variant_path_, bool &active_) const
Check if a variant is active.
Command returned information.
Definition: command_utils.h:78
command::returned_info cmd_set_parameter_value(const std::string &param_path_, const std::string &value_token_)
Command to set the value of a parameter from a string.
command::returned_info cmd_has_variant(const std::string &variant_path_, bool &existing_) const
Check if a variant exists.
datatools::logger::priority get_logging() const
Return the logging priority threshold.
command::returned_info cmd_is_parameter_value_enabled(const std::string &param_path_, const std::string &value_token_, bool &enabled_)
Command to check if the value of a parameter is enabled.
Definition: variant_registry_cli.h:47
command::returned_info cmd_get_parameter_value(const std::string &param_path_, std::string &value_token_) const
Command to get the value string of a parameter.
variant_registry_cli(datatools::configuration::variant_registry &)
Constructor.
The Bayeux/datatools library top-level namespace.
Definition: algo.h:13
Utilities for logging information.
command::returned_info cmd_has_parameter(const std::string &parameter_path_, bool &existing_) const
Check if a parameter exists.