$darkmode
stack_factory.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  */
31 #pragma once
32 
33 #include <iostream> // for ostream, cerr
34 #include <memory> // for shared_ptr<>
35 #include <string> // for string
36 #include <vector> // for vector<>
37 
38 #include <fable/environment.hpp> // for Environment
39 
40 namespace cloe {
41 
42 class Stack;
43 
51 struct StackOptions {
52  std::ostream* error = &std::cerr;
53  std::shared_ptr<fable::Environment> environment;
54 
55  // Flags:
56  std::vector<std::string> plugin_paths;
57  std::vector<std::string> ignore_sections;
58  bool no_builtin_plugins = false;
59  bool no_system_plugins = false;
60  bool no_system_confs = false;
61  bool no_hooks = false;
62  bool interpolate_vars = true;
63  bool interpolate_undefined = false;
64  bool strict_mode = false;
65  bool secure_mode = false;
66 };
67 
71 Stack new_stack(const StackOptions& opt);
72 
76 Stack new_stack(const StackOptions& opt, const std::string& filepath);
77 
81 Stack new_stack(const StackOptions& opt, const std::vector<std::string>& filepaths);
82 
86 void merge_stack(const StackOptions& opt, Stack& s, const std::string& filepath);
87 
88 } // namespace cloe
Definition: stack.hpp:879
Stack new_stack(const StackOptions &opt)
Definition: stack_factory.cpp:111
void merge_stack(const StackOptions &opt, Stack &s, const std::string &filepath)
Definition: stack_factory.cpp:66
Definition: stack_factory.hpp:51