softwarecontainer  0.18.0-739e8d7 2017-05-04
commandlineconfigsource.h
1 
2 /*
3  * Copyright (C) 2016-2017 Pelagicore AB
4  *
5  * Permission to use, copy, modify, and/or distribute this software for
6  * any purpose with or without fee is hereby granted, provided that the
7  * above copyright notice and this permission notice appear in all copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
12  * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
13  * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
14  * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
15  * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
16  * SOFTWARE.
17  *
18  * For further information see LICENSE
19  */
20 
21 #pragma once
22 
23 #include "softwarecontainer-common.h"
24 #include "configsource.h"
25 
26 
27 namespace softwarecontainer {
28 
40 {
41 public:
42  CommandlineConfigSource(std::vector<StringConfig> &stringConfigs,
43  std::vector<IntConfig> &intConfigs,
44  std::vector<BoolConfig> &boolConfigs);
45 
47 
48  std::vector<StringConfig> stringConfigs() override;
49  std::vector<IntConfig> intConfigs() override;
50  std::vector<BoolConfig> boolConfigs() override;
51 
52 private:
53  std::vector<StringConfig> m_stringConfigs;
54  std::vector<IntConfig> m_intConfigs;
55  std::vector<BoolConfig> m_boolConfigs;
56 };
57 
58 } // namespace softwarecontainer
Base class for all config sources.
Definition: configsource.h:32
A config source representing the commandline options.
Developers guide to adding a config item: