Skip to content

Commit

Permalink
Make it be a ModelObject, it's got no business being a ParentObject
Browse files Browse the repository at this point in the history
  • Loading branch information
jmarrec committed Dec 19, 2024
1 parent cdab6fb commit 2957896
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions src/model/PythonPluginSearchPaths.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,18 @@ namespace model {
namespace detail {

PythonPluginSearchPaths_Impl::PythonPluginSearchPaths_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle)
: ParentObject_Impl(idfObject, model, keepHandle) {
: ModelObject_Impl(idfObject, model, keepHandle) {
OS_ASSERT(idfObject.iddObject().type() == PythonPluginSearchPaths::iddObjectType());
}

PythonPluginSearchPaths_Impl::PythonPluginSearchPaths_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model,
bool keepHandle)
: ParentObject_Impl(other, model, keepHandle) {
: ModelObject_Impl(other, model, keepHandle) {
OS_ASSERT(other.iddObject().type() == PythonPluginSearchPaths::iddObjectType());
}

PythonPluginSearchPaths_Impl::PythonPluginSearchPaths_Impl(const PythonPluginSearchPaths_Impl& other, Model_Impl* model, bool keepHandle)
: ParentObject_Impl(other, model, keepHandle) {}
: ModelObject_Impl(other, model, keepHandle) {}

const std::vector<std::string>& PythonPluginSearchPaths_Impl::outputVariableNames() const {
static std::vector<std::string> result;
Expand Down Expand Up @@ -195,8 +195,8 @@ namespace model {
}

/// @cond
PythonPluginSearchPaths::PythonPluginSearchPaths(std::shared_ptr<detail::PythonPluginSearchPaths_Impl> impl) : ParentObject(std::move(impl)) {}
PythonPluginSearchPaths::PythonPluginSearchPaths(Model& model) : ParentObject(PythonPluginSearchPaths::iddObjectType(), model) {
PythonPluginSearchPaths::PythonPluginSearchPaths(std::shared_ptr<detail::PythonPluginSearchPaths_Impl> impl) : ModelObject(std::move(impl)) {}
PythonPluginSearchPaths::PythonPluginSearchPaths(Model& model) : ModelObject(PythonPluginSearchPaths::iddObjectType(), model) {
setAddCurrentWorkingDirectorytoSearchPath(true);
setAddInputFileDirectorytoSearchPath(true);
setAddepinEnvironmentVariabletoSearchPath(true);
Expand Down
6 changes: 3 additions & 3 deletions src/model/PythonPluginSearchPaths.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#define MODEL_PYTHONPLUGINSEARCHPATHS_HPP

#include <model/ModelAPI.hpp>
#include "ParentObject.hpp"
#include "ModelObject.hpp"

namespace openstudio {
namespace model {
Expand All @@ -42,8 +42,8 @@ namespace model {

} // namespace detail

/** PythonPluginSearchPaths is a ParentObject that wraps the OpenStudio IDD object 'OS:PythonPlugin:SearchPaths'. */
class MODEL_API PythonPluginSearchPaths : public ParentObject
/** PythonPluginSearchPaths is a ModelObject that wraps the OpenStudio IDD object 'OS:PythonPlugin:SearchPaths'. */
class MODEL_API PythonPluginSearchPaths : public ModelObject
{
public:
/** @name Constructors and Destructors */
Expand Down
6 changes: 3 additions & 3 deletions src/model/PythonPluginSearchPaths_Impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@
#define MODEL_PYTHONPLUGINSEARCHPATHS_IMPL_HPP

#include <model/ModelAPI.hpp>
#include "ParentObject_Impl.hpp"
#include "ModelObject_Impl.hpp"

namespace openstudio {
namespace model {

namespace detail {

/** PythonPluginSearchPaths_Impl is a ParentObject_Impl that is the implementation class for PythonPluginSearchPaths.*/
class MODEL_API PythonPluginSearchPaths_Impl : public ParentObject_Impl
/** PythonPluginSearchPaths_Impl is a ModelObject_Impl that is the implementation class for PythonPluginSearchPaths.*/
class MODEL_API PythonPluginSearchPaths_Impl : public ModelObject_Impl
{
public:
/** @name Constructors and Destructors */
Expand Down

0 comments on commit 2957896

Please sign in to comment.