Пример #1
0
 bool OtherEquipment_Impl::isAbsolute() const {
   OtherEquipmentDefinition definition = otherEquipmentDefinition();
   if (definition.designLevel()) {
     return true;
   }
   return false;
 }
Пример #2
0
  bool OtherEquipment_Impl::hardSize() {
    OptionalSpace space = this->space();
    if (!space) { 
      return false;
    }

    makeUnique();

    OtherEquipmentDefinition definition = otherEquipmentDefinition();
    for (LifeCycleCost cost : definition.lifeCycleCosts()){
      cost.convertToCostPerEach();
    }

    if (definition.designLevel()) {
      return true;
    }

    if (OptionalDouble areaDensity = definition.wattsperSpaceFloorArea()) {
      definition.setDesignLevel(*areaDensity * space->floorArea());
      return true;
    }

    if (OptionalDouble peopleDensity = definition.wattsperPerson()) {
      definition.setDesignLevel(*peopleDensity * space->numberOfPeople());
      return true;
    }

    // should never get here.
    OS_ASSERT(false);
    return false;
  }
Пример #3
0
 bool OtherEquipment_Impl::setOtherEquipmentDefinition(const OtherEquipmentDefinition& definition) {
   return setPointer(definitionIndex(),definition.handle());
 }