GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 40.0% 2 / 0 / 5
Functions: 40.0% 2 / 0 / 5
Branches: -% 0 / 0 / 0

src/model/PythonPluginSearchPaths.hpp
Line Branch Exec Source
1 /***********************************************************************************************************************
2 * OpenStudio(R), Copyright (c) Alliance for Energy Innovation, LLC.
3 * See also https://openstudio.net/license
4 ***********************************************************************************************************************/
5
6 #ifndef MODEL_PYTHONPLUGINSEARCHPATHS_HPP
7 #define MODEL_PYTHONPLUGINSEARCHPATHS_HPP
8
9 #include <model/ModelAPI.hpp>
10 #include "ModelObject.hpp"
11
12 #include "../utilities/core/Filesystem.hpp"
13
14 namespace openstudio {
15 namespace model {
16
17 namespace detail {
18
19 class PythonPluginSearchPaths_Impl;
20
21 } // namespace detail
22
23 /** PythonPluginSearchPaths is a ModelObject that wraps the OpenStudio IDD object 'OS:PythonPlugin:SearchPaths'. */
24 class MODEL_API PythonPluginSearchPaths : public ModelObject
25 {
26 public:
27 /** @name Constructors and Destructors */
28 //@{
29
30 16 virtual ~PythonPluginSearchPaths() override = default;
31 // Default the copy and move operators because the virtual dtor is explicit
32 ✗ PythonPluginSearchPaths(const PythonPluginSearchPaths& other) = default;
33 3 PythonPluginSearchPaths(PythonPluginSearchPaths&& other) = default;
34 ✗ PythonPluginSearchPaths& operator=(const PythonPluginSearchPaths&) = default;
35 ✗ PythonPluginSearchPaths& operator=(PythonPluginSearchPaths&&) = default;
36
37 //@}
38
39 static IddObjectType iddObjectType();
40
41 /** @name Getters */
42 //@{
43
44 bool addCurrentWorkingDirectorytoSearchPath() const;
45
46 bool addInputFileDirectorytoSearchPath() const;
47
48 bool addepinEnvironmentVariabletoSearchPath() const;
49
50 std::vector<openstudio::path> searchPaths() const;
51
52 //@}
53 /** @name Setters */
54 //@{
55
56 bool setAddCurrentWorkingDirectorytoSearchPath(bool addCurrentWorkingDirectorytoSearchPath);
57
58 bool setAddInputFileDirectorytoSearchPath(bool addInputFileDirectorytoSearchPath);
59
60 bool setAddepinEnvironmentVariabletoSearchPath(bool addepinEnvironmentVariabletoSearchPath);
61
62 bool addSearchPath(const openstudio::path& searchPath);
63 bool setSearchPaths(const std::vector<openstudio::path>& searchPaths);
64
65 // Convenience, forwards to the openstudio::path equivalent
66 bool setSearchPaths(const std::vector<std::string>& searchPaths);
67
68 void clearSearchPaths();
69
70 //@}
71 /** @name Other */
72 //@{
73
74 //@}
75 protected:
76 /// @cond
77 using ImplType = detail::PythonPluginSearchPaths_Impl;
78
79 explicit PythonPluginSearchPaths(std::shared_ptr<detail::PythonPluginSearchPaths_Impl> impl);
80
81 friend class detail::PythonPluginSearchPaths_Impl;
82 friend class Model;
83 friend class IdfObject;
84 friend class openstudio::detail::IdfObject_Impl;
85 explicit PythonPluginSearchPaths(Model& model);
86
87 /// @endcond
88 private:
89 REGISTER_LOGGER("openstudio.model.PythonPluginSearchPaths");
90 };
91
92 /** \relates PythonPluginSearchPaths*/
93 using OptionalPythonPluginSearchPaths = boost::optional<PythonPluginSearchPaths>;
94
95 /** \relates PythonPluginSearchPaths*/
96 using PythonPluginSearchPathsVector = std::vector<PythonPluginSearchPaths>;
97
98 } // namespace model
99 } // namespace openstudio
100
101 #endif // MODEL_PYTHONPLUGINSEARCHPATHS_HPP
102