boost::optional<Schedule> SteamEquipment_Impl::schedule() const {
    OptionalSchedule result = getObject<SteamEquipment>().getModelObjectTarget<Schedule>(OS_SteamEquipmentFields::ScheduleName);
    if (!result) {
        // search upwards
        OptionalSpace space = this->space();
        OptionalSpaceType spaceType = this->spaceType();
        if (space) {
            result = space->getDefaultSchedule(DefaultScheduleType::SteamEquipmentSchedule);
        } else if (spaceType) {
            result = spaceType->getDefaultSchedule(DefaultScheduleType::SteamEquipmentSchedule);
        }
    }
    return result;
}
 boost::optional<Schedule> SpaceInfiltrationEffectiveLeakageArea_Impl::schedule() const
 {
   boost::optional<Schedule> result = getObject<ModelObject>().getModelObjectTarget<Schedule>(OS_SpaceInfiltration_EffectiveLeakageAreaFields::ScheduleName);
   if (!result){
     // search upwards
     OptionalSpace space = this->space();
     OptionalSpaceType spaceType = this->spaceType();
     if (space){
       result = space->getDefaultSchedule(DefaultScheduleType::InfiltrationSchedule);
     }else if (spaceType){
       result = spaceType->getDefaultSchedule(DefaultScheduleType::InfiltrationSchedule);
     }
   }
   return result;
 }
示例#3
0
 boost::optional<Schedule> Lights_Impl::schedule() const
 {
   boost::optional<Schedule> result = getObject<ModelObject>().getModelObjectTarget<Schedule>(OS_LightsFields::ScheduleName);
   if (!result){
     // search upwards
     OptionalSpace space = this->space();
     OptionalSpaceType spaceType = this->spaceType();
     if (space){
       result = space->getDefaultSchedule(DefaultScheduleType::LightingSchedule);
     }else if (spaceType){
       result = spaceType->getDefaultSchedule(DefaultScheduleType::LightingSchedule);
     }
   }
   return result;
 }