Returns the children objects if they exists
| 168 | |
| 169 | // Returns the children objects if they exists |
| 170 | std::vector<ModelObject> GeneratorFuelCell_Impl::children() const { |
| 171 | std::vector<ModelObject> result; |
| 172 | boost::optional<CurveQuadratic> curveQ; |
| 173 | boost::optional<CurveCubic> curveC; |
| 174 | |
| 175 | if (boost::optional<GeneratorFuelCellPowerModule> pm = powerModule()) { |
| 176 | result.push_back(pm.get()); |
| 177 | if ((curveQ = powerModule().efficiencyCurve())) { |
| 178 | result.push_back(curveQ.get()); |
| 179 | } |
| 180 | if ((curveQ = powerModule().skinLossQuadraticCurve())) { |
| 181 | result.push_back(curveQ.get()); |
| 182 | } |
| 183 | } |
| 184 | |
| 185 | if (boost::optional<GeneratorFuelCellAirSupply> as = airSupply()) { |
| 186 | result.push_back(as.get()); |
| 187 | if ((curveC = airSupply().blowerPowerCurve())) { |
| 188 | result.push_back(curveC.get()); |
| 189 | } |
| 190 | if ((curveQ = airSupply().airRateFunctionofElectricPowerCurve())) { |
| 191 | result.push_back(curveQ.get()); |
| 192 | } |
| 193 | if ((curveQ = airSupply().airRateFunctionofFuelRateCurve())) { |
| 194 | result.push_back(curveQ.get()); |
| 195 | } |
| 196 | } |
| 197 | |
| 198 | if (boost::optional<GeneratorFuelCellWaterSupply> ws = waterSupply()) { |
| 199 | result.push_back(ws.get()); |
| 200 | if ((curveC = waterSupply().reformerWaterPumpPowerFunctionofFuelRateCurve())) { |
| 201 | result.push_back(curveC.get()); |
| 202 | } |
| 203 | if ((curveQ = waterSupply().reformerWaterFlowRateFunctionofFuelRateCurve())) { |
| 204 | result.push_back(curveQ.get()); |
| 205 | } |
| 206 | } |
| 207 | |
| 208 | if (boost::optional<GeneratorFuelCellAuxiliaryHeater> ht = auxiliaryHeater()) { |
| 209 | result.push_back(ht.get()); |
| 210 | } |
| 211 | |
| 212 | if (boost::optional<GeneratorFuelCellElectricalStorage> es = electricalStorage()) { |
| 213 | result.push_back(es.get()); |
| 214 | } |
| 215 | |
| 216 | if (boost::optional<GeneratorFuelCellInverter> in = inverter()) { |
| 217 | result.push_back(in.get()); |
| 218 | if ((curveQ = inverter().efficiencyFunctionofDCPowerCurve())) { |
| 219 | result.push_back(curveQ.get()); |
| 220 | } |
| 221 | } |
| 222 | |
| 223 | if (boost::optional<GeneratorFuelCellStackCooler> sc = stackCooler()) { |
| 224 | result.push_back(sc.get()); |
| 225 | } |
| 226 | |
| 227 | if (boost::optional<GeneratorFuelSupply> fs = fuelSupply()) { |
nothing calls this directly
no test coverage detected