src/model/ComponentCostAdjustments.cpp
| 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 | #include "ComponentCostAdjustments.hpp" | ||
| 7 | #include "ComponentCostAdjustments_Impl.hpp" | ||
| 8 | |||
| 9 | #include "Model_Impl.hpp" | ||
| 10 | |||
| 11 | #include <utilities/idd/OS_ComponentCost_Adjustments_FieldEnums.hxx> | ||
| 12 | #include <utilities/idd/IddEnums.hxx> | ||
| 13 | |||
| 14 | #include "../utilities/core/Assert.hpp" | ||
| 15 | |||
| 16 | #include <boost/algorithm/string.hpp> | ||
| 17 | |||
| 18 | namespace openstudio { | ||
| 19 | namespace model { | ||
| 20 | namespace detail { | ||
| 21 | |||
| 22 | ✗ | ComponentCostAdjustments_Impl::ComponentCostAdjustments_Impl(const IdfObject& idfObject, Model_Impl* model, bool keepHandle) | |
| 23 | ✗ | : ParentObject_Impl(idfObject, model, keepHandle) { | |
| 24 | ✗ | OS_ASSERT(idfObject.iddObject().type() == ComponentCostAdjustments::iddObjectType()); | |
| 25 | ✗ | } | |
| 26 | |||
| 27 | ✗ | ComponentCostAdjustments_Impl::ComponentCostAdjustments_Impl(const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, | |
| 28 | ✗ | bool keepHandle) | |
| 29 | ✗ | : ParentObject_Impl(other, model, keepHandle) { | |
| 30 | ✗ | OS_ASSERT(other.iddObject().type() == ComponentCostAdjustments::iddObjectType()); | |
| 31 | ✗ | } | |
| 32 | |||
| 33 | ✗ | ComponentCostAdjustments_Impl::ComponentCostAdjustments_Impl(const ComponentCostAdjustments_Impl& other, Model_Impl* model, bool keepHandle) | |
| 34 | ✗ | : ParentObject_Impl(other, model, keepHandle) {} | |
| 35 | |||
| 36 | ✗ | OptionalDouble ComponentCostAdjustments_Impl::miscellaneousCostPerConditionedArea() const { | |
| 37 | ✗ | return getDouble(OS_ComponentCost_AdjustmentsFields::MiscellaneousCostperConditionedArea); | |
| 38 | } | ||
| 39 | |||
| 40 | ✗ | bool ComponentCostAdjustments_Impl::setMiscellaneousCostPerConditionedArea(double num) { | |
| 41 | ✗ | return setDouble(OS_ComponentCost_AdjustmentsFields::MiscellaneousCostperConditionedArea, num); | |
| 42 | ; | ||
| 43 | } | ||
| 44 | |||
| 45 | ✗ | OptionalDouble ComponentCostAdjustments_Impl::designAndEngineeringFees() const { | |
| 46 | ✗ | return getDouble(OS_ComponentCost_AdjustmentsFields::DesignandEngineeringFees); | |
| 47 | } | ||
| 48 | |||
| 49 | ✗ | bool ComponentCostAdjustments_Impl::setDesignAndEngineeringFees(double num) { | |
| 50 | ✗ | return setDouble(OS_ComponentCost_AdjustmentsFields::DesignandEngineeringFees, num); | |
| 51 | ; | ||
| 52 | } | ||
| 53 | |||
| 54 | ✗ | OptionalDouble ComponentCostAdjustments_Impl::contractorFee() const { | |
| 55 | ✗ | return getDouble(OS_ComponentCost_AdjustmentsFields::ContractorFee); | |
| 56 | } | ||
| 57 | |||
| 58 | ✗ | bool ComponentCostAdjustments_Impl::setContractorFee(double num) { | |
| 59 | ✗ | return setDouble(OS_ComponentCost_AdjustmentsFields::ContractorFee, num); | |
| 60 | ; | ||
| 61 | } | ||
| 62 | |||
| 63 | ✗ | OptionalDouble ComponentCostAdjustments_Impl::contingency() const { | |
| 64 | ✗ | return getDouble(OS_ComponentCost_AdjustmentsFields::Contingency); | |
| 65 | } | ||
| 66 | |||
| 67 | ✗ | bool ComponentCostAdjustments_Impl::setContingency(double num) { | |
| 68 | ✗ | return setDouble(OS_ComponentCost_AdjustmentsFields::Contingency, num); | |
| 69 | ; | ||
| 70 | } | ||
| 71 | |||
| 72 | ✗ | OptionalDouble ComponentCostAdjustments_Impl::permitsBondingAndInsurance() const { | |
| 73 | ✗ | return getDouble(OS_ComponentCost_AdjustmentsFields::PermitsBondingandInsurance); | |
| 74 | } | ||
| 75 | |||
| 76 | ✗ | bool ComponentCostAdjustments_Impl::setPermitsBondingAndInsurance(double num) { | |
| 77 | ✗ | return setDouble(OS_ComponentCost_AdjustmentsFields::PermitsBondingandInsurance, num); | |
| 78 | ; | ||
| 79 | } | ||
| 80 | |||
| 81 | ✗ | OptionalDouble ComponentCostAdjustments_Impl::commissioningFee() const { | |
| 82 | ✗ | return getDouble(OS_ComponentCost_AdjustmentsFields::CommissioningFee); | |
| 83 | } | ||
| 84 | |||
| 85 | ✗ | bool ComponentCostAdjustments_Impl::setCommissioningFee(double num) { | |
| 86 | ✗ | return setDouble(OS_ComponentCost_AdjustmentsFields::CommissioningFee, num); | |
| 87 | ; | ||
| 88 | } | ||
| 89 | |||
| 90 | ✗ | OptionalDouble ComponentCostAdjustments_Impl::regionalAdjustmentFactor() const { | |
| 91 | ✗ | return getDouble(OS_ComponentCost_AdjustmentsFields::RegionalAdjustmentFactor); | |
| 92 | } | ||
| 93 | |||
| 94 | ✗ | bool ComponentCostAdjustments_Impl::setRegionalAdjustmentFactor(double num) { | |
| 95 | ✗ | return setDouble(OS_ComponentCost_AdjustmentsFields::RegionalAdjustmentFactor, num); | |
| 96 | ; | ||
| 97 | } | ||
| 98 | |||
| 99 | // return the parent object in the hierarchy | ||
| 100 | ✗ | boost::optional<ParentObject> ComponentCostAdjustments_Impl::parent() const { | |
| 101 | ✗ | return {}; | |
| 102 | } | ||
| 103 | |||
| 104 | // set the parent, child may have to call methods on the parent | ||
| 105 | ✗ | bool ComponentCostAdjustments_Impl::setParent(ParentObject& /*newParent*/) { | |
| 106 | //if (newParent.optionalCast<SomeParentClass>() && (newParent.model() == model())) { | ||
| 107 | // return true; | ||
| 108 | //} | ||
| 109 | ✗ | return false; | |
| 110 | } | ||
| 111 | |||
| 112 | // return any children objects in the hierarchy | ||
| 113 | ✗ | std::vector<ModelObject> ComponentCostAdjustments_Impl::children() const { | |
| 114 | ✗ | std::vector<ModelObject> result; | |
| 115 | ✗ | return result; | |
| 116 | } | ||
| 117 | |||
| 118 | ✗ | std::vector<IddObjectType> ComponentCostAdjustments_Impl::allowableChildTypes() const { | |
| 119 | ✗ | IddObjectTypeVector result; | |
| 120 | ✗ | return result; | |
| 121 | } | ||
| 122 | |||
| 123 | // Get all output variable names that could be associated with this object. | ||
| 124 | ✗ | const std::vector<std::string>& ComponentCostAdjustments_Impl::outputVariableNames() const { | |
| 125 | ✗ | static const std::vector<std::string> result; | |
| 126 | ✗ | return result; | |
| 127 | } | ||
| 128 | |||
| 129 | } // namespace detail | ||
| 130 | |||
| 131 | /// constructor | ||
| 132 | ✗ | ComponentCostAdjustments::ComponentCostAdjustments(const Model& model) : ParentObject(ComponentCostAdjustments::iddObjectType(), model) { | |
| 133 | ✗ | OS_ASSERT(getImpl<detail::ComponentCostAdjustments_Impl>()); | |
| 134 | ✗ | } | |
| 135 | |||
| 136 | // constructor | ||
| 137 | ✗ | ComponentCostAdjustments::ComponentCostAdjustments(std::shared_ptr<detail::ComponentCostAdjustments_Impl> impl) : ParentObject(std::move(impl)) {} | |
| 138 | |||
| 139 | ✗ | OptionalDouble ComponentCostAdjustments::miscellaneousCostPerConditionedArea() const { | |
| 140 | ✗ | return getImpl<detail::ComponentCostAdjustments_Impl>()->miscellaneousCostPerConditionedArea(); | |
| 141 | } | ||
| 142 | |||
| 143 | ✗ | bool ComponentCostAdjustments::setMiscellaneousCostPerConditionedArea(double num) { | |
| 144 | ✗ | return getImpl<detail::ComponentCostAdjustments_Impl>()->setMiscellaneousCostPerConditionedArea(num); | |
| 145 | } | ||
| 146 | |||
| 147 | ✗ | OptionalDouble ComponentCostAdjustments::designAndEngineeringFees() const { | |
| 148 | ✗ | return getImpl<detail::ComponentCostAdjustments_Impl>()->designAndEngineeringFees(); | |
| 149 | } | ||
| 150 | |||
| 151 | ✗ | bool ComponentCostAdjustments::setDesignAndEngineeringFees(double num) { | |
| 152 | ✗ | return getImpl<detail::ComponentCostAdjustments_Impl>()->setDesignAndEngineeringFees(num); | |
| 153 | } | ||
| 154 | |||
| 155 | ✗ | OptionalDouble ComponentCostAdjustments::contractorFee() const { | |
| 156 | ✗ | return getImpl<detail::ComponentCostAdjustments_Impl>()->contractorFee(); | |
| 157 | } | ||
| 158 | |||
| 159 | ✗ | bool ComponentCostAdjustments::setContractorFee(double num) { | |
| 160 | ✗ | return getImpl<detail::ComponentCostAdjustments_Impl>()->setContractorFee(num); | |
| 161 | } | ||
| 162 | |||
| 163 | ✗ | OptionalDouble ComponentCostAdjustments::contingency() const { | |
| 164 | ✗ | return getImpl<detail::ComponentCostAdjustments_Impl>()->contingency(); | |
| 165 | } | ||
| 166 | |||
| 167 | ✗ | bool ComponentCostAdjustments::setContingency(double num) { | |
| 168 | ✗ | return getImpl<detail::ComponentCostAdjustments_Impl>()->setContingency(num); | |
| 169 | } | ||
| 170 | |||
| 171 | ✗ | OptionalDouble ComponentCostAdjustments::permitsBondingAndInsurance() const { | |
| 172 | ✗ | return getImpl<detail::ComponentCostAdjustments_Impl>()->permitsBondingAndInsurance(); | |
| 173 | } | ||
| 174 | |||
| 175 | ✗ | bool ComponentCostAdjustments::setPermitsBondingAndInsurance(double num) { | |
| 176 | ✗ | return getImpl<detail::ComponentCostAdjustments_Impl>()->setPermitsBondingAndInsurance(num); | |
| 177 | } | ||
| 178 | |||
| 179 | ✗ | OptionalDouble ComponentCostAdjustments::commissioningFee() const { | |
| 180 | ✗ | return getImpl<detail::ComponentCostAdjustments_Impl>()->commissioningFee(); | |
| 181 | } | ||
| 182 | |||
| 183 | ✗ | bool ComponentCostAdjustments::setCommissioningFee(double num) { | |
| 184 | ✗ | return getImpl<detail::ComponentCostAdjustments_Impl>()->setCommissioningFee(num); | |
| 185 | } | ||
| 186 | |||
| 187 | ✗ | OptionalDouble ComponentCostAdjustments::regionalAdjustmentFactor() const { | |
| 188 | ✗ | return getImpl<detail::ComponentCostAdjustments_Impl>()->regionalAdjustmentFactor(); | |
| 189 | } | ||
| 190 | |||
| 191 | ✗ | bool ComponentCostAdjustments::setRegionalAdjustmentFactor(double num) { | |
| 192 | ✗ | return getImpl<detail::ComponentCostAdjustments_Impl>()->setRegionalAdjustmentFactor(num); | |
| 193 | } | ||
| 194 | |||
| 195 | 7599 | IddObjectType ComponentCostAdjustments::iddObjectType() { | |
| 196 |
1/1✓ Branch 1 taken 7599 times.
|
7599 | IddObjectType result(IddObjectType::OS_ComponentCost_Adjustments); |
| 197 | 7599 | return result; | |
| 198 | } | ||
| 199 | |||
| 200 | } // namespace model | ||
| 201 | } // namespace openstudio | ||
| 202 |