Bayeux  3.4.1
Core Foundation library for SuperNEMO
variant_repository_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 repository.
26  *
27  */
28 
29 #ifndef DATATOOLS_CONFIGURATION_UI_VARIANT_REPOSITORY_CLI_H
30 #define DATATOOLS_CONFIGURATION_UI_VARIANT_REPOSITORY_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_repository;
44 
45  namespace ui {
46 
48  {
49  public:
50 
53 
56 
59 
62  cmd_set_parameter(const std::string & registry_key_,
63  const std::string & param_path_,
64  const std::string & param_value_token_);
65 
68  cmd_get_parameter(const std::string & registry_key_,
69  const std::string & param_path_,
70  std::string & param_value_token_) const;
71 
74  cmd_has_parameter(const std::string & registry_key_,
75  const std::string & variant_path_,
76  bool & present_) const;
77 
80  cmd_is_active_variant(const std::string & registry_key_,
81  const std::string & variant_path_,
82  bool & active_) const;
83 
86  cmd_is_active_registry(const std::string & registry_key_,
87  bool & active_) const;
88 
89  private:
90 
91  datatools::logger::priority _logging_;
93 
94  };
95 
96  } // end of namespace ui
97 
98  } // end of namespace configuration
99 
100 } // end of namespace datatools
101 
102 #endif // DATATOOLS_CONFIGURATION_UI_VARIANT_REPOSITORY_CLI_H
103 
104 // Local Variables: --
105 // mode: c++ --
106 // c-file-style: "gnu" --
107 // tab-width: 2 --
108 // End: --
priority
Priority levels for logging from most to least critical.
Definition: logger.h:82
variant_repository_cli(datatools::configuration::variant_repository &)
Constructor.
command::returned_info cmd_get_parameter(const std::string &registry_key_, const std::string &param_path_, std::string &param_value_token_) const
Get the value of a variant parameter.
command::returned_info cmd_has_parameter(const std::string &registry_key_, const std::string &variant_path_, bool &present_) const
Check if a variant is present.
Command returned information.
Definition: command_utils.h:78
command::returned_info cmd_is_active_variant(const std::string &registry_key_, const std::string &variant_path_, bool &active_) const
Check if a variant is active.
command::returned_info cmd_set_parameter(const std::string &registry_key_, const std::string &param_path_, const std::string &param_value_token_)
Set the value of a variant parameter.
Definition: variant_repository_cli.h:47
command::returned_info cmd_is_active_registry(const std::string &registry_key_, bool &active_) const
Check if a variant registry is active.
The Bayeux/datatools library top-level namespace.
Definition: algo.h:13
Utilities for logging information.
datatools::logger::priority get_logging() const
Return the logging priority threshold.
void set_logging(const datatools::logger::priority)
Set the logging priority threshold.
Variant repository.
Definition: variant_repository.h:57