| 1118 | } |
| 1119 | |
| 1120 | boost::optional<DaylightingDeviceShelf> SubSurface_Impl::daylightingDeviceShelf() const { |
| 1121 | boost::optional<DaylightingDeviceShelf> result; |
| 1122 | |
| 1123 | std::vector<DaylightingDeviceShelf> shelves = |
| 1124 | getObject<ModelObject>().getModelObjectSources<DaylightingDeviceShelf>(DaylightingDeviceShelf::iddObjectType()); |
| 1125 | if (shelves.size() == 1) { |
| 1126 | result = shelves[0]; |
| 1127 | } else if (shelves.size() > 1) { |
| 1128 | result = shelves[0]; |
| 1129 | } |
| 1130 | return result; |
| 1131 | } |
| 1132 | |
| 1133 | boost::optional<DaylightingDeviceShelf> SubSurface_Impl::addDaylightingDeviceShelf() const { |
| 1134 | boost::optional<DaylightingDeviceShelf> result = this->daylightingDeviceShelf(); |