$darkmode
main_stack.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 2020 Robert Bosch GmbH
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  *
16  * SPDX-License-Identifier: Apache-2.0
17  */
23 #pragma once
24 
25 #include <iostream> // for ostream, cerr
26 #include <memory> // for shared_ptr<>
27 #include <string> // for string
28 #include <vector> // for vector<>
29 
30 #include <boost/optional.hpp> // for optional<>
31 
32 #include <fable/environment.hpp> // for Environment
33 #include "stack.hpp" // for Stack
34 
35 namespace cloe {
36 
37 // See main.cpp for descriptions of flags.
38 struct StackOptions {
39  boost::optional<std::ostream&> error = std::cerr;
40  std::shared_ptr<fable::Environment> environment;
41 
42  // Flags:
43  std::vector<std::string> plugin_paths;
44  std::vector<std::string> ignore_sections;
45  bool no_builtin_plugins = false;
46  bool no_system_plugins = false;
47  bool no_system_confs = false;
48  bool no_hooks = false;
49  bool interpolate_vars = true;
50  bool interpolate_undefined = false;
51  bool strict_mode = false;
52  bool secure_mode = false;
53 };
54 
55 Stack new_stack(const StackOptions& opt);
56 
57 Stack new_stack(const StackOptions& opt, const std::string& filepath);
58 
59 Stack new_stack(const StackOptions& opt, const std::vector<std::string>& filepaths);
60 
61 void merge_stack(const StackOptions& opt, Stack& s, const std::string& filepath);
62 
63 } // namespace cloe
Definition: stack.hpp:901
Definition: main_stack.hpp:38