1 /*
2  * ConfigUtils.hpp
3  *
4  * Copyright (C) 2021 by RStudio, PBC
5  *
6  * Unless you have received this program directly from RStudio pursuant
7  * to the terms of a commercial license agreement with RStudio, then
8  * this program is licensed to you under the terms of version 3 of the
9  * GNU Affero General Public License. This program is distributed WITHOUT
10  * ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT,
11  * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the
12  * AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details.
13  *
14  */
15 
16 #ifndef CORE_CONFIG_UTILS_HPP
17 #define CORE_CONFIG_UTILS_HPP
18 
19 #include <string>
20 #include <map>
21 
22 namespace rstudio {
23 namespace core {
24 
25 class Error;
26 class FilePath;
27 
28 namespace config_utils {
29 
30 typedef std::map<std::string,std::string> Variables;
31 
32 void extractVariables(const std::string& vars, Variables* pVariables);
33 Error extractVariables(const FilePath& file, Variables* pVariables);
34 
35 } // namespace config_utils
36 } // namespace core
37 } // namespace rstudio
38 
39 
40 #endif // CORE_CONFIG_UTILS_HPP
41 
42